Piano Keyboard Game Controller
jerris
Posts: 6
I'm starting a project to create a piano keyboard game controller to interface with Nick Sabalausky's sound demo (the one that has the piano keyboard displayed on the screen). The end result idea is to create an educational game for my daughter to learn how to play the piano. I'm pretty good at assembly, so I don't think I'll have a problem with the driver, but I'm no pro at circuit design.·The key layout would contain·a little more than two octaves, starting at a·middle·C and going to a high·F (30 keys) and probably add a select and a start button. (32 keys total). I was thinking about just using a simple parrallel to serial IC to transmit which notes were being pressed, but again, I'm no pro at circuit design, so I'm looking for advice. It'd be nice to be able to be able to read if more than one key is being pressed at the same time. This post is mostly just to keep track of my own thought processes, but I'm more than open to whatever suggestions anybody might have.
Thanks,
Jerris
Thanks,
Jerris
Comments
Rip apart a keyboard and use the keyboard matrix.
An Ultimarc I-PAC or other keyboard interface used by the MAME crowd to connect arcade joysticks & buttons to a PC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC color bars (template): http://forums.parallax.com/showthread.php?p=803904
Not that my design skills are that great either, but if I were you, I would have a dedicated keyboard controller chip. For microcontroller I would recommend a PIC16F877 (36 I/O pins) or the ATMEL equivalent if you prefer, or something bigger if you decide on a larger keyboard. (Keep in mind that larger chips will most likely not come in PDIP packages.) The dedicated controller scans 32 input pins and rapidly reports their state to the Propeller (or a PC) via a 4-byte RS232 packet (you can use 9-bit bytes, setting the parity bit on the first byte of each packet to delimit them). Alternatively you could use a 1-byte protocol. 2 bits to flag packets and 6 bytes to designate a key number.
Or, you could use a MIDI interface to the Prop, and then you can use it with any number of keyboards. There is a MIDI In object available: http://obex.parallax.com/objects/229/
Let us know how it goes,
Chris
Personally, I would disagree; I think that a MIDI interface would be much easier to add and a LOT easier to manage than reading individual keys. You could then make use of a pre-made and guarunteed working MIDI keyboard and the whole design would probably be much easier at least in terms of hardware.
-Phil
having done both the rip the keyboard apart for scan code AND the midi decoding approaches, I'd say either way is actually about the same level of difficulty, just in different ways. There's code around here for MIDI already, but the brute-force scan code reading might be easier.
It depends on what Nick Sabalausky's stuff requires for input. Without having looked at it, I'd still say the requirements of its interface should guide your design.
- Howard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"This device contains recyclable materials, which can be re-decomposed
and re-integrated into brand new marvels... We strongly encourage you
to contact the provided information and recycle yourself always. "
cheers
- Howard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