Sep-17-2020, 09:58 AM
(Sep-17-2020, 08:05 AM)cnull Wrote: Does this work right?
def songplay(song): with outport as output: try: midifile = MidiFile(song) while True: for message in midifile.play(): output.send(message)
Yes, in fact his is the code, actuall I have an expet KeyboardInterrupt ... but yes it Works
def songplay(song): with outport as output: try: midifile = MidiFile(song) while True: for message in midifile.play(): output.send(message) except KeyboardInterrupt: print() output.reset()