A Mini Piano

Hey guys, I plan to make a mini piano with maybe like 8 buttons for 'Do, Re, Mi, Fa, So, La, Ti, Do'

So what I want is just basic first. When I press a button then the speaker will give 'Do', then another button give me 'Re'

I know it is quite simple to do, just I dont have any ideas on tones in arduino.

Hope I can get some helps here.

Thank you in advance :)

You need to look at the Tone example. From there you can see the it needs a certain library that has all the tones in it. Now once you understand how that example works, you can modify it to output a tone if a certain "pin" goes HIGH and go silent if the pin is LOW.

Also if your familiar with a normal piano, Do to Do is an octave, and there are also different scales that you can program into the code too, if you want to get fancy.

HazardsMind: You need to look at the Tone example. From there you can see the it needs a certain library that has all the tones in it. Now once you understand how that example works, you can modify it to output a tone if a certain "pin" goes HIGH and go silent if the pin is LOW.

Also if your familiar with a normal piano, Do to Do is an octave, and there are also different scales that you can program into the code too, if you want to get fancy.

What do you mean by the bolded part ? Somehow confuse.

Thank you

You are the one that started with Do, Re, Mi... He means that from Do (C) to Do(C) is an octave on the piano keyboard.

Okay, you mean program the Do for different frequency ? I do not have music background. So sometimes I do not understand what you tell me.

But I will learn.

Thank you

Start here: http://arduino.cc/en/Tutorial/Tone

I am sucks in music frequency stuff. Can anyone tell me the basic one and their frequency ? How many buttons needed ?

Thanks !

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.

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 ;)

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:

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!
=)