It does Can’t thank you enough for all your help!!
One last thing the last set of changes means we don’t need the if
statement in drawTrace()
so we have
void drawTrace() {
stroke(traceCol);
strokeWeight(16);
float prevX, prevY, currX, currY;
int pos = max(1, startIdx);
prevX = pos * traceStep;
prevY = trace[pos] * maxAmp;
for (; pos < trace.length; pos++) {
currX = pos * traceStep;
currY = trace[pos] * maxAmp;
line(prevX, midH + prevY, currX, midH + currY);
prevX = currX;
prevY = currY;
}
}
Glad to have helped
Thanks for the hint