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

Method set_tempo

mingus/midi/midi_track.py:210–213  ·  view source on GitHub ↗

Convert the bpm to a midi event and write it to the track_data.

(self, bpm)

Source from the content-addressed store, hash-verified

208 return self.midi_event(PROGRAM_CHANGE, channel, instr)
209
210 def set_tempo(self, bpm):
211 """Convert the bpm to a midi event and write it to the track_data."""
212 self.bpm = bpm
213 self.track_data += self.set_tempo_event(self.bpm)
214
215 def set_tempo_event(self, bpm):
216 """Calculate the microseconds per quarter note."""

Callers 2

__init__Method · 0.95
play_BarMethod · 0.95

Calls 1

set_tempo_eventMethod · 0.95

Tested by

no test coverage detected