Midi Mate Revisited

Some while back I developed the “Midi-Mate” that connected my Yamaha electric piano to the BK7M. The BK7M unit does not work anymore so I needed an alternative at short notice. I decided to use my old Yamaha PSR keyboard as an alternative sound generator and link it to my piano using the Midi-Mate.

I re-programmed the PIC to hold a set of pre-programmed performance settings internally and recall them when a key sequence was entered. I was able to double up two lead instruments and split the keyboard exactly in the same way as the BK7M. The PIC was able to hold about 100 settings internally. This worked well except that the settings were static and could not be edited.

I decided to use the hardware developed for my AK47M project to extend this concept further and allow me to program the MIDI controller.

A PIC microcontroller is connected to my electric piano via MIDI and also scans a 3×4 numeric keypad. The PIC is connected to a PI zero W using a MIDI serial link so that the PI can accept keypad messages. The PI serial output is linked back to the PIC. This is done so that the PI can send performance configuration messages to the PIC in response to a keypad selection.
The PIC has all the logic to select instruments on 4 MIDI channels and route piano MIDI messages to any of the channels. It can also handle the channel volumes, split the keyboard and perform transposition.

The PI is simply being used to store and recall performance configurations from file and provide a real time editing function for a selected performance. The software uses exactly the same formats as the BK7M performance files so that configurations can easily be edited by my BK7M editor program. (which I have ported to the PI)
The latency is kept to a minimum as the PIC is handling the routing of key on/off messages.

I run the PI in headless mode and it connects to my wifi network. I can run a virtual terminal on my PC or Android tablet in order to use the editor. The screen shots show the completed unit and the editor/configuration software.


This is the completed unit. There are two MIDI sockets, one for the Piano and one for the Synth. Power is provided using a USB connection to a USB power supply.

A performance is selected by typing in the performance number followed by a hash. The following numbers provide special functions :-

9991 – restart PI

9992 – shutdown PI

9999 – MIDI panic

The software loads the performance file “0.ups” by default. A different performance file can be selected by typing a number followed by the star key.



This is the configuration software running on the PI. When a number is entered on the keypad, the appropriate performance configuration is recalled from file and displayed. Parameters can be selected and changed and then sent to the PI by pressing “Update and Send”. The Previous and Next keys allow you to move to the previous or next performance in the file. The entire performance file with edits may be saved using the “Save to File” button.

Note that the performance file is 100% compatible with the BK7M and the BK7M editor. I have ported a version of the Windows BK7M editor to run on the Raspberry PI.

Leave a Reply