Hi, to start, sorry for my English but I’m French so I’ll maybe do some mistakes.
I’m totally new on Processing and I’d like to get bass of the song of my PC. To do it, I already found a code wich do a spectrograme of the sound of my PC.
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;
Minim minim;
AudioInput in;
FFT fft;
int w;
void setup()
{
size(640, 840);
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO, 512);
fft = new FFT(in.bufferSize(), in.sampleRate());
fft.logAverages(60, 7);
stroke(255);
w = width/fft.avgSize();
strokeWeight(w);
strokeCap(SQUARE);
}
void draw()
{
background(0);
fft.forward(in.mix);
for(int i = 0; i < fft.avgSize(); i++) {
line((i * w) + (w / 2), height, (i * w) + (w / 2), height - fft.getAvg(i) * 4);
}
}
I saw that the 5th, 6th, 7th 8th and 9th columns correspond to the bass of the music :
https://gyazo.com/2a58b24018f36c37d207b346ca7fa680
I would like to know, with my code when there are bass frequencies.
I totally don’t know how to do it;
Can you help me please ? Thanks a lot