Arduino based MIDI Control Surface

Firstly, I outta state that I'm pretty new to the world of micro controllers and such like, but now that I've had a look around I'm mighty keen to get building. And since my old M-Audio ProjectMix I/O has finally kicked the can, I figured I might try to build some kind of control surface with motorised faders to replace it as there aren't many options on the market at the moment, except for the rather pricy Avid Mix series.

Now I expect this won't be an easy build, but I've spotted a few tutorials around the web suggesting it's certainly possible (http://blog.codyhazelwood.me/midi-control-with-an-arduino-and-a-motorized-fader/ https://motorizedfader.wordpress.com).

Has anyone completed something like this?

Would it be possible to make use of parts like motorised faders from the ProjectMix to build the new control surface?

As for the ProjectMix's condition - the Firewire connection no longer works and the Phantom Power blew a few years back, other than that, it's in great condition.

Firstly, I outta state that I'm pretty new to the world of micro controllers...

Have you done any programming or do you have any electronics experience? This is a big first-project but it's simplifies things a lot if you can re-use the motorized faders and other mechanical parts. And if you have some software & electronics experience it should be manageable.

If you're new to all of this stuff, it's probably going to take you a few months...

Would it be possible to make use of parts like motorised faders from the ProjectMix to build the new control surface?

Probably. But, you'll need to identify the type of motor and it's voltage. I assume it's a DC motor with a worm gear. But, there's a chance it's a stepper motor and even a slight chance it's a servo. If it's only got two wires (or two wires and a ground) it's a DC motor.

If the motors are not marked and the thing is so-dead that you can't measure the voltage, just do some experiments... Apply 6V and see what happens. If it doesn't start or it moves too slow try 9V, etc.

You'll need to count the number of required inputs/outputs. You can "expand" the inputs/outputs with multiplexing & matrixing if necessary, but you'll probably need the Arduino Mega. (DC motors require a driver circuit 2 outputs in order to be reversed. Stepper motors also require 2-outputs and a driver circuit, and more software. Servos require only 1 output, they come with the driver built-in, but they also require special software.

Processing power shouldn't be an issue since MIDI is running closer to human speed than computer speed (or audio speed). And, you shouldn't need a whole lot of memory either.

Would it be possible to make use of parts like motorised faders from the ProjectMix to build the new control surface?

Hi i have created a Midi controller. but i did not do it with Arduino. look for Midibox its a modulair system to create a midi controller and it has realy everything and more. to create a nice midi controller.

but back to the arduino. yes yuo can controll your moterized faders on arduino. you can use the L293D to controll the motor. (as far as i know they work with magnets or DC motors. never seen them with steppers)

you can use the fader for feedback so the controller knows where the fader is. but thats also the biggest issue. you need to create something (dont know how its called again) when the motor overshoots his position it needs to go back. but when you do this to preciese the controller keeps adjusting the fader(also a analog value jumps all over the place.). and thats the hard part you need to create something that fades the fader to his position without adjusting to much.

Thanks for the replies folks.

@DVDdoug - I've got some programming experience, nothing too heavy, but I reckon I've got enough to get by and if required I'm pretty quick to pick it up as I go along. As for electronics, I'm pretty much a beginner, I mean I've fixed the electronics in my electric guitar, soldered some dodgy audio cables, fiddled with my Makey Makey and played around with a Raspberry Pi, but nothing that's requires too much thought. I know this is a meaty project, but I'm happy to roll with it, even if it does take a few months. Regarding the type of motor and voltage, I'll need to crack it open and take a look as I can't find any schematics for it. Unfortunately I don't think I'll have time for this today, but I'll report back when I do. I sure appreciate all the info you've given me, it's mighty helpful!

@spirit - That's awesome! I bet it feels nice to have your own customised controller yeah? I'll certainly have a look at Midibox and the L293D. And that's some great advice regarding the faders, thank you. Did you come across any major challenges when building yours?

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://forum.cockos.com/showthread.php?t=101328
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

Gee thanks PieterP, that's a wealth of info for sure. I've had a look at your tutorial and it's really fantastic, high fives for that! For myself, it's definitely a control surface I'm after, having the faders remember their place when loading up different mixes is very important to me, VU meters would be a bonus.

I reckon my first decision is whether to go with Arduino or Teensy. I've heard they'd both work, but not quite sure which would be best for the job.

pistachio_joe: I reckon my first decision is whether to go with Arduino or Teensy. I've heard they'd both work, but not quite sure which would be best for the job.

I think a Teensy 3.2 would be a great board for this project, it has 34 I/O pins, of which 21 are analog inputs, and 12 of them are pins for touch sensors as well. It has a lot of RAM and flash, and a really fast 72-96MHz ARM processor. Another advantage is that all pins have interrupt capabilities, meaning that all of them can be used to connect rotary encoders.

Also, it's only around €20, while an Arduino Due costs around €36. The Due has 54 I/O pins, but only 12 analog inputs, and no touch sensing pins. It has more memory, but that's not really necessary in this case. Processor speed is 84MHz. All digital pins have interrupt capabilities as well.

@PieterP well that’s a no brainer then, thank you. I shall make up some plans and figure out what parts I’m gonna need.

Thanks for all your help folks. I’ll no doubt be back again real soon :wink: