The Tsunami.samplerateOffset method doesn’t seem to be working.
For example, here is some code that should play a track 16 on output 7 at different sample rate offsets. But I hear no differences in the sound.
tsunami.trackPlayPoly(16, 7, true);
tsunamiDelay(200);
for (int i = -30000; i < 30000; i += 500) {
Serial.println(i);
tsunami.trackStop(16);
tsunami.samplerateOffset(7, i);
tsunami.trackPlayPoly(16, 7, true);
tsunamiDelay(200);
}
tsunami.trackStop(16);
I tried it without stopping and restarting the track, and didn’t any changes in pitch either. Note that tsunamiDelay is a function that delays for a certain number of ms while calling tsunami.delay();
The documentation for tsunami.samplerateOffset isn’t very clear. Could someone provide any example of it being used to change the pitch/speed of a sound file?
Thanks,
Bill Pugh