04
Aug
17

The MIDI CPU Project – 1. The Hardware

I should have done this project 5 years or more ago!  However, illness, retirement and moving house all conspired to delay my progress.

When I finally came to put into action the plans I had drawn up in 2010, when I bought the module I’m about to describe, I found the device had been discontinued and support was about to cease – a great shame, because Highly Liquid, the company that made the MIDI CPU, were second to none in their support of every type of hobbyist and constructor who used their products (they made some other great devices, too), and their forum was – well, still is, until the end of this year (2017) – a mine of information.

So, my description of my endeavours is unlikely to help anyone embarking on the same project, but it might, on the other hand, be of interest to someone attempting something similar.

[Edit: also, see below for further information on the possible continued existence of the MIDI CPU and other Highly Liquid products (including the MIDI widget, which is the opposite of the MIDI CPU, i.e. a MIDI decoder).  There is a connection with codeandcopper.com, which is run by the same guy, John Staskevitch, and which is home to his current projects].

First of all, then, the MIDI CPU – what is it?

This is what it looks like:

midi-cpu-large_zyevag

It’s a small board, about  7 or 8cm long by 3 or 4cm wide with sufficient components to function as a MIDI controller.  Exactly what kind of MIDI controller depends on you: each of the 24 control terminals along the top edge of the board in the picture above can be programmed via SysEx to perform various logic or analog functions – i.e. they can be configured as switches for notes, switches for MIDI control messages, inputs from potentiometers, pitch and mod wheels, and so forth, whatever your application requires.

The 8 connections on the right-hand side are jumpers to set the MIDI channel, if you don’t want to have to set this as part of the programming.  The 4 pairs of connections are marked 1, 2, 4,and 8, so connecting them to +v or 0v like a binary number will set the channel.  Leaving them disconnected is effectively 0000, binary zero, or channel 1; connecting all of them is 1111, binary 15 (8+4+2+1), or channel 16, and so on.

The 5 connections at the bottom right are MIDI in and out, so the MIDI CPU can be connected to a computer and other MIDI equipment via conventional 5-pin MIDI sockets.

As I say, it’s sadly not being marketed any longer by Highly Liquid, although I see the boards, firmware and detailed information do now appear on circuithub.com and github.com, so it might be possible to obtain one after all, even if you have to solder it together yourself.  It seemed to me at the time an ideal purchase, due to its simplicity and versatility.  The cost was reasonable, around £40, as I recall.  I elected to make it a little more complicated than it needed to be, but you could, with minimal external wiring, create quite a complex MIDI instrument with it – 24 control terminals is plenty for a switch matrix, mod wheels and various other controls.

*

So, what did I do with it?  Well, I had alluded before, in my post on ‘A new use for USB keyboards‘, to a MIDI project which was going to fill up the rest of the enclosure which then included – amongst other things – the PCB out of an old Apple keyboard, and the MIDI CPU was this project.

Some buttons and modulation wheels would be built into the box, but essentially the MIDI CPU board would be accessed via a 25-way socket on the back of the enclosure, so any one of a number of different devices could be attached, and the MIDI CPU could when necessary be reprogrammed to allow for different uses of its control terminals.

*

MIDI CPU inside

This is what the enclosure looked like when I left it, and I now set about filling the top half with the MIDI CPU board and associated circuitry.

The first thing I wanted to do was to add pitch and mod wheels, buttons and potentiometers.

For the potentiometers I used the type with an integral press switch – if the external unit plugged into the 25-way socket had its own, I wanted these to be able to be taken out of the circuit.

For the pitch and mod wheels I bought a set off eBay which originally came from a DX7 or some such.  These were pre-wired and ideal for the purpose – the pitch wheel was properly sprung to return to centre – and were only about £10.

pitch & mod wheels

Conscious of the space problem, I decided on an unusual solution for the buttons: a 16-button keypad.  Although this looked like any keypad, internally it was rather untypical.

