Collect and return the raw, binary MIDI data from the tracks.
(self)
| 40 | self.tracks = tracks |
| 41 | |
| 42 | def get_midi_data(self): |
| 43 | """Collect and return the raw, binary MIDI data from the tracks.""" |
| 44 | tracks = [t.get_midi_data() for t in self.tracks if t.track_data != b""] |
| 45 | return self.header() + b"".join(tracks) |
| 46 | |
| 47 | def header(self): |
| 48 | """Return a header for type 1 MIDI file.""" |