PicoMite: can we explain/fix "ticking" when using PLAY SOUND


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8683
Posted: 12:29pm 17 Mar 2023      

Play tone takes the duration you specify and  modifies it to an exact number of waves starting and ending at VCC/2 (approx) which is the resting level of the "DAC". Play sound can't do this because there can be up to 4 different waveforms with different frequencies all happening at once. This means that whenever you change one of the sounds there will be a discontinuity as the new waveform always starts again at VCC/2. This can create clicks. You can program round this by reducing the volume of the specific sound incrementally before you make a change. That will bring it back to VCC/2 ready for the new sound.

The SDcard is a different issue. Because we don't have a card detect the firmware polls the card every so often to determine if it has been removed. This is needed to reset ready for a new insertion. The polling only starts after the first use of the SD.

Regular clicking will be the Sdcard. A click on change of sound will be as above

Depending on the quality of the filter on the audio any clicks will be more or less apparent.
Edited 2023-03-17 22:30 by matherp