def write_NoteContainer(file, notecontainer, bpm=120, repeat=0, verbose=False):
    """Write a mingus.NoteContainer to a MIDI file."""
    m = MidiFile()
    t = MidiTrack(bpm)
    m.tracks = [t]
    while repeat >= 0:
        t.set_deltatime('\x00')
        t.play_NoteContainer(notecontainer)
        t.set_deltatime("\x48")
        t.stop_NoteContainer(notecontainer)
        repeat -= 1
    return m.write_file(file, verbose)
def write_NoteContainer ( file , notecontainer , bpm = 120 , repeat = 0 , verbose = False ) : m = MidiFile ( ) t = MidiTrack ( bpm ) m . tracks = [ t ] while repeat >= 0 : t . set_deltatime ( '\x00' ) t . play_NoteContainer ( notecontainer ) t . set_deltatime ( "\x48" ) t . stop_NoteContainer ( notecontainer ) repeat -= 1 return m . write_file ( file , verbose )
Write a mingus.NoteContainer to a MIDI file.