im working on a projectand i want to create a virtual midi input with python to flstudio (fruityloops)i have googled a bit but all the modules i could find was about creating midi files which is not my issue.
Edit 2011: Some things have changed in the last year. I recommend using Tobias Erichsen's driver, which allows you to create virtual ports and send data to them. If you can use a DLL, you can use his driver.
Now, how does this interface with FL Studio? I have installed LoopBe1 Virtual Midi Driver, and so when I run the above code the LoopBe Internal Midi device shows up. Similarly, in FL Studio I have enabled the LoopBe Internal MIDI device. Thus, when your python program writes to the device FL Studio reads it as midi input!
Alas, I did have some trouble setting up mido on my windows machine and so I thought I would give you a pointer. In order to read or write to midi devices you need to have a "mido backend" installed. On linux I simply followed the instructions on their installation page to install portmidi and it worked great.
However, for windows, I was having LOTS of trouble trying to work with portmidi or the other option. I finally decided to install pygame (3rd option) for windows and then set that as my backend using:
b37509886e