piano? noob! where to start!?

I was not sure where to post this! Sorry if it’s not in the right forum!!=\

Hiya all! I am a complete noob and I am sorry to bother yall with my naivety!=)
Ok, I went dumpster diving the other day and found an amazing piano (part of it at least) that Katrina obviously had for breakfast! I have wanted to learn Arduino and I feel this piano is the perfect opportunity (also it could count as my Hypermedia project!).

Here is the first of my many questions!
Is it possible to wire pressure sensitive pads (or whatever the professional term is) to the undersides of the keys??? And then make the keys respond by playing recorded piano notes? Ah, I have no idea where to even begin, but I really want to learn!!

Any tutorials yall might suggest!?=)
O! And for what I am attempting to do, what type of board and wiring should I buy?? do I use flash to tell the board hoaw to respond to the keys? any advice?!=)

THANK YOU GUYS SO MUCH!!!=D

Really more of an electronic music project – but Arduino can do a pretty good approximation.

We need to break this into three stages;

  1. Detection of keyboard
  2. Generation of tone
  3. Misc. I/O (MIDI, et al)

If this was originally an electronic keyboard, then the original wiring is still there. At some point it was probably multiplexed, which may or may not be to your advantage. If there is no wiring, there are a number of contact strategies that might work for you – conductive foams (http://www.mutr.co.uk/catalog/product_info.php?products_id=1144), piezo triggers, leaf switches, buttons, hand-fabricated leaf switches with little bits of brass sheet, etc.

The next problem is that Arduino only has a dozen or so inputs. Meaning, to get a full octave (or two or three) of keyboard you will have to multiplex.

If you solve these two problems, you will now have a variable in code that knows what key was touched. There’s some more software wrangling to allow polyphony!

Assuming you get that far, the next functional block to consider is tone generation. Arduino can generate basic tones, but as far as I know there is no specific hardware function coded in; basically, you would be running a program loop and the time the software routine took to loop would be the base frequency. That’s not optimal.

Better to add an external oscillator to generate the base frequency. This can be hand-tuned (which would drift), or use a crystal and frequency dividers. But at this point we are getting deep into building a music synthesizer – which is a subject better broached on another forum.

A perhaps simpler and more elegant solution is to use that Arduino to take the output of the keyboard you’ve salvaged – as described above – and generate a MIDI signal. That can then be sent to a host computer, or a stand-alone sound generator.

(There’s also been a few threads around here about sending MIDI direct to USB, without need for a MIDI interface on the host computer.)

It sounded to me as if he was talking about an actual piano (where the only wires are the ones that go “boing” when they’re hit with a hammer!). I saw one of these on a streetside garbage pile the other day, but didn’t have a car I could pick it up with.

In which case my strategy would be to devise some sort of momentary switch that’s triggered by striking the keys - if the hammers are intact, you could use those as well (and it’d look better and be classier). Apparently velocity-sensitive keyboards use two switches, and time the difference to determine strike speed/intensity - but that’s another level of complexity. The switches themselves are the critical component, because they’ll affect how the piano feels to play.

Get yourself a synth keyboard that works (yard sale, swap meet - no more than $20 for a starter; usually a few of the keys or the key buttons are broken and you won’t need those), tear it down and trace where the keys go. If you can duplicate/wire into this you don’t even need the Arduino since the keyboard chip does all the matrix scanning as well as synthesis.

Wire the piano keys to match the synth matrix. The (low-end Casio) synth’s I’ve looked at use an 8xN matrix so key 1 would connect pin 1 to pin 9, key 2 would be 2 to 9; key 9 would connect 1 to 10. 8x5 is 40 keys and in the keyboards I’m using this is typical. (The “voice select”, volume, etc keys use similar matrix connections).

Failing that, build yourself a trebuchet. You’ll need several telephone poles, and a Volkswagen for a counterweight…

Hello-

I’m actually trying to gather up a design for a DIY digital piano. I’d like to use an Arduino as well. If you are building a keyboard with only a few octaves it should be relatively easy, but for an 88 key keyboard it looks like I’m going to have to use several external IC’s.

I think the circuit will be something like:

2 Arduino outputs → 4 bit Binary Counter → 4 to 16 Decoder (really a couple 3 by 8’s ) → 16 x 11 diode matrix → 11 Arduino inputs.

That assumes I can use the RX pin as either a digital in or a digital out, while still using the serial port on TX.

It’s a work in progress, but you can check out diykeyboard.org

Drew