making a 88 key keyboard that can store and play wav or mp3 files

hey! I know there are keyboards out there that can play wav or mp3 files of your choice when a key is pressed, but, I want to make my own because I think it is cheaper than buying one. I am also making one because I don't know if the already made keyboards can store the files into the circuit board so I can take it along on the go and play it without hooking up a computer to it every time. I also want to make one because I never liked the preprogrammed demo songs on already made keyboards and I have a choice to whether I want my own demo songs or none! but, I don't know what Arduino to use! and I also don't now how to load the files on each button in different pitches. basically how I want this to work is, I load sounds files on the Arduino, and it will play that same sound file, just in different pitches when different keys are pressed, and I also want it to loop the sound file when I hold the key down, and stop or fade out when I release it, and I also want it to have a lot of polyphony, and I also want it to have multiple sounds, like on a real keyboard, you can select the different sounds from the sound bank, or in this case, I can press a button, and it changes the sound to a different one, like for instance, it had a dog barking, then I press that button and it changes to somebody saying hello. I want it to have 100 sounds! and I want it to be 88 keys!

Then you will want a lot of programming skills and something a lot more powerful than any Arduino to run your device, probably several somethings. Good luck.

Steve

I just need to know how to add the sound select button, and how to make the file play in different pitches and adding the note buttons.

I'd guess real keyboards have some very-specialized chips but I don't know how they are made. (A MIDI "controller only" with no built-in audio is not so complicated.)

I am also making one because I don't know if the already made keyboards can store the files into the circuit board so I can take it along on the go and play it without hooking up a computer to it every time.

Yes, but different keyboards will have different capabilities. I suggest you visit a music store to get some advice and to see what's available.

But, most won't play MP3 or audio files. They play MIDI files which are "notes & timing" or "sheet music for the computer" (or for the keyboard). The actual sounds are generated by the instrument so for example, you can change the virtual instrument from a trumpet to a violin, or you can change the tempo, etc. And some (most?) keyboards will support multiple voices so you can have multiple parts/instruments playing at the same time.

Since MIDI files only have the notes & timing (and a little more information) they are small compared to audio files you can probably store more MIDI information than you'll ever use (depending on the particular keyboard, of course).

You can load a MIDI file from a computer or you can record/capture the notes & timing as you play on the keyboard, and then play it back. Or, you can capture the MIDI with a computer and edit it on the computer and then play it back on the computer or load it into the keyboard.

and how to make the file play in different pitches and adding the note buttons.

You use a technique known as resampling to compress or expand the data. You can not use MP3 files for this, it has to be wav files. Each note will need about 50K of memory, way over the limit of any Arduino. You are way out of your depth here trying to do too much with too little knowlage.

Nobody tries to play a single sample over a full 88 key 7 octave keyboard. It would sound ridiculous. You can sometimes stretch a sample over about 1/2 octave but that's all. Real sampled instruments use several different samples for each key and the storage they need runs into gigabytes. It is very definitely not a job for an Arduino.

Steve

I just want to do it though! but, I know how to make it play sounds! I can just add 88 buttons for each note and have it play the same sound file, just in different pitches. but, I don’t know how to make it change to a different group of sounds.

If you know how to play one "sound file" repitched over 88 keys then what's the problem? That "sound file" must stored in some way so all you need to do just store some more of them and then choose the one you want, perhaps with two buttons for Next Sound and Previous Sound.

If you show us the code you have that plays one "sound file" perhaps we could provide more detailed help.

Steve

slipstick: Nobody tries to play a single sample over a full 88 key 7 octave keyboard. It would sound ridiculous.

Oh I bet they do! and it does sound ridiculous, but sometimes its awesome...

quick question. the servo motor for my cosplay with blinking eyes goes to pin 9 on the uno. if I were to use a nano for the blinking eyes code, it will work on pin a9, correct?

if I were to use a nano for the blinking eyes code, it will work on pin a9, correct?

What is pin a9?

Pin 9 on a Uno is the same as D9 on a nano.

I was looking at pictures of Arduino nanos, and all of the pins had the a at the beginning, exept for the pwm and other pins, and a9 was one of them.

bopitlover12:
I was looking at pictures of Arduino nanos, and all of the pins had the a at the beginning, exept for the pwm and other pins, and a9 was one of them.

What? There are pins with A or D before the numbers.

which pin would it be? d9 or a9? also, does that mean that other pins I use have to be d in front in order to work?

which pin would it be? d9 or a9?

D9

does that mean that other pins I use have to be d in front in order to work?

Either will work as long as you address them correctly in the software. If you use the D pins you can use exactly the same code as you use in the Uno.

If you want to use the A pins then you must address them as A0, A1 .... and so on in the code.

However, note that A6 and A7 can not be used as digital I/O pins like the other ones.