0

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);
}
7
  • 1
    What OS and hardware are you using?
    – Majenko
    Oct 9 at 23:00
  • Windows 10 PC. Intel 6700k cpu. Oct 10 at 0:01
  • 4
    what is windows detecting when you plug in your device?
    – jsotola
    Oct 10 at 0:09
  • 2
    Remove all of the 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.
    – timemage
    Oct 10 at 10:07
  • Check windows device manager and see if it is actually detecting a MIDI device or just a simple CDC/ACM one. If Windows detects it as MIDI then the problem is with your DAW not liking it. If Windows is not detecting it as MIDI the problem is your code or the MIDI library.
    – Majenko
    Oct 10 at 11:26
0

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:

  1. completely uninstall the drivers from the device manager
  2. uninstall the SAMD boards from the Arduino IDE
  3. manually download the drivers from github
  4. plug the arduino back in and install everything again as normal using those drivers

It now works like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.