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

Method stop_NoteContainer

mingus/midi/midi_track.py:128–138  ·  view source on GitHub ↗

Add note_off events for each note in the NoteContainer to the track_data.

(self, notecontainer)

Source from the content-addressed store, hash-verified

126 self.track_data += self.note_off(channel, int(note) + 12, velocity)
127
128 def stop_NoteContainer(self, notecontainer):
129 """Add note_off events for each note in the NoteContainer to the
130 track_data."""
131 # if there is more than one note in the container, the deltatime should
132 # be set back to zero after the first one has been stopped
133 if len(notecontainer) <= 1:
134 [self.stop_Note(x) for x in notecontainer]
135 else:
136 self.stop_Note(notecontainer[0])
137 self.set_deltatime(0)
138 [self.stop_Note(x) for x in notecontainer[1:]]
139
140 def set_instrument(self, channel, instr, bank=1):
141 """Add a program change and bank select event to the track_data."""

Callers 2

play_BarMethod · 0.95
write_NoteContainerFunction · 0.95

Calls 2

stop_NoteMethod · 0.95
set_deltatimeMethod · 0.95

Tested by

no test coverage detected