We are about to switch to a new forum software. Until then we have removed the registration on this forum.
What I would like to do, is use Processing as a virtual MIDI controller, so I can control my DAW (Propellerhead's Reason 7.1), based on the values of several integers. Is there a library that can help me do this? I've looked into Minim and Midibus, but they only seem to work with already existing MIDI controllers.
Answers
Sure can. You need to do three steps:
(1) Generate values. I guess you want to have on-screen buttons and sliders and faders and knobs and so on. There are some GUI libraries available that generate these. ControlP5 is probably a good bet, but you can do whatever you want, as long as you end up with a value between 0 and 127 for a controller number (CC) between 0 and 127 and/or a velocity value (again 0-127) for a certain key/pitch/note (yup, 0-127).
(2) Format and send this as a MIDI message using for example Midibus, with methods like sendNoteOn() and sendControlChange(). Until now that should be easy.
(3) Get these messages into your DAW. This is a bit more subtle as MIDI is devised as a hardware protocol. Some nerds at nerds.de figured out a solution: they created a virtual MIDI device called LoopBe that shows up as a hardware MIDI device in your programs (MidiBus, Reason etc) but is just software instead. It will send anything from its output port (or would that be its input port, as it accepts messages?) to its input port (which outputs messages) so if you configure LoopBe as an output in MidiBus, the messages you send through it should show up in Reason if you set LoopBe up as an input device there. Just install it and you'll see it's pretty straight forward.
It might be worthwhile to check out OSC - it doesn't need a virtual MIDI port, works over network (you can send a message to the same computer but you could also send it to other devices on the same network), is faster and has an essentially infinite command amount so you're not limited to 16x127 controls. I don't know how Reason handles OSC and it might not be fully equivalent to MIDI. There is a Processing library for OSC that works really well.
Reason doesn't support OSC, as far as I know :S But hey, this answer totally solved it :D Thank you!