Hello World, Does anyone know of a simple way of linking up sound to the arduino, so by touching various buttons plays linked 5 second sound byte e.g. Button one plays clip 1, button 2 plays clip two etc. I looked into pulling apart an MP3 player but I will only get forward and back buttons, which will get confussing if I jump between tracks.
Hello World, Does anyone know of a simple way of linking up sound to the arduino, so by touching various buttons plays linked 5 second sound byte e.g. Button one plays clip 1, button 2 plays clip two etc. I looked into pulling apart an MP3 player but I will only get forward and back buttons, which will get confussing if I jump between tracks.
It's not exactly a cost effective option, but I believe you can do it with http://www.sparkfun.com/commerce/product_info.php?products_id=7832
I doubt the Arduino has enough power to do realtime MP3 decoding, so the sound samples will be stored as wav style files.
These are large-ish and the Arduino memory is not, so you would need to add some sort of memory device.
There are some large-ish serial EEProms about - you could use one of them. You'll need some way of loading the sound data into the eeprom.
I'm not sure the PWM method of adc that is used on the arduino will operate adequatley at audio frequencies - i've never looked into it.
Mike
I doubt the Arduino has enough power to do realtime MP3 decoding, so the sound samples will be stored as wav style files.
I'm not sure the PWM method of adc that is used on the arduino will operate adequatley at audio frequencies - i've never looked into it.
Mike
FWIW, the wav style files you're referring to use PCM, or pulse-code modulation. If you're going that route, it will help to read up on that.
But I doubt the arduino is a good choice to try and play sound directly. IIRC, the PWM on arduino occurs at 1kHz, and this will need to be several times faster than your sampling rate. Even telephone quality needs 3kHz sampling, while CDs are 44.1kHz. (The samlping rate is roughly double your maximum frequency).
Thanks everyone for the input, looking at the mp3 decoder from sparkfun looks fine but its the control I am having problems with. I thought I could just buy a cheap USB MP3 player but I still cant control the tracks from say 1 to 8 individually without using forward and back keys (really need a key pad version with numbers 1 - 8 on it) without buying 8 of them...which may become the option.
I read about the arduino's capibilities of running direct sound and I really want CD quality, so I am going to chat to someone tonight about whether he can program something in flash for me (really need to learn this myself) and then I can pull apart a keyboard and link the sounds to the keys.
FTDI, who make the well-used USB-Serial chip, have this low-cost sound module that can play MP3 and other formats, as well as reading USB sticks and file system
http://vinculum.com/prd_vmusic1.html
You put your files on a USB stick and it can read the files and play them in response to commands sent over SPI or serial.
It's very cheap compared to similar offerings I've seen (20 GBP / US$40).
store link: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=55&title=VMUSIC
From what I've heard the default firmware is not so hot, but when you update it to the latest version (via memory stick) it works well.
ya this is a problem i see a lot of people having, i designed a shield that plays mono 22khz 16-bit wav files in realtime from an sd/mmc card but its not quite done yet. if you can wait 2 weeks (im completely swamped with maker faire) ill be posting up the code and schematics (as well as selling a kit/PCBs). just waiting for PCBs to arrive
then again, its not "CD quality" (which is stereo 44khz and i think 32bit)
then again, its not "CD quality" (which is stereo 44khz and i think 32bit)
CDs are stereo, 44.1KHz, 16-bit.
Your new shield sounds cool, but why a 12-bit DAC and 22kHz sample rate?
the DAC had to be DIP and low cost, & the best i could find was 12bit...
& the Arduino isnt fast enough (and doesn't have enough ram) to play 44khz.
the atmega328 might be able to do it since it would have a huge audio buffer, but doubtful.
22khz/12bit is still pretty good, considering its lossless audio
if you can find a 16-bit DAC in DIP that costs $2 ill throw that in
The sound module from FTDI looks idea, but being a newbie Im thinking I might trip up on programming it to play the individual tracks linked to the sensors. Over the last week I have taught myself flash and have made a series of buttons that play the individual tracks. Over the last month I have taught myself the basics of arduino and linked up a couple of buttons (until the ultrasound sensors arrive). Just have the job of getting my head around using a serial proxy (tinker.it) to link the two. I have also taken apart a keyboard and soldered on buttons which works OK with flash, but prefer to use different types of sensors.
Saying all that Im intreged by the shield as i am just looking for an off the shelf option really, as I am on enought of a learning curve learning what all the letters mean! Is there any good books for this or is it all trial and error.
Over the last week I have taught myself flash and have made a series of buttons that play the individual tracks.
Do you need the device to be standalone or can you just use a laptop?
If you can handle the flash part, it shouldn't be too hard to connect the sensors to the Arduino and access them from the PC. If all you need is buttons, you can consider a monome clone based on the parts at sparkfun.