From: Jan Nieuwenhuizen Date: Mon, 14 Mar 2011 14:44:29 +0000 (+0100) Subject: Midi2ly: do not set instrument in lyrics track. Fixes crash. X-Git-Tag: release/2.13.55-1~11^2~9 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=27e6a49c19f84705f0ede7c186f58362688c7fd3 Midi2ly: do not set instrument in lyrics track. Fixes crash. --- diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index a4ed761448..82cfa963de 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -403,7 +403,8 @@ class Text: s = s + ' ' elif (self.text.strip () and self.type == midi.SEQUENCE_TRACK_NAME - and not self.text == 'control track'): + and not self.text == 'control track' + and not self.track.lyrics_p_): text = self.text.replace ('(MIDI)', '').strip () if text: s = '\n \\set Staff.instrumentName = "%(text)s"\n ' % locals () @@ -509,6 +510,7 @@ class Channel: elif (e[1][1] >= midi.SEQUENCE_NUMBER and e[1][1] <= midi.CUE_POINT): text = Text (e[1][1], e[1][2]) + text.track = self music.append ((t, text)) if (text.type == midi.SEQUENCE_TRACK_NAME): self.name = text.text