lilypond-user
[Top][All Lists]
Advanced

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

[no subject]


From: olivier . cloirec
Date: Thu, 28 Aug 2003 21:36:05 +0200
User-agent: Internet Messaging Program (IMP) 3.2.1

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

Attachment: ts-score.ly
Description: Binary data

Attachment: ts-music.ly
Description: Binary data


reply via email to

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