]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-performer.cc
Midi: thinkos. Fix wrapping of channels.
[lilypond.git] / lily / staff-performer.cc
index 3fc26fa45632d826e05345ea2f778aaf47fb6e15..7239e58d4e4501f77df7486d1e101aa134c13980 100644 (file)
@@ -184,8 +184,6 @@ Staff_performer::finalize ()
 {
   staff_map_.clear ();
   channel_map_.clear ();
-  channel_count_ = 0;
-  static_channel_map_.clear ();
 }
 
 string
@@ -223,7 +221,10 @@ Staff_performer::get_channel (string instrument)
   /* MIDI players tend to ignore instrument settings on channel
      10, the percussion channel.  */
   if (channel % 16 == 9)
-    channel_map["percussion"] = channel++;
+    {
+      channel_map["percussion"] = channel++;
+      channel_count_++;
+    }
 
   if (channel > 15)
     {