SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By molindz
#192600
Hi,
I have received my Wav Trigger, I'm happy, it works perfect.
Now. I need to use it in a very simple way. I will use it only as a player. The only need I have is that when I trigger a track it makes a crossfade with the tracks is already sounding.
Thanks a lot for your collaboration.
#192839
I believe the WTBasic example demonstrates cross fading. Here is a the snippet from the example...
Code: Select all
  // State 1: Demonstrates how to cross-fade music tracks
          case 1:
              wTrig.trackGain(1, -40);              // Preset Track 1 gain to -40dB
              wTrig.trackPlayPoly(1);               // Start Track 1
              wTrig.trackFade(1, 0, 3000, false);   // Fade Track 1 up to 0db over 3 secs
              wTrig.update();
              delay(2000);                          // Wait 2 secs
              wTrig.trackFade(2, -40, 3000, true);  // Fade Track 2 down to -40dB over 3 secs and stop
          break;