Need Help - Arduino Due MIDI(native usb) into USB input of Akai Synthstation 49

First off i am brand new to arduino and coding. Zero experience. Just been following online tutorials and copy pasting others codes. Also been getting help from a very helpful person online but need some additional help.

So far i can get the arduino(using native usb) to interface and send midi cc to my computer just fine. the pots are working fine and controlling the appropriate CC’s. But the point of this build is not to connect to my computer but to connect the arduino directly to the input(USB-B) on the keyboard to control the ipad(and the synth apps that are installed on it).

Under normal circumstances you can send and receive midi just fine to and from your computer and keyboard with this USB-B input on the keyboard. And likewise the apps will receive and send too(while integrated with your computer and DAW)

But the keyboard will not receive info from the arduino if directly connect via usb. (Arduino Native USB → Akai Synthstation 49 USB-B Input)

I can successfully do this… Arduino—USB—>Computer(Running Ableton Live)—USB—>Akai Synthstation 49 — This setup will see the arduino pots successfully control the ipad apps midi cc’s

—Is this possible to run the arduinos midi straight into USB-B? Or should i go another route? I tried going the bluetooth route (bought a HM-10) but also running into issues with that(would be happy if someone has a solution to the bluetooth route). Or would a 5 Pin socket used with a usb to midi converter work?

heres the basic (very unfinished but working) code i am using…****

This is an example of the “Analog” class of the MIDI_controller library.
Connect a potentiometer to analog pin A0. This will be the MIDI channel volume of channel 1.
Map it in your DAW or DJ software.
Written by Pieter P, 08-09-2017


#include <MIDI_Controller.h> // Include the library

// Create a new instance of the class ‘Analog’, called ‘potentiometer’, on pin A0,
// that sends MIDI messages with controller 7 (channel volume) on channel 1
Analog potentiometer(A0, MIDI_CC::Channel_Volume, 1);

// Create a new instance of the class ‘Analog’, called ‘potentiometer2’, on pin A1,
// that sends MIDI messages with controller 6 (mod wheel) on channel 1
Analog potentiometer2(A1, MIDI_CC::Modulation_Wheel_LSB, 1);

// Create a new instance of the class ‘Analog’, called ‘potentiometer3’, on pin A2,
// that sends MIDI messages with controller 50 (cc50) on channel 1
Analog potentiometer3(A2, MIDI_CC::General_Purpose_Controller_5, 1);

// Create a new instance of the class ‘Analog’, called ‘potentiometer4’, on pin A3,
// that sends MIDI messages with controller 51 (cc51) on channel 1
Analog potentiometer4(A3, MIDI_CC::General_Purpose_Controller_6, 1);

void setup() {}

void loop() {
// Refresh the MIDI controller (check whether the potentiometer’s input has changed since last time, if so, send the new value over MIDI)

I don’t know off hand if this is possible, theoretical it should be but I don’t know if anyone has written software for this.

You have to understand there are two types of USB system, a host and a client. So in any USB connection must consist of one of each. So using what ever port on the Due you are normally having the Arduino act as a client. In all the software you have used so far the Arduino is acting as a client. What you need to do is two fold.

First you must get the Due to act as a USB host and second that host has to recognise a HID USB MIDI client. HID is a class of devices called Human Interface Devices.

So for example in order to get the Due to communicate with a keyboard or mouse it needs to be a host. There are further complications in that the type of connector used by a host is different to that used by a client and the Due only has client type USB connectors. So you couldn’t use a normal cable to connect the two.

You can get a cheap host interface board, or a host shield for an Arduino.
This is an example of one such board.

So now you have the right words for your searches for a soloution.

would a 5 Pin socket used with a usb to midi converter work?

No, the convert lead still needs to be connected to a host.

This .pdf might help you out: