Overview
The goal of this project for me is to learn more about midi protocol, and venture into ableton live remote midi scripts.This is a basic transport controller for ableton live, but it can be used for any DAW if you manually map the controls to the CC numbers sent by the arduino.
The downside of using the arduino nano is that it uses a usb to serial chip to be able to program the atmega328p. As a result of this it requires the use of a serial to midi bridge to be able to communicate with midi devices. I used Hairless MIDI < - > Serial bridge to do this, which can be found here https://projectgus.github.io/hairless-midiserial/.
If using windows you will also need some sort of virtual midi port to be able to route the midi messages to ableton, the one I use can be found here http://www.tobias-erichsen.de/software/loopmidi.html. I only use windows so I'm not sure what needs to be done for mac or linux.
The next version I work on will use atmega328u4 which has native usb, this allows the unit to be connected as a usb midi device, which eliminates the need for the hairless midi bridge. The aim is to also have the microcontroller incorporated into the same circuit as the other components rather than having the pcb as an arduino hat like it currently is.
Bill of materials
- 6 x Momentary buttons
- Arduino nano
- 7 x Leds
- 10 x 10k resistors (button pull down resistors)
- 7 x 1k resistors (led current limiting resistors)
- Optional dip switch (sets midi channel)
Code
The code is relatively simple, with push button input being translated into serial midi data. The leds are essentially driven by a simple state machine. The loop, and record arms can be independently set from all the others, but the play and stop leds can only have one lit at any one time. The master midi channel is determined by the binary value set on the dip switches. This can easily be hardcoded if you would prefer not to include the dip switches.
Stemming from the fact that this is only a small project, and requires only cc midi messages I decided to forgo the inclusion of a whole midi library. Instead of using a library I wrote a function that would send basic cc messages.
CC numbers
- 0 : Stop
- 1 : Play
- 2 : Record arm
- 3 : Toggle looping
- 4 : Rewind
- 5 : Fast fwd
Ableton User Configuration Script
Premade ableton user configuration script is in the main github repository, but I've added a link below to instructions if you want to make your own.https://help.ableton.com/hc/en-us/articles/206240184-Creating-your-own-Control-Surface-script
If you want to make your own user configuration script, these are the changes you would have to make to interface with this particular arduino script.
[TransportControls]
# The transport buttons are also expected not to be toggles.
StopButton: 0
PlayButton: 1
RecButton: 2
LoopButton: 3
RwdButton: 4
FfwdButton: 5