Go Down

Topic: A Mini Piano (Read 2 times) previous topic - next topic

Vincent19

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

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.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

Vincent19


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

KeithRB

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.

Vincent19

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

KeithRB

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

Vincent19

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

Thanks !

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.

1ChicagoDave


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. 

BulletMagnet83

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

Vincent19

What are the 13 buttons and frequency ?

Thanks

BulletMagnet83

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.

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.

Vincent19

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

RamJam

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?

Go Up