Hai,

for a schoolproject i want to create a round spectrogram, but I am still kinda new to processing. I created with my teacher this code and I actually want to add a color (or even more) to the spectrogram. It does not work with a simple fill. The next step i want to do is to make it a circular spectrogram like this -> https://vimeo.com/27135957. Does somebody know how?

Thanks!

```
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer song;
FFT fft;
int colmax = 1000;
int rowmax = 500;
int[][] sgram = new int[rowmax][colmax];
int col;
int leftedge;
void setup()
{
size(200, 300, P3D);
minim = new Minim(this);
song = minim.loadFile("sun_sonification.wav");
song.play();
fft = new FFT(song.bufferSize(), song.sampleRate());
fft.window(FFT.HAMMING);
frameRate(40);
}
void draw()
{
background(0);
stroke(255);
// perform a forward FFT on the samples in the input buffer
fft.forward(song.mix);
for (int i = 0; i < rowmax /* fft.specSize() */; i++)
{
// fill in the new column of spectral values
sgram[i][col] = (int)Math.round(Math.max(0, 2*70*Math.log10(1000*fft.getBand(i))));
}
col = col + 1;
if (col == colmax) {
col = 100;
}
for (int i = 0; i < colmax-leftedge; i++) {
for (int j = 0; j < rowmax; j++) {
stroke(sgram[j][i+leftedge]);
point((i*PI), height-j);
}
}
//Draw the rest of the image as the beginning of the array (up to leftedge)
for (int i = 0; i < leftedge; i++) {
for (int j = 0; j < rowmax; j++) {
stroke(sgram[j][i]);
point(i+colmax-leftedge, height-j*sin(height/2));
}
}
}
void stop()
{
song.close();
minim.stop();
super.stop();
}
```