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

Function write_Bar

mingus/midi/midi_file_out.py:107–118  ·  view source on GitHub ↗

Write a mingus.Bar to a MIDI file. Both the key and the meter are written to the file as well.

(file, bar, bpm=120, repeat=0, verbose=False)

Source from the content-addressed store, hash-verified

105
106
107def write_Bar(file, bar, bpm=120, repeat=0, verbose=False):
108 """Write a mingus.Bar to a MIDI file.
109
110 Both the key and the meter are written to the file as well.
111 """
112 m = MidiFile()
113 t = MidiTrack(bpm)
114 m.tracks = [t]
115 while repeat >= 0:
116 t.play_Bar(bar)
117 repeat -= 1
118 return m.write_file(file, verbose)
119
120
121def write_Track(file, track, bpm=120, repeat=0, verbose=False):

Callers 1

midi_file_out.pyFile · 0.85

Calls 4

play_BarMethod · 0.95
write_fileMethod · 0.95
MidiTrackClass · 0.90
MidiFileClass · 0.70

Tested by

no test coverage detected