How to make fft into a circle

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() {

  barWidth = width/float(bands);

  file1 = new SoundFile(this, "song.mp3");;
  fft2 = new FFT(this, bands);

void draw() {

  translate(width/2, height/2-1100);
  for (int i = 0; i < bands; i++) {
    sum[i] += (fft2.spectrum[i] - sum[i]) * smoothingFactor;
    ellipse(i*barWidth, height, barWidth, -sum[i]*height*scale);

1 Like

Check these two:

The second is a YT video from Daniel explaining the concept.



Thanks for responding so soon! Do you know of any examples that are not in p5.js? I am very new to processing and have not branched out to anything else yet.

The first three are Processing java. If you don’t understand any of the concepts, start with simpler sketches. Have a look at the provided examples that come with Processing as well as these tutorials:

I recommend the 2D transformations.


The first three are not all processing java. The first one is primarily p5.js and the second one is a p5.js video. Thanks anyway.