Convert a Note object to a midi event and adds it to the track_data. To set the channel on which to play this note, set Note.channel, the same goes for Note.velocity.
(self, note)
| 55 | return b"\x00\xff\x2f\x00" |
| 56 | |
| 57 | def play_Note(self, note): |
| 58 | """Convert a Note object to a midi event and adds it to the |
| 59 | track_data. |
| 60 | |
| 61 | To set the channel on which to play this note, set Note.channel, the |
| 62 | same goes for Note.velocity. |
| 63 | """ |
| 64 | channel = note.channel |
| 65 | velocity = note.velocity |
| 66 | if self.change_instrument: |
| 67 | self.set_instrument(channel, self.instrument) |
| 68 | self.change_instrument = False |
| 69 | |
| 70 | assert 0 <= velocity <= 0x7F |
| 71 | |
| 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 |
no test coverage detected