I've spent days trying to send MIDI data from an Arduino (Diecimila) to Max/MSP on my Windows 7 laptop. There is a load of information out there on this, but a lot of it is convoluted and outdated. I finally got this working today, so I thought I'd share my configuration with others:
- In my code, I'm using MIDI Library. I'm sending note-on messages and control change messages with my data every 100ms. That's not an ideal rate, but it works for my purpose for now.
- My Arduino is connected to my laptop via USB.
- The first utility I'm running on my laptop is LoopBe1, which is a virtual MIDI driver. It provides a virtual MIDI input and output. MIDI messages sent to the input are repeated at the output.
- The second utility I'm running is S2MIDI, which sends converts serial data into MIDI. I have the COM port set to the virtual serial port the Arduino is connected to, the baud rate set to 31250 (standard MIDI baud rate) and the MIDI output port set to "LoopBe Internal MIDI" (you need to run LoopBe1 first in order for this to show up).
- Finally, in my Max patch, I am set-up to receive MIDI from "LoopBe Internal MIDI". I'm using the "ctlin" object to get access to my control change data.
Let me know if you have a simpler configuration. Using two utilities is definitely not ideal or necessary. A lot of people recommend MIDI Yoke, but I couldn't get it to work at all.