def write_Bar(file, bar, bpm = 120, repeat = 0): """Writes a mingus.Bar to a midi file. Both the key and the \ meter are written to the file as well.""" m = MidiFile() t = MidiTrack(bpm) m.tracks = [t] while repeat >= 0: t.play_Bar(bar) repeat -= 1 return m.write_file(file)
def write_Bar( file, bar, bpm=120, repeat=0, verbose=False, ): """Writes a mingus.Bar to a midi file. Both the key and the meter are written \ to the file as well.""" m = MidiFile() t = MidiTrack(bpm) m.tracks = [t] while repeat >= 0: t.play_Bar(bar) repeat -= 1 return m.write_file(file, verbose)