2012/3/21 Martin Tarenskeen <m.tarensk...@zonnet.nl>: > > > On Wed, 21 Mar 2012, David Kastrup wrote: > >>>>> For this purpose I need to write a pianotune that uses MIDI channel 3 >>>>> for >>>>> the Left Hand part, and MIDI channel 4 for the Right Hand part. A bit >>>>> strange, I agree, but this is what the PianoBooster docs tell me to do. > > >>>> Well since Lilypond enumerates the MIDI channels as they are needed, you >>>> could simply produce a MIDI score that has one empty staff, thus pushing >>>> the >>>> other staves one channel down. (The first channel is used by lilypond >>>> itself). > > > P.S: Not true? The first TRACK is used by LilyPond, not the first CHANNEL. > The first MIDI channel goes to the first staff containing music. Read on: > > >>> That's one of the things I tried, but doesn't work. > > >>> I have discovered Lilypond only creates a new MIDI channel if a Staff >>> contains music. > > >> Put music there, then. Just s should suffice. > > > That's what I thought. > I have tried {}, {s}, {r}, {R}, but they all don't do the trick. Channel 1 > is still assigned to the first staff that has notes in it. > > Only if I create two staffs with at least one single note, MIDI channel 3 > goes to the next staff. You can try and check yourself. > > I can understand why Lilypond behaves like this. Lilypond only supports 16 > MIDI channels. Some people have already posted problems in this forum with > this limitation when writing big orchestral scores. Just search in the mail > archives. It would not be very efficient to assign MIDI channels to staffs > that won't play any music anyway. > > Don't change this behaviour just for my little private project! > I have found another solution (using abcm2ps and abc2midi) that does what I > want to do. But I still think this is an interesting case and would be > interested in a workaround for LilyPond.
It would be interesting to have an \midiChannel #number (#1 to #16) to force the channel on current Voice. Or, it could be a context property so you can set it per score/system/staff/voice. Another useful feature would be \midiProgram #number (#1 to #128) or midiProgram = #number for using instead of midiInstrument. Just thinking aloud. Bounty EUR 40 for both. -- Francisco Vila. Badajoz (Spain) www.paconet.org , www.csmbadajoz.com _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user