Introduction: Arduino MIDI Controller for Aalto

Being an amateur musician, I often go from Analog Synths to VSTs.

When I'm in the "VST" mood, I'm really into one amazing instrument: Madronalab's Aalto VST

This incredible VST is very flexible, it generates very good sounds and is pretty easy to use for a reasonable price.

My limitation of VSTs, however, is that I can't really touch the controls and I have to use my mouse/trackpad while I jam - not the best. I own a MIDI controller but knobs don't reflect the real Aalto interface.

On the other hand, with modular or semi-modular synths you can't really save your patches which makes the whole thing a little frustrating to me.

So I wanted to create a Custom MIDI controller for Aalto with a design that reflects Aalto's interface to control the most relevant things.

Follow me on Instagram to see more videos of the process: weirdest.worry

Me, on Spotify:


- 1 Arduino Mega
- 14 Potentiometers (I used those ones -> PTV09A-4020F-B103)
- A breadboard for prototypes
- I really recommend Electro Cookie perfboard which is very good for soldering (the blue one in the image) - Plywood
- Soldering Iron
- Copper Tape
- Jump wires

Step 1: Design Your Own

Starting from the interface of my VST, I wanted to wireframe my layout with some paper to find the perfect fit.

I have then design that with a software, printed it, and glued that to a cardboard prototype to see if the layout might work in the real world.

This step is really up to you - you can design it for a tin box or a matchbox: my recommendation is to prototype as much as you can.

Making the plywood case matching the electronics boards and using perfboards is not the most precise thing ever: the more you test the better is.

Step 2: Soldering and Wiring

When your design is complete, you can go for electronics!

Note: I'm assuming you kind of know how those stuffs work so I won't go into details of soldering and connections.

In this phase I used 2 different perforated boards for three separated circuits: the yellow-ish one is probably the most common. I don't like it much but I had a spare one so I wanted to use that anyways.
The blue-ish one is way better and I really recommend to use that one instead if you're a beginner as I am.

In the yellow-ish one holes are very, very small and copper is just on one side around every single hole, solder won't flow through the hole.

To design the traces on this board, I decided to go for 5mm copper tape: I cut it in half but it was a terrible idea. Since it's very light is terrible to handle and both GND and VCC might not be distributed properly. It required a lot of testing and fixing and it took a very long time.

But hey, it looks very good at the end.

Making the wires running around is a little painful: finalising this board is probably the thing that took most time.

Using the blue perfboard (called Electro Cookie on Amazon) was way better: it is connected like a breadboard, you can avoid using copper tape since pins and wires are already connected when soldered on the same block.

Also, you can snap it with your hands into smaller pieces which is terribly better.

Holes are bigger and coated in copper which makes soldering super quick and clean.

It took 3-4 days to do the first yellow-ish board, only few hours to make the other 2.

Note on potentiometers
As you can see I had to bend pot feet - those are meant to be used on PBCs and are not really the best in this case. However, bending their feet to the right angle made them very stable.

Step 3: From Hardware to Software

Now you have all your things connected and hopefully you did your tests to check your Vcc and GND are ok.

Potentiometers are probably the easiest thing to start with on Arduino.

They have three pins: one is for GND, one is for 5V. The central pin is some sort of "output" of the potentiometer. If you connect GND to the left pin, 5V to the right pin and you turn the pot clockwise, you will see the value increasing on its "output" between 0 to 5V.

The central pin goes to one of the "analog inputs" of Arduino which will sample the value and it will translate it into a digital number: Arduino Mega 2560 translate the values from 0 to 1023 (it will give a 0 when the pot is all the way through the left, 1023 when is all the way through the right, 5V).

Keep in mind that MIDI accepts values from 0 to 123 so you will need to divide Arduino value by 8 before sending the integer value via serial.

It looks very simple (and it is) but there are a few of things to keep in mind:
- oftentimes pots are not super precise: their output can randomly jump to the adjacent values, triggering unwanted CC commands
- your circuit (well, mine in this case) isn't perfect: since is not a PCB you can have random values here and there so, again, random values.
- you don't want to send MIDI CC values all the time or your DAW will probably clog so you need to find a solution to avoid this

My code is written to tackle the three points above and it does it pretty well.

Step 4: How MIDI Works

MIDI is a very old protocol, designed and created to make computers and instruments work together.

There's a comprehensive explanation of how MIDI works: when it comes to sending notes, there are tons of signals you can send but in our case, everything is very simple.

We work with Control Change (MIDI) so we need to use one of these channels reported on this table:

from 176 to 191.

When you send MIDI/CC values you have to send via serial:
- the status byte (first column of the table) to tell your DAW you'r sending a CC
- which control - in this case, which KNOB - is sending it (integer number)
- the value of the control

In my case I have 14 knobs so a message might be:


Knob 13 is sending 107 value via CC.

MIDI accepts values from 0 to 123 while Arduino reads analog values from 0 to 1023 - just remember to divide by 8 before sanding the value.

Step 5: How Send MIDI Over USB on Arduino

You have 2 options to send MIDI over USB with Arduino:

  • flashing an internal Arduino USB controller (recommended at the very end of your project)
  • leaving Arduino stock and use a software on your PC (this one) VERY RECOMMENDED

Flashing Arduino USB Controller is not the most convenient way to prototype: when you flash the firmware to send MIDI over USB, Arduino won't receive any new code to upload, so if you want to update your code, you have to flash the firmware to the stock version.
So, for example, your Arduino is stock and you upload the code.
You flash it to make MIDI work.
Unplug it.
Plug it in.
You test the code.
It doesn't work.

You flash it back to stock.
Amend the code.

The only Pro of this is that you don't have to use any external software but I recommend to use this method only at the very end of your project.

In the other hand Hairless is super easy to use because you don't have to flash anything - if you're on a Mac it works perfectly with MIDI Setup and your DAW will recognise it immediately as "hairless midi controller".

Much, much better.

Step 6: Coding Time!

Not much to say here as I posted my code on Github and I've commented the code as much as I could.

Just remember some fundamental things:

  1. Electric values my fluctuate
  2. you don't want to flood you DAW with unnecessary CC signals
  3. You don't want to send duplicate CC message

In my code everything is explained and you can find it here

Step 7: Put Your Things Together

Now your code is working and the only thing you have to do is put your things together.

This will require some wood skills I don't have (luckily my wife helped me in the process) so I can't really give advices but if you decided to use perfboards you will have a very clean and uncluttered work.

Now plug your USB, open your DAW and drop some bass!