How to upload and play music file directly to ATMega328 arduino nano I'm wanting to upload a v short piece of music, to an arduino nano, and then play it repeatedly.

The file length only needs to be 10ms, how do I do this?  I'm unsure what format to put it in, where to put it in the code and also the size limits (Is it 2kb (RAM size) or 32kb (EEPROM) size that will decide how big a file I can put in?

I don't know how/where to put the code and how to get it to play.  I found lots of information on running it off SD cards or other external memory, but these aren't an option at the moment as I am limited to what I currently have (currently - an arduino nano, a load of resistors, diodes and that's about it) I'm just wiring the speaker directly between pin4 and ground but could do more wiring if that's required.

I'm quite happy to reduce the sample rate of the file down to get it small enough to fit the 2kb or 32kb size - but I have no idea what to to/where to paste the code/even where to get the code from a .wav or .mp3 or whatever filetype.

Thanks very much
The website below will give you the full information on how to do it. You will need a speaker connected to a PWM pin (I think that pin 3 on the Nano should be one of these kind of pins).

You can download the extension for the IDE to play your music and a program, on which you will convert the .mp3 files to a numeric format, which you will then paste in your program.

http://highlowtech.org/?p=1963