Go Down

Topic: playing wav files (Read 936 times) previous topic - next topic


Nov 02, 2007, 04:03 pm Last Edit: Nov 02, 2007, 04:16 pm by tr909 Reason: 1
I know this is not really what a microcontroller is for but...

Would this work:

convert a small wav file to an array of 8 bit ints
embed that array into an arduino program which sends the values out
via a function like freq_out()


I would just try it myself but it's turning out to be harder than I thought to find something to create
the int array so I figured I'd ask if anyone thinks this would work before I go to all the trouble of likely
writing a little program to do the conversion for me.



Yes, it's possible, but you're going to run out of memory very quickly. Audio files, even 8-bit/8KHz (poor telephone quality) take 8KBytes per second. You might consider creating your audio files with Audacity, which is available at http://audacity.sourceforge.net/

There is a technique that I saw a while back for PIC microprocessor, but could be used with Arduino, to encode the audio as a 1-bit stream that used a much smaller memory area. You can see the article at http://www.romanblack.com/picsound.htm

Hope that helps!


Go Up