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

Method play_Track

mingus/midi/midi_track.py:109–120  ·  view source on GitHub ↗

Convert a Track object to MIDI events and write them to the track_data.

(self, track)

Source from the content-addressed store, hash-verified

107 self.stop_NoteContainer(x[2])
108
109 def play_Track(self, track):
110 """Convert a Track object to MIDI events and write them to the
111 track_data."""
112 if hasattr(track, "name"):
113 self.set_track_name(track.name)
114 self.delay = 0
115 instr = track.instrument
116 if hasattr(instr, "instrument_nr"):
117 self.change_instrument = True
118 self.instrument = instr.instrument_nr
119 for bar in track:
120 self.play_Bar(bar)
121
122 def stop_Note(self, note):
123 """Add a note_off event for note to event_track."""

Callers 1

write_TrackFunction · 0.95

Calls 2

set_track_nameMethod · 0.95
play_BarMethod · 0.95

Tested by

no test coverage detected