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

Method play_NoteContainer

mingus/midi/midi_track.py:74–85  ·  view source on GitHub ↗

Convert a mingus.containers.NoteContainer to the equivalent MIDI events and add it to the track_data. Note.channel and Note.velocity can be set as well.

(self, notecontainer)

Source from the content-addressed store, hash-verified

72 self.track_data += self.note_on(channel, int(note) + 12, velocity)
73
74 def play_NoteContainer(self, notecontainer):
75 """Convert a mingus.containers.NoteContainer to the equivalent MIDI
76 events and add it to the track_data.
77
78 Note.channel and Note.velocity can be set as well.
79 """
80 if len(notecontainer) <= 1:
81 [self.play_Note(x) for x in notecontainer]
82 else:
83 self.play_Note(notecontainer[0])
84 self.set_deltatime(0)
85 [self.play_Note(x) for x in notecontainer[1:]]
86
87 def play_Bar(self, bar):
88 """Convert a Bar object to MIDI events and write them to the

Callers 2

play_BarMethod · 0.95
write_NoteContainerFunction · 0.95

Calls 2

play_NoteMethod · 0.95
set_deltatimeMethod · 0.95

Tested by

no test coverage detected