So now I can use python to access MIDI ports, send and receive MIDI messages in a cleaner way, with no need for ‘amidicat’ and pipes. Not sure yet if EV3 has enough resources for my “clean” python3 scripts to work as fast as my “dirt” pybricks scripts but it’s worth a try.
It also works with ‘multimidicast’ so ipMIDI:
$ ./multimidicast & $ python3 »»» import mido »»» mido.get_input_name() »»» port = mido.open_input('./multimidicast:188.8.131.52:21928 128:0') »»» for msg in port: »»» print(msg)
pressing a few keys on a virtual piano on my laptop routed to a ‘qmidinet’ port and this shows up on EV3’s python shell:
... note_on channel=0 note=81 velocity=77 time=0 note_off channel=0 note=81 velocity=0 time=0 ...
so a dancing robot (or a music guided robot) is now closer to happen.
‘mido’ also have it’s own client/server solution for networking MIDI messages but I still prefer ipMIDI since I intend to keep all coding on EV3 side.
Details on installation will follow soon.