Pages: [1]   Go Down
Author Topic: playing wav files  (Read 559 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.arduino.cc/playground/Main/Freqout

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.

Thanks.
« Last Edit: November 02, 2007, 10:16:53 am by tr909 » Logged

California
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!

Regards,
David
Logged

Pages: [1]   Go Up
Jump to: