Traktor Kontrol X1 |
MidiFighter Pro |
Now both of these controllers are excellent controllers in
their own right but are a) expensive and b) don’t offer the full flexibility of
features I would like to have at my finger tips. Solution build your own!
Now traditionally midi devices where connected using 180°
five-pin DIN connectors communicating over a twisted pair plus ground
configuration. From what I can remember these are current driven and optically
isolated to avoid interference between instruments. However luckily the USB
audio class supports USB midi devices which makes things a whole lot
simpler. All I need is a microcontroller with USB host support and that’s it.
In theory.
A while back I purchased a couple of these MinimusAVR boards
(made famous by people jail breaking their PS3s).
These things are amazing. For about a £5 you get a small PCB
populated with an Atmel AT90USB162 microcontroller and a few bits of extra
hardware, a couple of LEDs and a couple of switches. The AT90USB162 has
16KB of flash, 512 bytes of RAM and 512 bytes of EEPROM. But most importantly
it has a full speed USB transceiver on board as well.
Perfect. It even has a small bootloader pre programmed that allows you to
reprogram it without the need for an external programmer.
The MinimusAVR will form the basis of this project with the
additional hardware fitting around it. Now I know there is a complete USB stack for the USB AVR microcontrollers written by a chap named
Dean Camera called LUFA which supports numerous USB classes including MIDI . Check out his website.
My plan is to develop a stand alone midi controller with
the following features :-
- Fully USB compliant.
- Support for up to 32 digital inputs (push buttons and rotary encoders).
- Support for 8 analogue inputs (for potentiometers).
- Support for up to 32 LEDs.
- Configurable button mapping.
- Possibly some form of display.
- Whatever else I can think of as the project progresses.
The project will be broken down and completed in stages :-
First implement a
virtual serial device using LUFA. That way communication to and from the
microcontroller can be carried out using some form of terminal emulation such
as Hyperterminal, TeraTerm or Putty. This will help with debugging during the early stages of getting the hardware working.
Messages will be sent to and from the device and once everything is working the
virtual serial device will be removed and replaced with a MIDI
device instead.
Next add
hardware/firmware for reading up to 32 digital inputs. Push buttons switches
and rotary encoders. Then add
hardware/firmware for driving 32 LEDs. Then hardware/firmware for reading 8 analogue inputs. Possibly some form of display not sure yet. Then once all the hardware is working convert the serial messages into appropriate MIDI
messages.