reacting to soundwave + p5sound update

sinewave.js reacts to the sound waveform. Also I updated p5sound, and now any calls to p5sound functions that happen before setup() must be moved to setup().
I'm trying to figure out how to get the waveform transition from one snapshot to the next more gradually...

I tried this but then the shifts were too sudden.

     if (frameCount % 20 == 0 ) {
       waveform = fft.waveform();
     }

I'll come back to it later...