From 068eadf4ad2d70a0eec8589921ed6a12742b6c63 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 3 Mar 2011 16:40:28 +0100 Subject: [PATCH] Midi2ly: add channel debugging. --- scripts/midi2ly.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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] -- 2.39.5