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)
| 105 | |
| 106 | |
| 107 | def 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 | |
| 121 | def write_Track(file, track, bpm=120, repeat=0, verbose=False): |
no test coverage detected