(Please always specify a Subject line in your emails.)
You don't have to dig into the C++ code. Since LilyPond is
so flexible, you can easily redefine the way the different
context types are mapped into MIDI tracks. See
http://mail.gnu.org/archive/html/lilypond-user/2003-01/msg00088.html
(which really addresses the opposite problem).
/Mats
address@hidden wrote:
Hi everybody!
I've typeset the beggining of the 1st mvt of the 2nd Rachmaninov
piano concerto.
I'd like to listen to it with a midi player, but there are some
problems with
the instrumentation...
Acutually there are more than 16 tracks. The problem is that the midi
output
sets one channel per track so it can't put more than 16 tracks even
if some of
them could use the same channel :((. I don't know if it's very clear...
I look to the C++ code, an I'm guessing the problem comes from here:
// from lily/performance.cc
void
Performance::output (Midi_stream& midi_stream)
{
int tracks_i = audio_staffs_.size () + 1;
// ugh
int clocks_per_4_i = 384;
midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
output_header_track (midi_stream);
progress_indication ("\n");
progress_indication (_ ("Track ... "));
int channel = 0;
for (int i =0; i < audio_staffs_.size (); i++)
{
Audio_staff *s = audio_staffs_[i];
if (verbose_global_b)
progress_indication ("[" + to_string (i)) ;
/*
MIDI players tend to ignore instrument settings on
channel 10, the percussion channel by default.
*/
if (channel == 9)
channel++;
if (s->channel_ < 0)
s->channel_ = channel;
s->output (midi_stream, channel++); // oooops!!
if (verbose_global_b)
progress_indication ("]");
}
}
I send the source if you want to test it...
I'm using lilypond 1.7.27
Thanks in advance for your help!
PS: you have to run lilypond on the ts-score.ly file
------------------------------------------------------------------------
_______________________________________________
Lilypond-user mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lilypond-user