I have the midi file specification which I’ll port to python friendly code.
Anyone know how to stream midi? I can output to a file but I’d like to generate midi on the fly and have it play through garritan personal orchestra or similar.
Hi @adri123 - is this question related to the use of Sonic Pi in any way? If not, and it’s just specific to Python, then someone on here may be able to help out, but you’re going to have much more luck on Python-focussed forums
Happened to kind of playing around with the idea of streaming MIDI to Sonic Pi.
Maybe you can try this:
MIDI to XML for Sonic Pi using Processing
But I think you can also use Python MIDO module and RTMIDI to send MIDI message into Sonic Pi. Seems to do the job, although MIDO can be a bit slow somewhat. It works cool though.
You’ll need to tell Sonic Pi to listen on your virtual port for incoming midi. It’s up to you to control when the messages (e.g. NoteOn and NoteOff) are sent so that notes begin and end at the appropriate times.