Pauses and polyphonic sounds
Dear all,
I was thinking if I should start another thread on this or not.
The story is, I have now tried everything there is to try with WTV020SD module (same thing as SOMO-14D) and also the IC alone and it has lead to an understanding this solution is not suitable for what I need due to the following reasons:
1. There is always a noticeable pause between the sound files. So if you want to loop an "engine idling" file, say, forever, you will get noticeable pauses of tens of milliseconds between each "restart". Similarly, if you play "engine start" and want to continue with "engine idling", there will be a pause or silence between the two. The pauses are because of how WTV020SD is designed. Response times much faster than those in the data sheet are achievable, but are still way to slow for the observer not to notice.
2. There is no way to play multiple sounds or mix sounds. Say, my model car is cruising around at certain speed that corresponds to "revs22" file. Now, if I want to play a "horn" file, the only option would be to play "revs22_horn" file shortly in between "revs22" file playbacks. While that would be fine, given the massive storage available on the SD card (I would need 33 horn files, for every speed step of 32+idle), the problem #1 excludes that option alltogether.
If either of those problems could be overcome, I could probably use this solution by working around the limitation. Both at the same time - not possible.
Now I have a reasonable standard approach forward. Namely, there are ICs that are fully capable of solving all my current problems (probably introducing new problems
). However, as mentioned earlier, the size of the ICs themselves, the number of external components required and cost (like this VS1003
here) all make this approach prohibitive.
Thus, there is a strong incentive and some "budget" to try and do the impossible of picaxe based sound system. The results on this thread seem to prove this might not be so impossible. Here is a little roadmap I have put up:
0. Learn more about sound files and how machines record, generate and play back sounds;
1. Source suitable, 8Mbit+, SPI flash ICs;
2. Figure out how to write raw audio files onto the flash, how to organise it into "files", etc;
2a. Make picaxe40x2 to talk to the flash memory (SPI, random and continuous modes);
2b. Make a mac to talk to the picaxe40x2;
2c. Teach picaxe40x2 to get data from mac and store it in the flash memory;
3. Teach picaxe to playback the audio files;
4. Teach picaxe40x2 to listen to hserin or I2C commands from another picaxe for which file to play;
5. Attempt to play more than one file at the same time [switch between pieces of files, do it very fast];
5a. Find out if the two independent pwm channels can be supplied with sound file data each and then mixed;
5b. Find out if there are external ICs with reasonable footprint (like none) for mixing that provide any advantage;
6. Look at output filter and speaker designs to see what gives the best sound output quality;
7. Investigate if adding an amplifier would make things any better.
If you have any thoughts on the above [apart from those I'm a crazy person
], you are most welcome to share.
Thank you all for your input,
Edmunds