Print This Post Print This Post

MIDIGEN – A (belated) LEMS postscript

This short article discusses an add-on to the following:

Shortly after completing LEMS, The Brute and Treslie, (see links above) it became apparent to me, that in live performances, the LEMS unit wasn’t particularly easy to use. Fine for studio/recording, but quick and accurate changes to settings during a performance were distinctly difficult. I made up my mind to rectify this situation, by providing an easier-to-use interface, which could be MIDI-connected to LEMS, and which was fitted with pots for easy update of velocity, ceiling and floor, together with the other controls.



I have to say that despite long thought, and careful planning, this was not my most successful project to date, and although initial work was completed in the latter part of 2011, I was moderately disappointed with my effort, and decided to put the project to one side, having spent far too much time on it. In retrospect, I now realise I wasn’t far away from completing the project satisfactorily, but there were other issues to address at the time.

I’m now what seems a lifetime away from then, living in Portugal, still trying to lick my new home into shape, and still using LEMS and the Brute/Treslie set-up to play my guitar through, although still finding that the LEMS unit is fiddly to adjust. Finally, two days ago, I sat down and tackled the last problem – that of noisy ADC readings. I now have a fully-functional easy-to-use way of changing the LEMS set-up.

MIDIGEN was probably fated to be difficult from the very beginning. One major decision was to attempt to make it a ‘generic’ MIDI controller, (hence the title) rather than an adjunct to LEMS. This was probably a piece of displacement behaviour on my part, not wanting to admit that I should have made LEMS easier to use in the 1st place.
Anyway, it was also an excursion into what I hoped would be my first successful data-driven PIC program – the idea being to produce a generic piece of MIDI hardware/firmware, and provide specialisation/customisation by changing a set of data in EEPROM.

Other matters, particularly the use of cheap pots, my unending problems with producing PCBs in a freezing garage, blah, blah, blah, added to the weight of remedial work necessary to render the project useful.

Despite all of the foregoing, although probably because of it, I believe that publishing the design, in somewhat skeletal form, could be helpful to others, pointing the way, perhaps of how not to do some things, rather than how to do them, and finally what can be done to put things right, even after bad decisions have been made.

The Hardware.

A PIC 16F26K20 accepts inputs from various pots and switches, and converts these into MIDI events. These are also displayed on a local LCD using the 2-wire LCD interface described elsewhere on this site. Both FTDI and ICSP programming/debug interfaces are provided.

The Firmware

An (almost wholly) data-driven program customises the hardware to control the LEMS unit.


I am providing the Eagle schematic and board layouts, together with the ‘C’ source-code. Note that these are all supplied as-is, and I cannot offer support on their use, although I will publish any useful comments (please email me) alongside this article.

The zipped eagle project is here:

The zipped MPLAB source-code and binary are here:

Photos of the unit are here:!album-48
A viewer showing photos of the unit is also provided below:!album-48

Copy the code below to your web site.
  • Share/Bookmark
PDF Creator    Send article as PDF   

Comments are closed.