I have a music studio and I'm searching for a way to turn a light on every time I start a recording. I am thinking about buying an Arduino device and start testing this, but before I do I need to know if it's even possible.
The only way I know I can do this from my software is by midi, I have some psysical devices that communicates through midi to start and stop the software. Both a mixing plate and a remote control.
All these devices is found as midi devices in the hardware manager. Is it possible to connect an Arduino device and get it as a midi device in Windows?
A workaround could be to install a midi port to the device, but if it's possible I think it's easier to connect directly to USB.
Yes. MIDI over USB is supported by
- all Arduino's that have native USB support in the main MCU:
e.g. Leonardo, Micro, Due, Teensy, Zero ...
- boards that have a secondary MCU for USB-to-Serial conversion (ATmega16U2/8U2, NOT FTDI chips or Chinese clones):
e.g. UNO, Mega ...
On other boards, like the Nano, or Chinese UNO clones without an ATmega16U2, you can still get it working, but it won't be Plug and Play: you'll need to have a software tool like Hairless MIDI running for it to work. This converts serial messages from the virtual COM port of the Arduino to MIDI.
On the first type of Arduino boards, you can use the MIDIUSB library. For Teensy, you can use the usbMidi libraries that come with the Teensy core.
On the second type (UNO/Mega), you can just use Serial.read/write, or use a Serial MIDI library. You'll then need to flash custom MIDI firmware to the ATmega16U2. I explained it here.
This approach is rather cumbersome, because you can't upload new programs to the Arduino while the MIDI firmware is installed, so I recommend buying an Arduino with native USB support.
Pieter