lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestions: New definitions for greater midi control


From: Alex Stone
Subject: Suggestions: New definitions for greater midi control
Date: Thu, 17 Jun 2010 06:09:46 -0700 (PDT)

Hello all.

As part of a steep learning curve with lilypond, i've discovered that midi
playback doesn't always do what it says on the tin. I'm aware of the
difference in midi instrument names=patch numbers often foisted on us by
developers eager to define their own patch maps, but even with GM maps, i
often get a different result to the one i expect. (Flute score being played
by trombones,etc...)

Suggestion 1.

3 new \commands.

\bankMSB <n>
\bankLSB <n>
\patch <n>

These commands are inserted along with an integer in the score for a part,
that may require a change of articulation.
e.g.

staffFlute = \new Staff {
        \set Staff.instrumentName = "FluteI"
        \set Staff.midiInstrument = "flute"
        \key e \minor
        \clef treble
        \relative c' { 
c'2\p r2 
d2\<( a'2\!
g2.\mf\>) r4\!  
r1
r1 
r4 a4\p( b c)
r1 
r4 a4\p\<( b c)\! 
b8\mf( a g a) g2
r2 c8(b a b)
a8( g fs g) r2
r2 fs(e d e)
r2

A quick flute extract from a score.

Now with the new commands, using bank and patch changes to switch flute
legato to flute staccato in a self made midi instrument map.

staffFlute = \new Staff {
        \set Staff.instrumentName = "FluteI"
        \set Staff.midiInstrument = "flute"
        \key e \minor
        \clef treble
        \relative c' { 
c'2\p r2 
d2\<( a'2\!
g2.\mf\>) r4\!  
r1
r1 
r4 a4\p( b c)
r1 
r4 a4\p\<( b c)\! 
b8\mf( a g a) g2
r2 c8(b a b)

"\bankLSB 0
\patch 79"

a8( g fs g) r2
r2 fs(e d e)
r2

Given that bank and patch changes are pretty well universal for midi, not
for instrument numbers, but for the structure of using bank and patch
changes, then this addition to lilypond might well serve as a "univeral"
means of tailoring midi playback according to the user's requirements, and
possibly introduce a greater degree of accuracy of playback.

Suggestion 2.

On a wider note, may i suggest additional commands called \midiPort <n>, and
\midiMcha <n>.

For those of us who use, on a regular basis, more than 16 staves in a score,
the 16midi channel limitation can be problematic. Even the workarounds so
generously supplied by lily users, as useful as they are, don't overcome
this limitation.

With the suggested /midiPort command,  the user could define more than one
midi port, each with 16 channels in the block, and have access to a far
greater number of options for more accurate playback, with no limitations.

As follows, with the same flute block as an example:

staffFlute = \new Staff {
        \set Staff.instrumentName = "FluteI"
        \set Staff.midiInstrument = "flute"
        "\midiPort 0
        \midiMcha 2"
        \key e \minor
        \clef treble
        \relative c' { 
c'2\p r2 
d2\<( a'2\!
g2.\mf\>) r4\!  
r1
r1 
r4 a4\p( b c)
r1 
r4 a4\p\<( b c)\! 
b8\mf( a g a) g2
r2 c8(b a b)
a8( g fs g) r2
r2 fs(e d e)
r2

midi files are then created with as many channels as there are ports(1 port
=16 channels), and for playback, the user can import the midi file into a
sequencer, or playback the file with a multiport sampler, for example
something like Qsynth, with multiple engines, and soundfonts loaded. 

I've tried to think this through within the context of lily syntax, but
there may be something in here that's inherently impossible, as a) i'm not a
coder, and b), I'm new to lilypond.

Alex.

Edited for greater accuracy.
-- 
View this message in context: 
http://old.nabble.com/Suggestions%3A-New-definitions-for-greater-midi-control-tp28912880p28912880.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]