rtmidi-python icon indicating copy to clipboard operation
rtmidi-python copied to clipboard

[Neighboor topic] MIDI files

Open josephernest opened this issue 11 years ago • 0 comments

This is not a rtmidi-python issue, but rather a research for a feature close to rtmidi-python.

What neighboor Python module can we use for reading/playing MIDI files ?

An interesting feature would be that MIDI files could be played by generating MIDI messages that could be handled by the same MIDI callback than rtmidi-python :

def midicallback(message, time_stamp):
    messagetype = message[0] >> 4
    messagechannel = (message[0] & 15) + 1
    messagenote = message[1] if len(message) > 1 else None
    playthenote(...) 

==> Thus receiving MIDI message in realtime by an external MIDI hardware (via rtmidi-python) or receiving MIDI messages by a played MIDI file would be managed by a unique system. This would be really great !

josephernest avatar Feb 21 '14 21:02 josephernest