Seamless frequency circle (FFT)

not sure if this is of any use but maybe you could try a different way to update the circle points? I did a similar thing on my app but mapped the x/y values manually and held them in an array of objects Id created (my points object), it looked a bit like this (i have removed a lot of the code to try to just show bits that might be relevant)…

Update code…

for (int i = 0; i < waveBuffer.length; i++) {

   offset = PApplet.map(waveBuffer[i], -1, 1, -workingWidth / localHeight, workingWidth / localHeight);
   angle = PApplet.map(i, 0, waveBuffer.length * 2, 0, PConstants.TWO_PI);

   points.get(i).location.x = (float) (((workingWidth - workingWidth * 0.1) + offset) * PApplet.cos(angle));
   points.get(i).location.y = (float) (((workingWidth - workingWidth * 0.1) + offset) * PApplet.sin(angle));  						
}

draw code…

beginShape();		
for (int i = 0; i < points.size() - 1; i++) {
  vertex(points.get(i).location.x, points.get(i).location.y);
}
endShape(PConstants.CLOSE);
1 Like