Hi Processing community, I am trying to recreate the effect from this video (8:28 minutes in) which draw the song amplitude as a continuous animated line. I got to the point where I have dots flying around, but have hard time translate the rest p5 code to Processing, especially have difficulty understanding the `volhistory.push(vol)`

part and `splice`

function. Thanks for helping.

PS: sorry, can’t seem to update .mp3 file here…

```
import processing.sound.*;
FFT fft;
SoundFile xmas;
int bands = 512;
float[] spectrum = new float[bands];
void setup() {
size(512, 512);
background(255);
xmas = new SoundFile(this, "xmas.mp3");
fft = new FFT(this, bands);
fft.input(xmas);
play();
}
void draw() {
background(255);
fftFunc();
}
void fftFunc() {
fft.analyze(spectrum);
for (int i = 0; i < bands; i++) {
stroke(0);
beginShape();
vertex(i, height - spectrum[i]*height*50);
endShape();
}
}
void play() {
xmas.play();
}
```