Introduction: (almost) Universal MIDI SysEx CC Programmer (and Sequencer...)
In the mid eighties synths manufaturers started a "less on the panel is better" process that allowed the reduction of costs on their side, but made the patching process tediuos if not impossible for the final user.
Manufacturers themselfs and third party companies realized optional boxes full of knobs and/or sliders to let you actually "play" with your synths tones, but these are silly overpriced nowadays... we are forced to find cheap solutions by ourself then ;)
This project came from my need to easily program patches on some of my synths (the first two being Roland Alpha Juno 2 and JX8P, for the record). Started as a barebone SysEx controller dedicated to those two synths, the project grow up on me and soon became something more complex, with other synths supported along the way (Korg DW8000, Oberheim Matrix 6/6R, SCI MAX) and a built-in sequencer.
In this instructable I will show you how to realize your own controller: a cheap tool that emulates those highly priced parameter control boxes and with some collateral feature someone could find useful (continue reading for details...).
Step 1: What Exactly This Thing Is (and What Is Not...)
The MIDI SysEx and Control Change controller here is essentially a 16 potentiometers and 4 buttons MIDI controller.
It is compatible with both System Exclusive (SysEx) messages (a type of MIDI message highly synth-specific and heavily used in the 80's) and common Control Changes (CC) messages.
By default supported synths are:
- Roland Alpha Juno (1/2)
- Roland JX8P
- Korg DW8000/EX8000
- Oberheim Matrix 6/6R (> 2.14 firmware)
- Sequential circuits MAX/SixTrak.
Being the open source nature of the project, it's very easy to support any other synth of your choice (see the code step for details).
The default sketch handles three "pages", for a total of 48 synth tone parameters.
You can download picture sheets with the 4x4 "layout" I realized for all the supported synths on this page: blue parameters are those you can tweak while on page 1, black those on page 2 and orange those on page 3.
The tone parameters layout with all those numbers could be confusing at first, but it's not "random" as it could look like: it follows the order of the manufacturer MIDI implementation chart. This was a design choice to keep the code simple, someway "universal" and keep the microcontroller memory free of waste data.
Even if the controller has no screen, toying with synths that show you what parameter is being modified in real time makes the process of creating a patch a joy. The JX8P and Matrix 6, in example, are capable of this. The Alpha Juno doesn't show you the parameter being changed and makes things a little bit harder, but creating awesome patches is definitely doable and easyer than by using the built-in knobless interface. DW8000 has only numeric displays, but you can see your tweakins in real time.
Please notice that classic control change messages are disabled by default, but actually coded.
What about those buttons there?
Well, the first one (upper left in my layout) is for page surfing: jump to the next parameter's page at each press of the button. LEDs will indicate which page you are in.
The second button (Callback) when pressed sends the patch you where working on back to the synth (figure it: you made the patch of your life, then touched a program button on the synth surface and the button-specific patch was loaded... all your work have gone!). With this button you can send all the values the programmer has memorized during the last patching process.
The third button is for the randomizer/patcher. Turn full anticlockwise the parameter knobs you want locked to minimum value (i.e. oscillator LFO, oscillator envelope, etc.) or turn fully clockwise to maximise the value and press the button to start he randomization process for all other parameters.
The fourth button (Mode) is used to cycle between patching mode and sequencer mode. Sequencer mode is described in the following step.
What about those LEDs?
There are 4 LEDs in corrispondence to each button. These LEDs have multiple pourpouses, but their main uses are:
1) in patcher mode, the first three tell you which parameters page you are in (one for each parameters page);
2) in sequencer mode, with a running sequence LEDs turn on and off depending on the actual sequence's measure.
Step 2: The "Hidden" 16 Steps Sequencer!
You can toggle between controller mode and sequencer mode by pressing MODE button.
While in sequencer buttons work differently and LEDs give you new informations:
- the first button (SHIFT button) when kept pressed allows for tempo, note lenght, channels and octave modification;
the tempo value is computed by the position of the first potentiometer, the note lenght from the second potentiometer position, MIDI channels from the third and fourth potentiometer positions and octave (-1 o up to +2) from the fifth pot.
Tempo ranges from 40 BPM to nearly 240 BPM.
In other words, while keeping SHIFT button pressed you can:
- set BPM by turning pot #1. By default tempo is set to 120 BPM and note lenght to quarter notes.
- set notes lenght to halfs note, quarter note, eights note, sixteents note by turning pot #2.
- set primary MIDI channel by turning pot #3.
- set secondary MIDI channel by turning pot #4.
- transpose the sequence by turning pot #5. The base notes range (from C2 to F#4) can be lowered of one octave or increased by one or two octaves.
- the second button Start and Stop the notes sequence.
If you change mode by pressing MODE button while running the sequence you will enter controller mode but the sequence will continue to run.
- the third button sends PANIC! (all notes shut off).
- the fourth is used to toggle between global modes (pather or sequencer) when shift button is not pressed, or between sequence modes (see the folowing modes list) when shift id kept pressed.
a - 16 steps mono sequence
b - 16 steps poly sequence: notes one octave lower than those defined by pots are triggered too (this obviously drains 2 voices per beat and will work with polyphonic synths only)
c - 8 steps poly sequence, dual channel: two parallel 8 steps sequencies are sent to two different channels (CH1 and CH2 by default); by setting the same channel value both on the primary and seconday channels you can have two parallel 8-steps sequences played by the same (polyphonic) synthesizer.
About LEDs: as soon as you enter sequencer mode, all four lights will light up. When you start the sequence, LEDs will follow the running sequence (or sequences). I placed one LED every four potentiometers and is good enought for me. It would be simple to modify the sketch to handle 16 LEDs, one for each step though.
The step sequencer code miss features someone could find necessary: MIDI sync IN, steps hold, CV out, etc...
I have implemented clock OUT, but is someway buggy. I tried two approaches for this (one with and one without timer interrupts), but they both where imperfect (or a total fail). MIDI clock must be strict-perfect to work on the long term. A clock signal is sent anyway and you can disable it directly on the sketch.
Step 3: Hardware and Building
After all these words, let have some fun!
We are going the common Arduino way. I used an Arduino MEGA because of the high amount of analog inputs (we want a box full of knobby knobs, won't we?! :) ).
In particular, Arduino MEGA can handle 16 analog inputs (with some hardware tweaking, i.e. by muxing, you can increase this but we are not going this route here), so we are going to send the 48 MIDI messages via 16 potentiometrs. Each potentiometer will then control three parameters, one for each "page"; pages are selected by a switch button.
- 1x Arduino MEGA
- 16x linear, single turn 10 K ohm potentiometers
- 16x pot knobs
- 4x momentary push buttons
- 4x LED
- 6x 220 ohm resistor
- 1x MIDI connector
- 1x ABS projects box
Some cable, solder wire and eight - ten hours of spare time.
I used a perfboard and some pin headers to realize a sort of shield I soldered the resistors on and directed the cables. This has the advantage of letting you take out your Arduino and use it for other projects (we all run low on Arduino boards at some point!). It's not mandatory anyway and another good approach could be to desolder the arduino MEGA pinheaders and solder cables directly in place.
To shape the box, I first applied some adesive paper on the box surface, measured whrere the holes should be drilled (I had 3 cm from hole to hole to let all the pots to fit) made the guide holes and then enlarged to the right size to let pots thread or buttons thread to pass with a mini drill. I spent more or less 2 hours to finish the box. I realized little holes too, and glued LEDs in place.
I also drilled a hole for the MIDI OUT connector and another for the arduino power connector (I used directly the built-in USB power connector and firmly locked the arduino MEGA in place).
WARNING: always ALWAYS wear eyes and hands protections while drilling: you are at risk both with respect to power tools and chips of material eroded/fired from the moving tool.
Then, I placed all the pots and buttons and soldered the components as per attached picture. An effective way to reduce the weight of the final object (and lenght of cables) is to daisy chain all the pots both on the 5V line and GND line.
And before anyone asks: I know, that box I used is ugly! But it was free and nothing beats free :)
Step 4: Wiring
Wiring things up is easy as wiring a potentiometer (x16), a push button (x4) and LED (x4) to an Arduino microcontroller board. All the Arduino basics are covered here :)
Attached is the wiring. Notice that:
- All analog pins are used (from A0 to A15), one for each potentiometer
- 4 digital pins (inputs) are used (from D51, D49, D47, D45), one for each button
- other 4 digital pins (outputs) are used for LEDs (D43, D41, D39, D37)
- MIDI out connection is very simple and asks for two 220 ohm resistors
- Buttons do not ask for pulldown resistors being that the sketch activates the internal Arduino's pullup resistors
- Each LED asks for a curent limiting resistor
Please, notice that the MIDI OUT connection in picture is FRONT view (not rear view).
Step 5: Software - Some Link to Theory
I am not going to explain the full theory behind System Exclusive or Control Change messages because there are plenty of good articles out there and it is silly to rewrite what has already been written.
Just some quick link for Roland SysEx implementation :
- http://www.2writers.com/eddie/tutsysex.htm (ENGLISH)
and some link for MIDI in general:
Step 6: Software - the Sketch
Here attached is the sketch you should upload to your Arduino Mega.
I tried to keep the programmer as "universal" as possible, meaning that i tried to reduce synth-specific pieces of code.
I tried to keep the code as simple as possible. Adding the step sequencer made things more complex and the code more messy, but it was worth it for me.
Keeping the code "universal" is why the controller layout is so "random": it follows the parameter order of the MIDI implementation chart synth Manufacturers defined in their manuals. It could be confusing at first, but you will be used to it very fast.
The default code/sketch/firmware supports "only" 48 parameters (three pages of 16 knobs each) so it could not be possible to control all the MIDI messages supported by your synth (think to at an Access Virus or Novation Supernova: they accept more or less 110 MIDI compliant parameters). You can easily change the sketch to support more messages, but probably this is the pojnt where a software programmer comes more handy than a hardware programmer given the high number of variables.
Actually SysEx messages compatible with Roland Alpha-Juno, JX8P, Korg DW8000 and Oberheim Matrix 6 are supported. I left the code for Juno 106 compatible messages in case you are in the need for that, but they are disabled by default.
For Matrix 6, I had to select the parameters to control. I left out the third envelope, the second ramp and something else. The matrix cannot be controlled via MIDI anyway, so it's mandatorily left out. For it to accept external MIDI messages, you need one of the latest firmwares (ver. 2.14 or up) and you should set the "Master -> Sysex Enable" parameter to "3" from the front panel.
All listed synths are enabled by default, so the programmer sends all the MIDI messages, one after the other. If you have more than one of the listed synths connected (i.e. via MIDI Throu box) you should disable undesired messages directly on the sketch.
Clock out is someway buggy (clock must be strict-perfect to work as it should and probably the two approaches I adopted where not effective). By default it is disabled.
The code includes comments, so there's no need for a detailed description here.
As always: remember that I am not a coder in real life and for sure there are better ways to code what we are in the need for here. If you are a coder and have suggestion, you are welcome! Please send me any variation that can increase the code's efficiency/effectiveness and I will include it to the main sketch (citing the Contributor obviously!).
I always learn something new by reading some good coder's code ;)
My projects are free and for everybody. You are anyway welcome if you want to donate some change to help me cover components costs and push the development of new projects.
>>HERE<< is my paypal donation page, just in case you would like to contribute ;)
Step 7: Related Projects
As far as I know, there's not a MIDI parameter controller and sequencer out there (maybe the old Behringer BCR2000 with a modified firmware?)
anyway, if you are not prone to realize a box like this but very interested in cheap solutions to control your synth parameters remotely, consider these other alternatives:
- CTRL MIDI editor: this is a brilliant, free open source program running on win/Linux/mac that can turn your PC into a full controller for SysEx synths
- David Konsumer's "junosex" CC converter: this project asks for minor hardware work on your side and the idea is great - an arduino based CC to SysEx converter that let's you use a common non-SysEx MIDI controller (i.e. an AKAI MPK master keyboard) to speak with your SysEx-ready synth