[sdiy] keyboard to MIDI

Hermann Seib him at hermannseib.com
Mon Feb 4 08:52:41 CET 2002


Hi there nameless kid,

although I definitely don't fit into the category

> hey hey hey kids kids kids.

I might have some answers here.

> I got this idea for a project. The idea goes like
> this. I wire together some RAM some ROM and a processor or some
> other such stuff.

You don't need much RAM/ROM for that; a current microcontroller plus a bit
of MIDI circuitry should do nicely. Oh, and a big battery, of course.

> I put them in a box with a ps2 port on one end and a 5 pin
> DIN on the
> other. Plug my computer keyboard into one end and a midi cable
> into the other
> and use my new "MIDI KEYBOARD" to play at the show!

Hmmm... some points to consider:

.) computer keyboards don't make the best musical input system, you know...
the layout of the keys (we're talking normal IBM PS/2-compatible keyboards
here) doesn't lend itself well to a piano-like usage. Best you can get is 3
octaves in a rather messy layout. You could, of course, use the alphanumeric
part as a diatonically laid out array of 4*12 different tones, but it's
tricky. Getting any usable expression control out of the thing is a
nightmare. If you want to play a bit with the input medium, you might want
to have a look at
  http://www.hermannseib.com/english/gmkbd.htm
(GM-compatible keyboard for all Windoze systems - it's a bit old, but should
allow you to see how far you can get with that clumsy keyboard interface).

.) PS/2-style keyboards are not, and cannot be, velocity-sensitive,
touch-sensitive or anything else. It's not built in - all you get is a
"make" scan code when the key is pressed down and a "break" scan code when
it goes up again.

.) worst point IMO is that they got a relatively unpredictable polyphony. It
all depends on the used microcontroller and programming inside the
keyboard... I've seen some that allow 3 keys pressed at once, others go up
higher... my IBMs allow about 5 simultaneously pressed keys, but even that
depends on WHICH keys are pressed. If you press more keys, they are simply
ignored.

>    The problem is, beyond soldering the ports to a board, I have
> no Idea how to
> do this exactly. I was hoping the gurus out there might steer me
> towards some
> ideas or resources that i might try out. I allready have a book
> with the MIDI
> code spec in it. One thing i sure need is a way to figure out
> exactly what the
> computer keyboard is sending. And another is some help on what
> kind of circuits
> and chips and dips i will need to translate between the two codes.

You need a crash course on microcontrollers. It's more or less a matter of
personal taste to select one... most "modern" microcontrollers should
deliver the power you need. My personal tip would be to start with ATMEL AVR
microcontrollers (search for that on amazon), but that's a matter of
personal taste (and because I know where I can get a free GNU C++ compiler
for it :-). PS/2 keyboard interfaces for a variety of microcontrollers can
be found on the 'net (please google around on your own).

Bye,

  Hermann





More information about the Synth-diy mailing list