From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 3 Mar 2011 15:40:28 +0000 (+0100)
Subject: Midi2ly: add channel debugging.
X-Git-Tag: release/2.13.53-1~25
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=068eadf4ad2d70a0eec8589921ed6a12742b6c63;p=lilypond.git

Midi2ly: add channel debugging.
---

diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py
index 60c8f6ecec..65b3688d67 100644
--- a/scripts/midi2ly.py
+++ b/scripts/midi2ly.py
@@ -437,12 +437,13 @@ def split_track (track):
         else:
             chs[0].append (e)
 
-    for i in range (16):
-        if chs[i] == []:
-            del chs[i]
-
     threads = []
+    i = 0
     for v in chs.values ():
+        i += 1
+        if not v:
+            continue
+        debug ('channel: %d\n' % i)
         events = events_on_channel (v)
         t = unthread_notes (events)
         if len (t):
@@ -489,7 +490,6 @@ def events_on_channel (channel):
     events = []
     last_lyric = 0
     last_time = 0
-    debug ('\n\nchannel\n')
     for e in channel:
         t = e[0]