]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/performance.cc
*** empty log message ***
[lilypond.git] / lily / performance.cc
index 23be820ad001b5ee3d5a5726894d552619bfde70..270bc87d10b580e1f5f189229891153def62f32f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include <time.h>
@@ -62,8 +62,19 @@ Performance::output (Midi_stream& midi_stream)
        */
       if (channel == 9)
         channel++;
+
+
+      /*
+       Huh? Why does each staff also have a separate channel? We
+       should map channels to voices, not staves. --hwn.
+       */
       if (s->channel_ < 0)
-        s->channel_ = channel;
+       {
+         s->channel_ = channel <? 15;
+         if (channel > 15)
+           warning ("MIDI channel wrapped around. Mapping to channel 15.");
+       }
+      
       s->output (midi_stream, channel++);
       if (verbose_global_b)
        progress_indication ("]");
@@ -110,8 +121,9 @@ Performance::output_header_track (Midi_stream& midi_stream)
   Midi_text at (&at_a);
   midi_track.add (Moment (0), &at);
 
-  
-  str = _f ("from musical definition: %s", origin_string_);
+
+  // TODO:
+  //  str = _f ("from musical definition: %s", origin_string_);
 
   Audio_text from_a (Audio_text::TEXT, str);
   Midi_text from (&from_a);
@@ -145,21 +157,12 @@ Performance::add_element (Audio_element *p)
   audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
 }
 
-
-void
-Performance::process ()
+SCM
+Performance::process (String out)
 {
-  String out = output_name_global;
   if (out == "-")
     out = "lelie.midi";
-  int def = midi_->get_next_score_count ();
-  if (def)
-    {
-      Path p = split_path (out);
-      p.base += "-" + to_string (def);
-      out = p.to_string ();
-    }
-
+  
   /* Maybe a bit crude, but we had this before */
   Path p = split_path (out);
   p.ext = "midi";
@@ -172,4 +175,5 @@ Performance::process ()
 
   output (midi_stream);
   progress_indication ("\n");
+  return SCM_UNDEFINED;
 }