Keypads are normally arranged in a matrix pattern, so the output leads are ‘Column 1’, ‘Row 1’,  ‘Column 2’, ‘Row 2’ etc., and each button is in a unique position at the junction of a particular row and column; but this was a special design where each of the 16 buttons, when pressed, was simply connected to a common input.  I connected the common input to 0v, so that a button, when pressed, would be able to ground one of the MIDI CPU’s control terminals.  This is the signal the terminals need to be activated.

As far as momentary button presses were concerned, this was ideal, but to create latching switches – switches that stayed on until pressed again – extra circuitry was necessary.  What I used was a system with 4 ‘flip-flops’, plus a few signal inverters to make sure the flip-flop would be activated by a positive pulse, but the MIDI CPU control terminal would be activated by a negative pulse.  There were to be 4 latching switches, so 4 circuits like this were needed:

Latching switch circuit

Each of the circuits uses half a 4013 flip-flop chip, and half a 40106, which has 6 inverting gates altogether.  The input to the inverter on the left is kept high, so the output of the 4013 is kept low; the inverter in the middle keeps the MIDI CPU control terminal high, and the inverter on the right keeps the anode of the LED low.  In this way the MIDI CPU control terminal and the LED are both off until the switch on the left is pressed; when the switch is pressed the 4013 output changes state, the MIDI CPU control terminal and the LED are both switched on, and stay on until the switch is pressed again and the 4013 changes state again.

I added a 4-way switch so that all the latching buttons could be taken out of circuit if the external unit plugged into the 25-way socket had its own, or didn’t need them.

Finally, I wanted to add a MIDI channel selector switch, rather than rely on  programming to provide the channel, or hard-wire the jumpers on the MIDI CPU board (described above) to fix the channel permanently.

I got this idea from the Highly Liquid Forum.  The selector switch I used was a type of rotary encoder – specifically a hex encoder, which had 16 positions, and 4 outputs, which could output a binary number in each of these 16 positions, going from zero (0000) to 15 (1111).  (I had used one of these before, in creating the Bigfoot automatic stylophone controller).

The beauty of using this particular type of encoder – and they aren’t all the same, by any means – is that each of the 4 outputs is connected to a common terminal when it’s set at 1, but not connected when it’s at 0.  At the beginning (0000), none of the 4 outputs are connected to the common terminal; at the end (1111), all of them are; and in between (e.g. 0101) some of them are and some of them aren’t.  If the common terminal is connected to +v, then the 4 outputs can all be inputs to electronic switches, turning on when set at 1, turning off when set at 0.

A suitable electronic switch is the 4066, which has 4 switches in one chip, just right for the 4 connections which need to be made on the MIDI CPU board to change the MIDI Channel anywhere from 0 to 15, which represents the full number of MIDI Channels 1 to 16.

I also wanted to add an indicator of what MIDI channel was currently set.  To do this I used a chip which you’ve seen me use before, the 4067.  As luck would have it, this chip also requires a binary number from 0000 to 1111 as its input, and for each of these 16 different inputs it connects one of its 16 different outputs to a common terminal.  So, in this case I made the common terminal +v – via a small resistor – and connected 16 LEDS from the outputs to 0v.  In this way, as the MIDI channel changes, a different LED is lit up – no need for them all to have their own resistor, as only one of them will ever be lit at one time.

The simple, but effective circuit, looked like this:

MIDI Channel Selector

*

I then needed to connect everything together, and the quantity of components and wires in the  enclosure – as so often with my projects – began to increase rapidly.

IMG_0387 IMG_0388 IMG_0390

The keypad with the white buttons is the keypad I was describing above; in the first configuration I made of the MIDI CPU’s control terminals, the keys with letters play the appropriate notes of the scale: A, B, C, D, E and F; O plays A#/Bb, and 9 plays G; the other 8 numbered keys are divided between latching and momentary switches.

The keypad with the black buttons is not part of the MIDI CPU project: it’s connected to the USB keyboard PCB shown in the first picture of the inside of the enclosure above.  The numbers and letters it produces are useful in applications created with, for example, PureData, where the input can be interpreted in many different ways, as required.

