Okay, here's another version. This will be the final. I added code to allow you to more easily track the wav file. Also, I strictly say this thing will work perfectly for audio files well over 1 second of audio and well under 2GB of data. Beyond those limits and the realities of mathematics and device speed come into play. Enjoy!
Chip did this for me with his StereoDuty object -- which is really quite simple once done (I use this in the AP-16+). Instead of writing your volume-adjusted samples to the counter/DACs, you reconstruct a 32-bit word and write it to the hub to be picked up by StereoDuty. This takes care of adding white noise to the sample that is removed by the DAC's RC circuit.
Hi Jon,
Is this "StereoDuty" object available for download? Don't see it on OBEX.
I have a post here where I'm asking the best way to play a .wav or .mp3 player. I'm trying to develop a keypad that will lock/unlock a cabinet. At the same time, I'm trying to get this keypad to play audio sounds to me in my office if the kids are attempting to unlock this cabinet. In a way, I'm trying to get this keypad to act like a doorbell/door lock. If I type the correct combination of keys then it should unlock the cabinet; however, if I do not then it will play the incorrect password .wav/.mp3 file.
Any feedback/suggestions would be wonderfully helpful. I'm currently trying to get the "shopping list" of items together that I would need to purchase to get this all together. Also, any programming I may need to learn in order to pull this all off.
Yeah, the propeller demo board is all you need to use the software. It's as simple as it can get. Use the lastest driver here: http://obex.parallax.com/objects/567/
Then just use the matric keypad parallax has on their website, they have the software needed to use it in the propeller tool library.
Good luck - Please do not use this thread to work your idea out. It will get lost and ignored then.
Could the noise problems people have with generating audio on the prop be eliminated by using dual cogs and or dual output pins tied to each other also?
There has got to be a hardware way to eliminate this noise using multiple cogs and multiple output pins putting out the same signals? Differential like...
Reading that the sound is ok on speaker and headphones, but not on more sophisticated equipment gets me thinking that this could be RF interfering with the sound amplifiers and create (new) noise. The fix would be to fit chokes on all outgoing wires. An RC network would not be able to stop the RF.
E
The driver has something to compenstate for that now. Please read trhough the source code and look at the "DACDitherEngineStart" and how it is used in the demo. Thanks,
Using a 2 cog approach the sound quality is very good.
@Erlend - Yes, the hardware you use also greatly affects audio quality like any other device. The amount of work put into the hardware design affects the quality of the sound. Propfessional audio deveices don't just use a RC circuit to make audio. Lots more goes into them.
Comments
Hi Jon,
Is this "StereoDuty" object available for download? Don't see it on OBEX.
Thank you for posting your .zip doc with the programs/coding to play a .wav file. I've been looking for something just like this!
I have a few questions though. Which "demo board" would I need? The Propeller Demo Board? Would you recommend the Propeller Starter Kit?
I have a post here where I'm asking the best way to play a .wav or .mp3 player. I'm trying to develop a keypad that will lock/unlock a cabinet. At the same time, I'm trying to get this keypad to play audio sounds to me in my office if the kids are attempting to unlock this cabinet. In a way, I'm trying to get this keypad to act like a doorbell/door lock. If I type the correct combination of keys then it should unlock the cabinet; however, if I do not then it will play the incorrect password .wav/.mp3 file.
Any feedback/suggestions would be wonderfully helpful. I'm currently trying to get the "shopping list" of items together that I would need to purchase to get this all together. Also, any programming I may need to learn in order to pull this all off.
Thanks in advance!
Then just use the matric keypad parallax has on their website, they have the software needed to use it in the propeller tool library.
Good luck - Please do not use this thread to work your idea out. It will get lost and ignored then.
Thanks,
This might make a good addon to my black box sequencer so I can sample wav files into the sound output.
http://forums.parallax.com/showthread.php?115258-TheBlackBox-Release-v2.0-Propeller-HSS-FX-Sequencer-with-Digital-Audio-SPDIF
I'll probably just add on a 5th prop that is dedicated to wav file playback, and have it run a few channels of wave output.
Thanks for this!
CL
There has got to be a hardware way to eliminate this noise using multiple cogs and multiple output pins putting out the same signals? Differential like...
E
Using a 2 cog approach the sound quality is very good.
@Erlend - Yes, the hardware you use also greatly affects audio quality like any other device. The amount of work put into the hardware design affects the quality of the sound. Propfessional audio deveices don't just use a RC circuit to make audio. Lots more goes into them.