WAV Trigger Fades

Hello,

I’m controlling a WAV trigger serially using an Arduino UNO and the wavTrigger Lib.

In addition to Play & Stop commands I’m using the Pause & Resume serial calls.

When you Pause & Resume a track in the middle of a sound wave you get an audible ‘pop’ or ‘click’

I would like to be able to combine the Fade function with Pause & Resume to get rid of the click.

To have a quick volume Fade before the Pause is called. And a quick Fade up just before the Resume is called.

Is this possible? What would the syntax for this be??

Thank you.

Have you tried using the trackFade() function?

Just fade the track to -50dB over, say, 100ms, waiting 100ms then pausing it. To restart, resume it, and then immediately fade the track to 0dB (or whatever level you want) over 100ms.

Thank you for the reply. For the 100ms pause, Can I use delay(300) or should I use a millis() based delay? Does the standard delay() call halt the fading process in the background?

If you aren’t doing anything other than waiting, then delay(100) will pause the Arduino for 100ms. The fades are done by the WAV Trigger and using delay() on the Arduino does not affect the WAV Trigger. Review the example sketches in the WAV Trigger Serial Arduino Library to see how to do this.