A Mini Piano

RamJam:
Take an oscilloscope. Stick microphone in scope. Hit C on piano, measure frequency. Then hit next note and so on up to octave above. Program Arduino to emit said frequency in accord to button pressed.

Right, because it sounds like he probably has an oscilloscope just laying around.....?

Or....google "music note frequency" and find something like this -
http://www.audiology.org/news/interviews/documents/chasinconversionchart.pdf

Then, follow the tone and button tutorials to figure out the rest.

You're going to need at least 13 buttons if you want to play anything interesting :wink:

What are the 13 buttons and frequency ?

Thanks

http://www.phy.mtu.edu/~suits/notefreqs.html

Remember, there are 13 keys in each "octave". The sharps and flats allow you to play in any key without re-tuning.

That table should do it! Although I don't think you can use float values in tone(), so if you care about having it properly in-tune, you may need another approach. If not, just bang in the closest value rounded up or down to suit, and hope for the best.

1ChicagoDave:

RamJam:
Take an oscilloscope. Stick microphone in scope. Hit C on piano, measure frequency. Then hit next note and so on up to octave above. Program Arduino to emit said frequency in accord to button pressed.

Right, because it sounds like he probably has an oscilloscope just laying around.....?

Or....google "music note frequency" and find something like this -
http://www.audiology.org/news/interviews/documents/chasinconversionchart.pdf

Then, follow the tone and button tutorials to figure out the rest.

Yes but we want this guy to think for himself don't we? If he wants help I think he should present his idea in its entirety so that we can add suggestions. What is this little piano to look like? What are its features to be? How big is it intended to be? Who's it for, us or a specialised niche? All this needs to be revealed so that we can all co-operate. We need to give him a reason to reveal his vision, but if we just hand out easy fixes on tap he will disapeer like all the others and we'll be left with yet another inconclusive thread.

Hey all, this is my plan :

I plan to do a mini wireless piano where the speaker is wireless. And it is able to play the Happy Birthday Songs. Besides, it is the best if it can play some others songs/melody. I made this for my friend during her birthday as gift.

Hope it is clear.

So, any suggestion on how many and what keys should be included to make it somehow impressive piano that can play quite a number of melody ?

Thank you

Hopefully at this stage you are drawing artist impressions on how the finished article will appear. Presumably you want the unit so that the user can enter in and hopefully edit any now song that comes to mind via controls on the unit? You would like it capable of connecting to an external speaker / amp set up? That bit is probably the easiest - if you start by using a 1/4" jack socket and consider the nature of how it will transmit wirelessly as an upgrade. Will the unit have provision to plug in headphones to use as a standalone?

It is just a simple wireless piano where I will be using a normal low cost RF 433MHz. I would probably have the basic 8 keys do,re,mi,fa,......Then user can press the button then the speaker on the other side would sounds.

Thats my idea.

Thank you

Presumably it will use an arduino controller board? Presumably other people will want one of these as well so as to join in? My hand span from thumb to smallest finger can stretch to 8.5" but relaxed it is 6" down to 5" so I can fit thumb and all 4 fingers into a rectangle that's 5 5/8ths" x 3". So we can start by drawing a rectangle to those dimensions and see where the fingers on the right hand naturally settle for the first 5 notes of the c major scale from c to g. Then mark out a grid that intersects at each finger.

Don't patent it. Open source it!

I just plan to do a mini piano that using one hand to play onlad of two :)))

EDIT:
My bad, looks like that kit is no longer available, and I can't find any schematics for it either. But, at least there's a part list & photos to give you an idea where to start. It should be simple enough to reverse engineer/modify to suit your vision. Though, as cheap as tactile switches are (I've got about 100 I got FREE by just taking apart other things before throwing them out!), might as well build the full keyboard. That is, the white and black keys - All semitones vs. just whole notes.

Sounds like a fun project! 8)

