MCPcopy Create free account
hub / github.com/bspaans/python-mingus / get_midi_data

Method get_midi_data

mingus/midi/midi_file_out.py:42–45  ·  view source on GitHub ↗

Collect and return the raw, binary MIDI data from the tracks.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 1

write_fileMethod · 0.95

Calls 1

headerMethod · 0.95

Tested by

no test coverage detected