(almost) Universal MIDI SysEx CC Programmer (and Sequencer...)

10,569

48

25

Introduction: (almost) Universal MIDI SysEx CC Programmer (and Sequencer...)

About: I am an arcade, synthesizers and arduino enthusiast that love to merge these three passions toghether... :D

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.

Sequence modes:

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.

Hardware list:

- 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://erha.se/~ronny/juno2/Roland%20Juno%20MIDI%2... (ENGLISH)

- http://www.2writers.com/eddie/tutsysex.htm (ENGLISH)

- http://www.chromakinetics.com/handsonic/rolSysEx.h... (ENGLISH)

- http://www.audiocentralmagazine.com/system-exclusi... (ITALIANO)

and some link for MIDI in general:

- http://www.music.mcgill.ca/~ich/classes/mumt306/St...

- http://www.music-software-development.com/midi-tut...

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 ;)

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

Be the First to Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Stone Concrete Cement Contest

      Stone Concrete Cement Contest
    • Go Big Challenge

      Go Big Challenge

    25 Comments

    0
    Mrsysex
    Mrsysex

    Question 1 year ago

    Hey nice project! I was wondering how do we combine the midi Cc messages from an external sequencer/midi controller with the messages sent from this controller? Like in terms of wiring? As a synth has only 1 midi in. Was trying to compare this to stereoping and their controllers have midi in and out to pass through the midi messages from the external sequencer.
    Thanks in advance

    0
    baritonomarchetto
    baritonomarchetto

    Answer 1 year ago

    Hello and sorry for the late reply. MIDI IN messages are supported by the firmware, so it is possible to have external MIDI messages entering the box and then reaching the synth. The MIDI IN circuit is documented in other instructables of mine

    0
    Funky Koval
    Funky Koval

    1 year ago

    Hi, after when I found and reading Your idea, this inspire me this for action.
    In yours tutorial was must have be very huge energy, whitch bend me to action, but I'm ultra lazy creature.
    So! This is my version. But right now, i was do only entire structure with hardware inside, without software, rest is work in progress. Will see. Cheers!.

    TP-77exploiter.jpg
    0
    baritonomarchetto
    baritonomarchetto

    Reply 1 year ago

    Nice indeed. If you manage to implement SY77 support to the firmware, please share with us so anyone will take advantage of your efforts (as you did with mine, and I did with those of other people before me)

    0
    Funky Koval
    Funky Koval

    Question 1 year ago

    ... and one more thing, is it possible to program your hardware to working as an arpeggiator too?

    0
    baritonomarchetto
    baritonomarchetto

    Answer 1 year ago

    It could, yes, but it's not implemented in the current firmware. Being the firmware open, in principle you could let it do whatever you want

    0
    Funky Koval
    Funky Koval

    Question 1 year ago

    Hello!
    I am so glad you did this tutorial and thank you very much for it! I have a question, is it possible with this equipment to control in REAL TIME all the synthesis parameters in my YAMAHA SY77?

    0
    baritonomarchetto
    baritonomarchetto

    Answer 1 year ago

    Hello, Yamaha SY77 is not supported by the current software because unfortunately I don't own a SY77. Anyway, if the synth can receive sysex midi messages (and I know it can) and is capable of real time parameters modifications (not sure about this), the sketch could be modified to support it.

    0
    like2upload
    like2upload

    1 year ago

    First off, thanks so much for this project. I am super happy with this!!
    I was just wondering, I would actually love to implement more controls, in fact I would like to add a pot meter for each control if possible. I know the Adruino MEGA has a limited amount of analog inputs. Would this project work by using a multiplexer to increase the analog inputs?
    Unfortunately I am a noob when it comes to Arduino programming so I do know really know what the code would look like but I am kind of curious to see if this would work in theory?

    0
    baritonomarchetto
    baritonomarchetto

    Reply 1 year ago

    Glad you found the project useful. Unfortunately, like you have argued, adding inputs calls for multiplexing which asks for a different programming and hardware modification.
    I am sorry

    0
    like2upload
    like2upload

    Reply 1 year ago

    No need to be sorry! Thanks for your reply.

    I am going to try to get this to work with multiplexer(s) and if I can get it to work I will post it if that's ok?

    0
    baritonomarchetto
    baritonomarchetto

    Reply 1 year ago

    Sure, share your code if you manage to get it working!

    0
    peterdobaj
    peterdobaj

    2 years ago

    oh, here's some pics of my build. waiting for the caps still and I need to label stuff but works perfectly!

    IMG_20200227_204455.jpgIMG_20200227_204631_1.jpgIMG_20200227_204641_1.jpgIMG_20200227_204723.jpgIMG_20200227_204743.jpg
    0
    baritonomarchetto
    baritonomarchetto

    Reply 2 years ago

    Nice! It will be even nicer with some old school "analog-like" knobs ;)

    Glad you had it working

    0
    peterdobaj
    peterdobaj

    Question 2 years ago

    Hi, finally got around to make this! Wanted to see how my alpha juno responds to this type of usage. Lots of wiring, made it with 8 pots and 8 slide potentiometers, and I made my own enclosure, so i'm pretty happy with this! (I'll post some pics later)
    As I'm pretty much a newbie at arduino programming, I'm trying and failing to understand the code. What I'd like to do is change up the order of controls. I'd like have parametr nrs. 27-33 (the envelope controls) on page 1, pots 9 through 16, for example. Is it possible, and where would I find this part of the code?
    Thanks so much for this project, I love the little box I built!
    PS: I've deleted this and reposted, since it wasn't showing up sometimes...?

    0
    baritonomarchetto
    baritonomarchetto

    Answer 2 years ago

    If your post don't show up, try refreshing the page. It happens to me that modifications to my own instructables are not visible otherwise :D

    it's actually possible to do what you are asking, but it's not a simple swapping of numbers. First of all, you must define a two dimensional array similar to that I made for the matrix 6 ("MX6Par[][]") where to define your MIDI CC's sequence, modify the a-juno part of the "controller()" function to have those parameters effective (look at the M6 part of the code) and swap "aJunoOffset" values accordingly.

    Let me know how it goes ;)

    0
    peterdobaj
    peterdobaj

    Reply 2 years ago

    yes! it worked! the randomizer stopped working, so I'll need to update that part of the code, but otherwise worked perfectly. thanks so much!
    edit: randomizer fixed!

    0
    synthopia
    synthopia

    2 years ago

    Thanks a lot for sharing this excellent useful piece of work! I have a JX8P and it works lovely! I looked into your code but as a complete noob I don't know where to start. I wonder if there's an easy way to: -add a button for every step putting the note on/off? -putting the note out of the sequence? -change direction of sequencer? -install a midi in for midiclock? Is all this possible, or at least the on/off switch for every note?

    0
    baritonomarchetto
    baritonomarchetto

    Reply 2 years ago

    Hi, an on/off switch for every note (I supposentou mean "step") is not necessary being that you can mute a step by turning the corresponding pot fully counterclockwise.
    About midi in: the code I uploaded first did not handle it, but the latest does. It's an undocumented feature. For the connection of midi in to arduino mega take a look at my other projects. Midi in clock is supported, but keep into account that it's on a preliminary stage and I am not 100% sure I will never be able to make it work properly.

    0
    synthopia
    synthopia

    Reply 2 years ago

    Hi, it would be a bit more playfull when you could press a button to mute en unmute the step. I'll scrutinize your other projects for midi in implementation. Thanks a lot!