blog.x-e.ro / LSDj keyboard tutorial : DIY gameboy piano interface

LSDj keyboard tutorial

h4x :: DIY gameboy piano interface

LSDj keyboard

so, making music for LSDj is fun. but after a while you start to wish you could “play" the gameboy software as a musical instrument as opposed to composing music in its tracker style interface. that's where the LSDj keyboard comes in. the idea is, the keyboard sends messages though the gameboy linkport to LSDJ. the commands that can be sent vary from playing/stopping notes or chains or tables, un/muting channels, in/decreasing octaves, switching instruments, navigating screens, and more. 
here's what the LSDj wiki says about the keyboard.

things we'll need for the mod:
mini-din / ps2 keyboard
gameboy link cable
soldering iron
solder
flux
wire stripper
screw drivers
heat-shrink tubing / electrical tape
x-acto knife

finding the right gameboy link cable:
there are a few different types of gameboy link cables, in the most general of senses there are "classic" gameboy cables and gameboy "advance" cables. obviously we will need a classic cable. for this mod to work we will need to power the keyboard, so you'll need a powered gameboy link cable. you can cut off the cable end from a gameboy 4-player link adapter (model# DMG-07), like i did, or you can use the correct powered cable. otherwise you will need to add a +5v external power source. nonfinite sells both powered link cables and 4 player adapters at his shop nonelectronics.com.

classic HP keyboard

the first thing you need is an old keyboard. for this mod you need a mini-din, aka a ps2 (not playstation 2), keyboard. i used an old hp ibm keyboard i pulled out of a dumpster at work. step one is testing it. plug it into a computer, open a text editor, and press all the keys. try tapping them very fast and see how often they actually fire. the responsiveness of the keys in this setting will be relative to their sensitivity in LSDJ.

pop off the keys

step two is popping off all the keys. use a flat head screw driver and stick it in the ridge beside the key then push the screw driver up like a lever. the key should just pop right off. repeat this process for all the normal keys. when you get to the spacebar and some of the other odd shaped keys, like enter, you might find springs or metal wires pressing two points on the keyboard. try and take note of their positioning, because you will need to put them back that way.

piles of keys

now you should have a piles of keys and a bare keyboard. throw all the keys in a bag, so you don't lose any, and flip the keyboard over. step three is unscrewing the keyboard, prying open and removing it's plastic covering.

unscrew the daughter board

carefully keep taking the keyboard apart. every model is slightly different, so pay attention so you can reassemble it. eventually you will see a small silicon daughter board with the cable attached. step four is removing the daughter board. unscrew the board from the innards of the keyboard and set it somewhere safe, like in an anti-static bag.

a keyboard in pieces

now that you have all the plastic removed, separate all the different parts and note how they were oriented in the casing.

clean everything out

step five is cleaning everything up. i just used air duster and some glass cleaner on a paper towel. clean out all the little dirty recesses between and in the keys. if your keyboard is old like mine was, this step can take a while ;D

soft circuits

some of the soft plastic circuits can get a little dirty or folded, clean them as well and make sure they will align correctly when you put everything back. if you have never taken apart a keyboard before, it's very interesting...

wire labeling

now take a look at the daughter board from the keyboard. if you’re lucky, like i was, each of the wires leading to the cables from the board will be labeled. if they are not labeled, you’re going to have to cut the end of the mini-din connector off and look at what color wire attaches to which pin number.

painting

step six is painting they keyboard. this step is optional. i used regular spray paint on the exterior plastic casings. i painted it all one coat of green, then splattered it slightly with a darker green. for the keys i wanted to make sure they had a less tacky feel, so i painted them with paint-markers. you can get them at an art/craft store or at some office supply stores, i like the "painters" brand. i painted the piano keys white and black and the LSDj interface keys i painted green.

prep for soldering

step seven is prepping your tools for soldering. clean your soldering iron with some steel wool and set it to medium/low heat. you'll need flux, wire strippers, and something to wrap your wiring with. you can use heat-shrink tubing, electrical, or duct-tape. step eight is cutting the wires from both your gameboy link cable and the keyboard. then peel apart each of the wires and strip about 1/8" off each wire. use an x-acto knife to peel back the cable shielding.

LSDj keyboard wiring diagram

step nine is reviewing the wiring diagram. click here to download it. you will be connecting data, clock, power, and ground wires from both the keyboard and the gameboy link cable.

LSDj wires spliced and wrapped

step ten is soldering the wires. wrap the wires from each cable together and dip them in flux. then add a tiny dab of solder from your iron to connect them. after all your wires are attached, wrap each of them individually, then wrap the entire bundle of wires.

gameboy keyboard cable complete

using the keyboard
step one is actually syncing the keyboard to LSDj. insert the link cable you hacked onto the keyboard into the gameboy and load LSDj. press SELECT+UP and go to the PROJECT screen. move the cursor down to the SYNC dialog, and press A+RIGHT until you selection is KEYBD. notice just to the right of PURGE SEQUENCER an integer prefixed by an "I" appears. if nothing is synced to LSDJ/the gameboy this will display I00. once a device is successfully synced, this will be a larger integer (e.g. I01, I02). my keyboard oddly enought syncs as I06. 

LSDj project screen

making some noise
to get some sounds to play when pressing keys on the keyboard, the sequencer must already be running. (press START) the notes you play will be played back on the next step in the phrase sequencer. if you need to get faster response timings, use a faster groove for the phrase you are playing.

LSDj phrase screen

an important feature of LSDj, that is easily overlooked, is when the sequencer is running the notes and instruments playing for each channel are displayed on the top right of the SONG screen. this can help a lot when you’re playing around and press the octave or instrument buttons up and down a bunch of times looking for something, and you get lost in the menus. this brings me to the one negative about the LSDj keyboard interface. every once in a while the instrument your playing will jump up or down like ten positions. i think the problem is related to pressing multiple keys too rapidly. i am not the only person to report this problem. technically the gameboy's z80i sound chip is playing each channel one note at a time in such a rapid succession it "tricks" the ear into thinking it's hearing them simultaneously. that's just how gameboy music works. and i think smashing keys on the keyboard can sometimes send multiple input messages per cycle in LSDj and glitches it, but that diagnosis is purely conjecture. and that random issue happens so rarely it's not a big deal. the interface is not perfect, but it's an easy mod, hacky, fun, and adds a new twist to LSDj.

LSDj keyboard key chart

key mapping
SPACE play using custom table
F1/F2 octave down/up
F3/F4 instrument down/up
F5/F6 select custom table to assign to SPACE
F8 change pulse instrument playback channels (PU1, PU2, PU1+2)
F9-F12 toggle channel mute (switches on key press)
CTRL + (F9-F12) tap channel mute (switches on key press and release)

demo video

loading...

loading...