Hello! Is there a way to make this fft into a circle? Or other cool shape?
import processing.sound.*;
SoundFile file1;
FFT fft;
FFT fft2;
int bands = 128;
float smoothingFactor = 0.2;
float []sum = new float [bands];
int scale = 5;
float barWidth;
void setup() {
fullScreen();
barWidth = width/float(bands);
file1 = new SoundFile(this, "song.mp3");
file1.play();
fft2 = new FFT(this, bands);
fft2.input(file1);
}
void draw() {
background(255);
fft2.analyze();
pushMatrix();
translate(width/2, height/2-1100);
//beginShape();
for (int i = 0; i < bands; i++) {
sum[i] += (fft2.spectrum[i] - sum[i]) * smoothingFactor;
ellipse(i*barWidth, height, barWidth, -sum[i]*height*scale);
}
//endShape();
popMatrix();
}