The pitch and mod wheels can be seen on the left and the 16 MIDI channel indicator LEDs on the right.

*

In this view of the partially complete project, you can see 1. the MIDI channel circuit; 2. the MIDI CPU board; 3. the pitch  and mod wheels; and 4. the latching switch circuit.

Interior

The MIDI CPU board needs at this point to be connected to the MIDI in and out sockets and the 25-way socket for the control terminals, and the two keypads need to be connected to the USB keyboard PCB (upper keypad) and the MIDI CPU board (lower keypad).

*

I finished all the remaining interior connections, and the inside now looked like this:

Inside

I removed the excess wiring from the MIDI to USB board (removed from a commercial product, as described in the earlier post linked to above), which is now tucked under the long Apple keyboard PCB on the left-hand side; but the extra wiring from the MIDI CPU board to the internal switches and potentiometers and the external 25-way socket had still over-filled the enclosure!  This view from the outside makes it even more apparent that the box wasn’t going to close:

Back

So I was going to have to do something to make the interior larger before the unit could be used!

Nevertheless, every part of the circuit was now connected up, and it was going to be possible to test it.  I gingerly connected power and switched on.  Lights appeared – a blue light for power, indicator lights where potentiometers were pressed down for on; very bright lights in the centre where latching switches were on; the ‘MOD’ light, to indicate that the ‘Select’ switch for the ‘spare’ control terminal was turned to the modulation wheel position; a light in the MIDI Channel indicator column on the right, and – most crucially – the ‘Activity’ light (not yet labelled, but above the ‘power’ LED), connected directly to the MIDI CPU board, flickered on power up to indicate that it was ready for action.

Front

There was no instrument connected to the 25-way socket – I haven’t yet made any! – but there were enough controls on the box to test a good deal of functionality, including note on and off information from some of the keypad buttons.

Part 2 of this series describes the software, programming and testing of the MIDI CPU box.


5 Responses to “The MIDI CPU Project – 1. The Hardware”


  1. 1 Murray
    May 1, 2018 at 3:21 am

    Does the Highly Liquid forum no longer exist? I can’t find it. I bought a couple of MIDICPU boards a few years ago and they’re still sitting in my drawer. I now have a project that I need them for.

    • May 2, 2018 at 2:14 pm

      I’m afraid it doesn’t. It was just still going when I got mine out of the drawer and started work on it, and I hoped it might be left as a static ‘legacy’ feature, but it’s gone completely. I might be able to help, although my knowledge is not really in-depth.

  2. 3 graveyard
    February 3, 2022 at 2:27 am

    There she is… the MIDICPU.. I built a full on dj controller with this thing and it’s still in use today. Highly Liquid going defunct is truly tragic. The loss of the message board is deep and meaningful; as that is where all of the weird little nuances were worked out with the actual chip designers interacting with makers and builders in the field. It was magical.

    • March 5, 2022 at 6:31 pm

      You’re absolutely right about the message board: there were people on there – not least from Highly Liquid themselves – who were so willing to help by patiently answering all manner of questions. I learned so much about MIDI and hex files, not just the MIDI CPU itself, by following the threads. A great resource, and the MIDI CPU was/is a great product. I never developed my MIDI controller beyond what I’ve written about in the blog – but I easily could do, as the hardware is all in place now, and I still have the (very thorough) manuals.

    • March 5, 2022 at 7:02 pm

      For nostagic – although probably not for practical – purposes, you may like to look at the Wayback Machine, which has retained a couple of odd pages. Here, for example: https://web.archive.org/web/20101103060142/http://forum.highlyliquid.com/forumdisplay.php?s=a09f46e902acfa393c9ee85be243532d&f=17 a couple of the ‘Sticky’ messages have been retained, although nothing else, as far as I can tell. The site was visited many times over the years, but I can’t find a way to access many pages reliably.


Post a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


andymurkin

August 2017
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Enter your email address to follow this blog and receive notifications of new posts by email.


%d bloggers like this: