From: Jan Nieuwenhuizen Date: Tue, 1 Mar 2011 12:56:51 +0000 (+0100) Subject: Midi2ly: use SEQUENCE_TRACK_NAME to set Staff.instrumentName. X-Git-Tag: release/2.13.52-1~3^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=01d0ec72bd220c41d54e10ebafa503dd7951cb44;p=lilypond.git Midi2ly: use SEQUENCE_TRACK_NAME to set Staff.instrumentName. --- diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index a32d2aabc3..af47460a96 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -405,6 +405,10 @@ class Text: or d.compare (reference_note.duration)): s = s + Duration (self.clocks).dump () s = s + ' ' + elif self.text and self.type == midi.SEQUENCE_TRACK_NAME: + text = self.text.replace ('(MIDI)', '').strip () + if text: + s = '\n \\set Staff.instrumentName = "%(text)s"\n ' % locals () else: s = '\n % [' + self.text_types[self.type] + '] ' + self.text + '\n ' return s