Arduino based MIDI Control Surface

I've done a tutorial on making an Arduino MIDI Controller, that works with Arduino Unos, Megas, Leonardos, Teensies, ...

It is important to know, however, that a MIDI Controller is not necessarily the same as a control surface:
Most MIDI controllers use simple NoteOn, NoteOff and Control Change messages to the computer. (Are you familiar with the MIDI protocol? If not, check out step 6 of my tutorial, midi.org, or just ask.) E.g. if you move the volume fader of track 5, it will send something like "Control Change, channel 5, controller #7 (volume), value = 127" (As hexadecimal MIDI messages of course: "B4 07 7F" ). You can then use MIDI Learn in your DAW to link it to the right control.

This communication happens in one direction only, from the controller to the computer. If you want your faders to follow your automation tracks, or if you want to see the 'mute' lights or VU meters on the controller, for examlple, you'll need two-way communication.
This is not supported by the standard MIDI Learn functions, however.
That's where a control surface comes in: they use proprietary protocols that are implemented by both the manufacturer of the device, and the maker of the software.
You can then select the right control surface from the menu, so that the DAW knows what protocol to use, and they can communicate back and forth.

Notice how I said 'proprietary protocol'; it means that it's only known to the manufacturer and the software implementors, so you can't create your own device that uses it ... That's the theory ...

In practice, you can, because there are some smart people who spent days trying to reverse engineer some of these protocols.

Some links I used:

http://www.midibox.org/dokuwiki/doku.php?id=mc_protocol_mappingshttps://www.frontierdesign.com/download/pdf/AlphaTrack/AlphaTrack_Native_1.0.pdf

I also included some documents that were no longer available online, but I still had them in my downloads folder. (rename the extension to .html instead of .html.txt)

These proprietary protocols are also built on the MIDI protocol, but they give other meanings to the messages.
This means you can use the basic principles explained in my tutorial, but just send different messages, explained in the docs. I got a mute button + LED and VU-meters to work with the Mackie HUI protocol and Mackie Control, so it is possible. (Most modern software doesn’t support the HUI protocol anymore, however.)
You could also take a different approach and use Open Sound Control (OSC), that I’ve only just discovered. It uses UDP over the local network (Ethernet or WiFi) or over a serial connection (SLIP). I got this working with my ESP8266 in Reaper, the basics are really simple, but the problem is that there isn’t really a predefined standard for audio control surfaces. Nevertheless, OSC is really powerful, and wireless communication can be an advantage.
That’s the software side of things, as for hardware, you’ll probably need an Arduino Mega (or maybe a Teensy 3.2), since one motorized fader uses a lot of I/O:
2 digital pins for the capacitive touch sensor of the knob
2 digital pins for driving the motor in both directions
1 PWM pin to control the speed of the motor
1 analog input pin to get the value of the fader
Some pseudocode:

if midi input = fader move
    if fader knob != touched
        calculate PID to move fader
        move it
    else
        send fader value
if current fader value != old fader value && fader knob = touched
    send fader value

To drive motors with a feedback loop, a PID controller is used, this is a topic on its own, so you can see it's not easy.

It’s a big project, but doable, and a lot of fun!
And if you are willing to learn, you can get a lot of help here on the forum.

Pieter

Mackie Control MIDI Map.html.txt (28.3 KB)

mackie control protocol.html.txt (53 KB)

MCkeyedimage.jpg