I'm currently working on a script to convert MIDI inputs to Virtual Keyboard-style QWERTY outputs. The script I had was correctly working several months ago, but as of now is inexplicably failing to find any of my MIDI inputs.
I'm using the keyboard
, mido
, and mido.backends.rtmidi
modules to do this. mido.backends.rtmidi
runs off of python_rtmidi
.
I've spent a while debugging and researching, finding that mido.backends.rtmidi.get_devices()
returns an empty list ([]
), rather than the MIDI keyboard and loopMIDI virtual input I have set up. Both of these inputs are detectable by typical DAWs such as FL Studio and Ableton Live.
Researching the APIs further gives me the rtmidi.get_compiled_api()
method, which using the below code returns web
and Web MIDI API
. According to the documentation, this should return a string such as API_WINDOWS_MM
or Windows Multimedia MIDI API
.
The code in question:
for api in rtmidi.get_compiled_api():
print(rtmidi.get_api_name(api)) #outputs "web"
print(rtmidi.get_api_display_name(api)) #outputs "Web MIDI API"
Where am I going wrong? How can I get it to detect the inputs of my MIDI devices?