MT32 Clumsy MIDI Simple MIDI Filter

My MT32 Clumsy MIDI Program Changer and Filter was a little disappointing, in that it didn’t seem to be able to keep up with the MIDI stream for my Lo-Fi Orchestra, so I thought I’d try for a simpler version using the 5V/16MHz Arduino Pro Mini without the extras for selecting the MT32Pi voice to use.

This is the result.

IMG_5051

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

If you are new to MIDI and microcontrollers, see the Getting Started pages.

Parts list

  • Raspberry Pi v3 or v4
  • Clumsy MIDI interface (will need some modifications – see below)
  • PCB mount DPDT switch
  • 5V/16MHz Arduino Pro Mini
  • 40 pin 2×20 extended RPi header
  • Protoboard, headers, and jumper wires

The Circuit

MT32-Pi Contol-5v_bb

This is a very similar circuit to the MT32 Clumsy MIDI Program Changer and Filter using similar principles, but it is greatly simplified by:

  • Leaving out the potentiometers, switches and second screen.
  • Mounting the Arduino Pro Mini on the top.

Features of the circuit:

  • There is a switch to disable the RX/TX connection to allow programming of the Arduino via the programming headers.
  • There is a jumper to disconnect the Clumsy MIDI In from the Pro Mini RX to allow me to use a 5V serial signal from elsewhere (e.g. another Arduino or external MIDI interface) if required.
  • It still passes the Clumsy MIDI screen through to the upper layer.
  • As I’m now using a 5V Arduino Pro Mini, its serial output needs level shifting down to the 3.3V expected by the Raspberry Pi.

The level shifting is performing using a simple resistor divider as follows:

Arduino 5V TX —- 2.2kΩ —-+—- 3.3kΩ —- GND

The middle point between the two resistors can be linked to the RPi 3.3V RX.

This is still meant to be used with the same modified Clumsy MIDI board as used before, but to summarize:

  • It is wired for MIDI Thru not a MIDI Out.
  • The display is replaced with header pins to connect to the upper board.
  • The link between the MIDI In optoisolator and the RPi GPIO pin is broken.
  • An additional header pin passes the MIDI In signal up to the upper board.

The new upper board starts with a shaped protoboard once again as shown below.

IMG_4978

I built it in the following order:

  • Start by lining up the boards and drill the mounting holes before any other components are added.  Make sure the GPIO header holes will line up with the pins below.
  • Then fit the headers for the Arduino – I used pins as I’m going to solder the Arduino down, but you can use female headers and plug in the Arduino if you wish.
  • Add the switch and 3-way jumper.
  • Add the two resistors and connecting ground and signal wires.
  • Temporarily add the extended header without soldering in order to test the positioning of the board.
  • Bend and position the pins for the display and RX signal from the lower board.  When you are happy with the height of the board, this can be soldered on as can the GPIO header.
  • Add the remaining connecting wires to the GPIO header (5V, RX, GND) and the MIDI In signal from the lower board.
  • Finally if you are happy with everything so far you can fit the Arduino and test it.

I recommend thoroughly testing the board before connecting it to the Clumsy MIDI and then test it again before connecting it to a Raspberry Pi.

In normal operation the jumper will be installed across the two left-hand header pins as follows:

+ [+ +]

If an external (5V) serial signal is to be used, then the jumper should be completely removed and the external signal connected to the two outer pins, with nothing connected to the middle one, as follows:

GND---+ + +---In

Here is the board hooked up to the Lo-Fi Orchestra’s serial MIDI distribution.

IMG_5050

The Code

This is using the same code as the Arduino MIDI Filter – Revisited to keep things simple.  Programming the Arduino should be slightly simpler than last time, as everything is 5V – just remember to disable the RX/TX link.

Recall that this code allows you to preset the voice to be sent to the MT32 on startup.  This is simply the MIDI code (1 to 128) to use so it doesn’t matter if the MT32Pi is in MT-32 or FluidSynth mode – it is just a number.

There are couple of things to note:

  • The Arduino will power up quicker than the MT32-Pi, so you might need to reset it again to “send” the program change (or update the code to include a delay or send it periodically or something similar).
  • The MT32-Pi display will go to sleep after a while (there is a timeout value in the configuration).  Sending it MIDI data should wake it up again.
  • Don’t forget to re-enable the RX/TX link after programming.

Find it on GitHub here.

Closing Thoughts

This performs a lot better now. I through my Lo-Fi Orchestra Jupiter at it and everything was fine, there was no appreciable delay or sign of performance issues.

I did have a weird interference issue on the audio output though. I haven’t tracked it down and it seems a little intermittent, but it has left me wondering if it was quite the right thing to do to place the Arduino directly over the Audio DAC output board of the Clumsy MIDI!

If it doesn’t go away I might have to think about some kind of better grounding or cleaning up of the power rails…

Kevin

Leave a comment