electronics, linux, music, ...

Standalone MIDI controller

While a Ctrlr MIDI controller is OK to use to control software, if someone wants to use it to control hardware equipment it will not be easy and elegant at all. It is because Ctrlr uses computer program for configuration and sending MIDI messages. Ctrlr is basically designed to be used both as a standalone and in combination with computer (it's just a matter of firmware - Arduino code), but I never found time to do it as I actually don't need a standalone MIDI controller.

But a cool guy named Luc Ambry has made a standalone version of Ctrlr. It uses same hardware and everything is connected exactly the same as in original version except the bank switches are on pins 11 and 12.

He also built an awesome looking hardware for it. It can be seen on pictures below.

Luc gave me permission to publish his code and images. The code can be downloaded from here. MIDI messages are defined in code.

Here are few words from Luc about his design:

So we have:
- 8 switches that can send as much program changes and MIDI notes as you want, on as much midi 
  channels as possible .
- 6 control change messages on midi channel 1. (maybe I will work on it to be able to choose
  different midi channel for every control change ).
- 2 change bank switches (up and down)
- 9 banks that you can scroll quickly holding down up or down switch.You can add much banks as 
  the Arduino memory is able to accept .
- 1 LCD screen that display bank number and the action you choose for every 8 switches .

luc's device luc's device luc's device luc's device luc's device


  1. Hi. The Ctrlr is exactly what I need :) I got Arduino UNO R3 and tried the code, but I get an error while loading the script: midi_controller.ino: In function 'void midiSend(char, char, char)': midi_controller:95: error: 'BYTE' was not declared in this scope Any idea how to solve this? I have no experience in programming at all... Thanks, Marcin

    — by Marcin on Sat, 24 Nov 2012

  2. Hi Marcin, try replacing all lines that look like Serial.print(something, BYTE) with Serial.write(something). If that doesn't work try Serial.write(byte(something)).

    — by igor on Sun, 25 Nov 2012

  3. Yes, Serial.write(something) solved the problem. :) Thanks a lot Igor.

    — by Marcin on Mon, 26 Nov 2012

  4. Hi, since I'm using tensy+2 and I have more pins, I would like to use a standard lcd. what code lines should I modify to get this? thanks, Domenico

    — by domenico on Sun, 10 Mar 2013

  5. domenico, if you are using teensyduino on your teensy board you can use standard arduino LCD library (http://arduino.cc/en/Tutorial/LiquidCrystal).

    — by igor on Tue, 12 Mar 2013

  6. hi igor could you please help me to understand what part of code should I modify ? thank you

    — by domenico on Wed, 13 Mar 2013

  7. well.. in this project lcd is controlled using the software serial. so basically you need to change every line that contains swSerial. apart from the setup (in which you need to tell LiquidCrystal library to what pins you have connected your LCD - see the tutorial), lines that look like swSerial.print("?x?y") should be replaced with lcd.setCursor(,). other swSerial.print(*) statements you probably can just replace it with lcd.print(*).

    — by igor on Thu, 14 Mar 2013

  8. It works!!!!!!!!!!!!!!!!!!!!!!!!!! thank you very much igor !!!

    — by domenico on Sat, 16 Mar 2013

  9. this stuff is great! It would also be better if you could name each program change/ control change on fly, any ideas about this?

    — by domenico on Sat, 30 Mar 2013

  10. so you want to change MIDI messages while it's running? look at the Ctrlr controller (http://hyperglitch.com/articles/ctrlr). note that it is pretty similar design to this one except its MIDI events are defined in the software running on the computer (running linux) so you can define put various MIDI messages for one key while it's running (and save presets). downside is that you need a PC for that (i made it for controlling software effects so it's not a big deal to me)

    — by igor on Sat, 30 Mar 2013

  11. I would have a stand alone system that could be able to change and store preset names with some buttons. this system would also be able to be programmed without the use of a PC assigning for example control changes to each switch

    — by domenico on Sun, 31 Mar 2013

  12. that is also possible but it would require some more work.. arduino (and teensy also) have eeprom inside which can store some information so that is where presets could be saved ant it's not that hard to do. user interface for editing presets would require some more work

    — by igor on Mon, 1 Apr 2013