Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
playing back prerecorded samples at varing speeds
2005-01-28 - 08:10:54
edited 2005-01-30 - 08:03:45
what electronics components are required to playback prerecorded samples (wav,mp3, whatever sound format required) at varing speeds?
2005-01-28 - 16:05:44
edited 2005-01-28 - 16:05:44
You using Basic stamp (if so what version)
or SX? Whats your data recorded on, flash memory? Whats the maximum samples/sec you want to play at?
Wave is by far the easier sound format to cope with. You'll need a specialty chip to do mp3, wave can be done fairly easily.
Post Edited (Paul Baker) : 1/28/2005 4:15:46 PM GMT
2005-01-28 - 22:00:00
edited 2005-01-28 - 22:00:00
hi paul. thanks, for the quick responses. i actually havent purchased any electronics. i am in the the brainstorming process. i am not familiar with electronics, so this is a learning attempt. what would you recommend for the stamp version, memory type and maximum sample rate?
2005-01-28 - 22:18:46
edited 2005-01-28 - 22:18:46
Well it depends on what kind of fidelity your looking for. Generally your sample rate is twice the highest frequency of your signal. Now that I've put more thought into it you might be testing your luck using a stamp. The fastest stamp performs 12,000 operations/second, typically 8,000 samples/second is the lowest you want to go with playing wave data (meaning the highest frequency is 4kHz), and doing each sample will take more than two operations (meaning doing a straight push won't work). You could most definately do it with an SX using the BASIC compiler thats availible, its a little more difficult to use than a stamp because your not shielded from the SX architecture which is a little quirky as far as microcontrollers go(BTW the fastest stamp uses an SX as its brains). But your program should be pretty small, meaning your not likely to have as much problems as with a big program (The SX will run over 10x the number of basic commands than the fastest stamp will). I'm not saying you can't use a stamp, but it will require a little bit of offboard "magic". I am actually feverish right now and I am leaving work early to get some rest, let me mull over the idea abit and I will get back to you on it.
2005-01-29 - 22:02:46
edited 2005-01-29 - 22:02:46
Ok, lipservice I'm feeling a little better, whats the range of playback speeds you looking for, are you looking for a continuous range or discrete values (like 1/2, 1, 2)? Oh and another thing, how much total playback time are you looking for?
2005-01-30 - 04:57:45
edited 2005-01-30 - 04:57:45
could the speeds be variable? i think 30 seconds or less is a good sample size. thanks for continuing to respond paul.
2005-01-30 - 07:27:54
edited 2005-01-30 - 07:27:54
yeah speed can be variable, it limits the options though, again if you can answer the following questions:
1) whats that minimum/maximum playback speed you want (ie. half speed to twice speed)
2) what quality playback do you want (just enough to make out the sound, internet voice, internet music, FM radio, cassette tape, CD)
3) do you have the means of transferring your sounds to a flash memory?
I'll draw up a vague schematic of what I'm leaning towards assuming your using a basic stamp (though this is much more easily accomplished with the SX)
2005-01-30 - 08:03:45
edited 2005-01-30 - 08:03:45
Ok heres the general setup using a stamp, alot of the details cannot be filled in until I know more specifics.
This schematic is for playback only and assumes you have prerecorded the audio information onto the flash memory. To record the data onto the flash will require a different circuit. It also assumes you want to play the entire message
from start to finish. If any of these assumptions are wrong, they are easily changable, but it will require more chips.
The synopsis of the circuit is as follows: The stamp loads a value into a register (not shown) which feeds a parralel load input of a counter,
that acts as a clock divider (setting your playback speed). The output of the prescale counter drives the address counter which cycles through the addresses of your flash audio data. That data is fed to a
Digital to Analog Converter and the outputted analog signal
is amplified before sending
it to your speaker.
If you did this with an SX48/52 all you'd need
is the flash memory and audio amplifier.
555 x 219