Loading WAV files into EEPROM for playback?
WBA Consulting
Posts: 2,935
After a bit if searching across the forums, I didn't find a clear answer on my question, so here goes:
I would like to make an extremely simple circuit that consists of a prop, crystal, 64k EEPROM, and a tiny speaker. When powered, all I want it to do is play a 4 second wave file, that is only speech quality.
My question: How do I get the WAV file into the EEPROM and what WAV player Object/Code snippet would you recommend?
thanks!
I would like to make an extremely simple circuit that consists of a prop, crystal, 64k EEPROM, and a tiny speaker. When powered, all I want it to do is play a 4 second wave file, that is only speech quality.
My question: How do I get the WAV file into the EEPROM and what WAV player Object/Code snippet would you recommend?
thanks!
Comments
You could use Mike Green's EEPROM code to move different files in and out of HUB RAM from an EEPROM and then play them...
It also looks like if my WAV files are small enough, I could define two separate wav files in the DAT section. However, after looking at a few WAV file samples, I think my 4 second WAV file will be about 30k. In that case, I will need to figure out how to make use of a larger EEPROM.
A little more light on the project: the 4 second WAV file would be a string of up to 8 digits. So, I guess I could just load separate 0-9 WAV files and call them out as needed and comment out the ones not used. For example, to play "17567", I only need to call out 1,5,6,and 7 WAV files and then just play them back to back in the code. Taking a look at the "number" WAV files from Gadget Gangster's Propeller Popcorn Clock, my "17567" example would need 66kb of space. Those are 16 bit mono WAV files, but still makes me believe that I would need more than than the standard 32kb on the Prop for the WAV file storage so I do need to figure out how to get the WAV data into a larger EEPROM.