The problem with having 8 buttons is that you will be stuck to one "key".
So for example if you have the notes Do, Re, Mi, Fa, Sol, La, Si, Do you will be stuck playing in Cmajor (you could also play in Am and in a couple of different modes, but that's a different story...).

If you want to play the "Happy birthday" song, and you want to start with Do, it means you need to play it in the key of Fa Major.
This means you would need to use the notes:
Do, Re, Mi, Fa, Sol, La, Sib, Do. <--- Notice the Si is FLAT!

You can take a look at the frequencies here:
http://www.phy.mtu.edu/~suits/notefreqs.html

I guess a nice Octave would be from C4 to C5, but you can try and see which one you like the best...

Have you decided on your circuit?
Maybe the easiest way for you to play the notes is with the tone() command.
You can see here how it works:
http://arduino.cc/en/Tutorial/tone

And here you can see an example of a simple "piano" with 3 buttons. Maybe you can adapt it to your project!

When you have something ready, post your code and we can help you more from there!
Good Luck!
=)

If you wanted to have 2 or even 3 octaves 37 notes and it was monophonic you could arrange 3 buttons to behave like valves on a trumpet for one hand and 4 buttons for the other hand. In combination modelling the 3 based on trumpet and the other for for different blows. You could use a strap to slip one hand to hold unit and etc. this makes it very small and only 7 buttons.

The problem with having 8 buttons is that you will be stuck to one "key".
So for example if you have the notes Do, Re, Mi, Fa, Sol, La, Si, Do you will be stuck playing in Cmajor (you could also play in Am and in a couple of different modes, but that's a different story...).

If you want to play the "Happy birthday" song, and you want to start with Do, it means you need to play it in the key of Fa Major.
This means you would need to use the notes:
Do, Re, Mi, Fa, Sol, La, Sib, Do. <--- Notice the Si is FLAT!

Or, play C scale...starting with G. (Technically, "G Mixolydian"....but I digress.)(I'm sure what you were thinking by mentioning modes)

Though it's easy enough to transpose, too.

By adding a simple pot, or extra button to project...could access different scales easily. (Though, I think this is may be more complex than OP intends or wants.)

Here's example of simple, whole note version of "Happy Birthday".

image.jpg

Hi,

Why not hack a cheap keyboard, I used a 37 key one, but i have looked at smaller ones with 1 or 1 and a half octaves.

Duane B
rcarduino.blogspot.com

If it were my project I can see my way to assembling the electronics of the thing. Finding suitable chips and putting the bits onto a pcb. I can see my way to programming it up. That's easy. What is not easy is making it kinaestheticly useable. Once the project is complete it should have a use. In this case it should enable the users to create music, so the instrument needs to be playable and have some kind of visual and tactile appeal and ease of use once completed. This leads one to question what the buttons should be shaped as? Where should they be positioned? Will it power off AA batteries. Are their options to charge and install new firmware via USB, Bluetooth etc.

I think the guy said he wanted it wireless so that would mean a Bluetooth shield. So the things got to have space for at least 2 boards, probably more to future proof it. There's nothing worse than spending months or years of hard work on a project only for it to be dumped into the scrap box immediately on completion due to its over dedicated and inflexible design.

What is not easy is making it kinaestheticly useable. Once the project is complete it should have a use. In this case it should enable the users to create music, so the instrument needs to be playable and have some kind of visual and tactile appeal and ease of use once completed

All that information can be found in a book called "A Measure of Man and Woman". Pretty handy piece of work!

I think the guy said he wanted it wireless

I think they also said they wanted to make one of these to give to a female friend for her birthday. I don't think they want to create a new, mass-produced product, to introduce to the marketplace. So, I would assume (understanding women as little as I do) that it just needs to "work" (play Happy Birthday, etc...) and show they put an effort into it. Sorta more like, "it's the thought that counts" kinda thing?

Women? Oh. Why not just make her a birthday cake?

For the Notes and Frequencies, just look at the notes.h file included with the tone example above. You didn't even bother to try it, did you.