How to Embed WAV files into a Device

I have four 16-bit 44100 audio WAV files, each one being a 1 minute _stereo_ sound effect recording.

I would like to build these into a device so that any one of the four can be selected and played, as per the original stereo, in loop mode.

Can anyone advise what the best way of doing this might be?

I will be making a number of these devices to be used at different locations, so inputting audio from an external device is not really an option.

The audio amp will be built separately, so I am only interested in a storage solution as described above.

There are no limitations on size, voltage or power.

Thanks for any suggestions.

Kevin Foster

Reply to
David King
Loading thread data ...

David King wrote in news: snipped-for-privacy@4ax.com:

It depends on your level of embedded development experience. The cheapest unit cost and most flexible would be to write your own audio plyer firmware for a powerful enough MCU, reading the audio data from FLASH or SD card. However if you have the skills to do that, you'd be coding it, not asking how to do it here.

At the other end of the skills spectrum, Sparkfun do a couple of modules that may meet your needs:

Standalone module. Arduino shield.

You'll probably have to convert the audio files into a format the modules support. Both play from MicroSD card, that you would prepare and preload on your PC.

--
Ian Malcolm.   London, ENGLAND.  (NEWSGROUP REPLY PREFERRED)  
ianm[at]the[dash]malcolms[dot]freeserve[dot]co[dot]uk  
[at]=@, [dash]=- & [dot]=. *Warning* HTML & >32K emails --> NUL
Reply to
Ian Malcolm

formatting link
programmable.html

Jamie

Reply to
M Philbrook

On a sunny day (Sun, 13 Dec 2015 10:45:31 +1100) it happened David King wrote in :

In the long ago past for 16 bit audio 2 8 bit EPROMS in parallel, address lines driven by a 4040 counter.... as clock a 555 timer perhaps ;-) and a R2R DAC.

I build and used a signal generator like that with sine wave in EPROM. At 44000 samples per second = 60 x 44000 = 2.64 MB only... Mine was a bit more complicated, think I published it here a hundred years or sos ago, had sweep etc. But at that size maybe you can find a cheap FPGA. Or even a micro with that much FLASH. I2C FLASH memory + PIC?

There are so many possibilities. Buy a Rasberry use SDcard.

Cheap FLASH based mp3 players are 4 $ on ebay, interface the chip...

On the cheap, if you asked me now, for low power audio out, I would use this 'amp' with I2C FLASH for storage:

formatting link

2 chip solution. You need a processor anyways for i2c FLASH.
Reply to
Jan Panteltje

You'd be better off buying a device off the shelf. In the 1980s/1990s, before music production went mostly computer based, various manufacturers made all sorts of hardware boxes for playing back and manipulating audio clips, for example:

formatting link

They're reliable and many of them can be had for peanuts on eBay now.

--


----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
Reply to
bitrex

Lots of open source stuff out there. But its suitability will depend on how you expect to distribute your device (personal use vs commercial product) and how the particular s/w and h/w is copyrighted.

-- Paul Hovnanian mailto: snipped-for-privacy@Hovnanian.com

------------------------------------------------------------------ Disclaimer - These opiini^H^H damn! ^H^H ^Q ^[ .... :w :q :wq :wq! ^d exit X Q ^C ^? :quitbye CtrlAltDel ~~q :~q logout save/quit :!QUIT ^[zz ^[ZZZZZZ ^H man vi ^@ ^L ^[c ^# ^E ^X ^I ^T ? help helpquit ^D man quit ^C ^c ?Quit ?q CtrlShftDel "Hey, what does this button d..."

Reply to
Paul Hovnanian P.E.

David King wrote in news: snipped-for-privacy@4ax.com:

Cargo Cult coding here we come. Cutting/pasting succesfully from someone else's codebase for a MCU you aren't familliar with requires an order of magnitude more skill than simply writing it yourself for a MCU and toolchain you already know well. However the Spakfun 12660 Arduino shield has an open source library and sample code for its VS1053B MP3 CODEC chip.

Really? The product datasheets claim both are Stereo. The 11029 board support page has stereo test files. The 12660 shield VS1053B MP3 CODEC chip is stereo. I haven't had them on my bench so I cant personally confirm they are as described but I doubt Sparkfun would knowingly lie about their specifications.

--
Ian Malcolm.   London, ENGLAND.  (NEWSGROUP REPLY PREFERRED)  
ianm[at]the[dash]malcolms[dot]freeserve[dot]co[dot]uk  
[at]=@, [dash]=- & [dot]=. *Warning* HTML & >32K emails --> NUL
Reply to
Ian Malcolm

do you need hi-fi? I scoped a name brand toy phone and saw only 4 different voltage levels at the speaker.

the easiest way that meets your requirements is best.

a raspberry pi zero has audio out and playback software and plenty of GPIO to trigger the noises with it, needs an SD card. you could do development on a "pi2 model B" then switch to the cheaper zero for deployment

if you don't need hi-fi there are cheaper message recorder chips.

--
  \_(?)_
Reply to
Jasen Betts

Even if it is overkill, why not simply using a Rapsberry Pie ? An A+ variant has a nice stereo audio codec and can store zillion of audio files on an SD card, for 20$ or so.

Robert

Reply to
Robert Lacoste

the zero has audio out only through HDMI.

need some hacking to output analog audio:

formatting link

Bye Jack

Reply to
jack4747

Class-D?

Reply to
krw

Sounds like a perfect job for the $5 Raspberry Pi Zero

formatting link

Reply to
DemonicTubes

Looked more like a 2-bit DAC to me, drive was single-ended, audio quality was poor.

--
  \_(?)_
Reply to
Jasen Betts

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.