Arduino USB MIDI Mux Step Sequencer

This post revisits an older project – the Arduino MIDI Mux Step Sequencer.  Or more specifically, part 2 of that project that used an off-the-shelf 16-potentiometer shield for an Arduino Uno.  Except this time, I’ve paired it with the “upgrade” to my Arduino Uno to make it USB MIDI compliant.

Warning! I strongly recommend using an old or second hand keyboard for your MIDI experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • 16x 10k potentiometers
  • 1x 75HC4067(or similar) 16 port multiplexer chip or breakout module
  • Breadboard and jumper wires

The Circuit

ArduinoUSBMIDI16MultiStepSequencer_bb

It is quite possible to use a multiplexer breakout board and 16 potentiometers on stripboard as described in the original project here.

But having reprogrammed my Arduino Uno to be a MIDI class compliant USB device, I wanted to use my “potentiometer shield” from KLONECOM as described in the “advanced” section of part 2 of that previous project.

IMG_5971

It is pretty much exactly the same as the breadboard equivalent, but has a PCB with with sixteen pots arranged in a 4×4 grid and a cheap HC4067 breakout module and Arduino pin headers underneath.  Consequently it makes for a very neat, self-contained module and when paired with a USB MIDI Arduino Uno makes for a relatively simple USB MIDI controller.

One particular advantage is that I only need a single USB cable for both power and MIDI.

IMG_5970

The Code

This uses exactly the same code as for the Arduino MIDI Mux Step Sequencer – Part 2.  Recall that the nice thing about reprogramming the Uno’s USB interface is that it becomes a “MIDI co-processor” on the end of the Arduino’s own UART link, so the Arduino code is just talking MIDI to the serial port as normal and all the “USB magic” happens for us automatically.

The following code configuration changes are required to the original code on GitHub to make it work with the KLONECOM module:

#define NUM_POTS 16
#define MIN_POT_READING 4
#define MUX_POT A5
#define MUX_S0 2
#define MUX_S1 3
#define MUX_S2 4
#define MUX_S3 5

I’ve also reduced the delay in the main loop to 125mS down from 250mS just to make it cycle a bit faster.  It might be worth cutting the MIDI note range down a little too.  At present, it covers quite a wide range which makes any fine tuning quite difficult.

Closing Thoughts

This makes for a really neat, single-cable for power and data, 16-pot MIDI controller.

In the video I’m using it as a simple sequencer playing my “bare metal Raspberry Pi mini synth“.  But I’d really like to use the pots to control the synthesis parameters for the synth to allow the voices to be changed without needing a mouse.  I might look at that next.

Kevin

Leave a comment