I'm currently trying to get an Arduino Zero to show up as a native USB MIDI device in my DAW (ableton). No matter what I try, I cannot get it to show up as a device in Ableton. I have previously used an arduino DUE for a similar project, but cannot get this to work the same. Is there something I'm missing to get the Zero to show up as a native USB Device?
Below is the code have written. I had assumed that the MIDIUSB library takes care of the arduino being recognised as a USB device.
#include <MIDIUSB.h>
const byte CHANNEL = 1;
const byte OFFSET = 48;
void setup(){}
void loop()
{
delay(100);
sendNoteOn(CHANNEL, 50 + OFFSET, 127);
delay(100);
sendNoteOff(CHANNEL, 50 + OFFSET, 0);
}
void sendNoteOn(byte channel, byte pitch, byte velocity)
{
midiEventPacket_t noteOn = {0x09, 0x90 | channel, pitch, velocity};
MidiUSB.sendMIDI(noteOn);
}
void sendNoteOff(byte channel, byte pitch, byte velocity)
{
midiEventPacket_t noteOff = {0x08, 0x80 | channel, pitch, velocity};
MidiUSB.sendMIDI(noteOff);
}
1 Answer 1
After extended trouble shooting and device manager fiddling, It turned out that Windows was auto installing the wrong (or partially wrong) drivers that made the native port not be recognised as a USB device. The device was detected as two different ports in the USB drivers, one of which had an error warning. I could still upload to it via either of the USB ports, just couldn't get it to be recognised as a MIDI device.
The solution was to:
- completely uninstall the drivers from the device manager
- uninstall the SAMD boards from the Arduino IDE
- manually download the drivers from github
- plug the arduino back in and install everything again as normal using those drivers
It now works like a charm.
Adafruit_Trellis
stuff from your posted code. If that doesn't make it work (and it may easily) the number of people here that can and are willing to replicate your problem skyrockets.