We are about to switch to a new forum software. Until then we have removed the registration on this forum.
(I am japanese…so, if above is not good English, please ask me. I'm using Processing 2.0)
Hi, I am beginner on Processing.
I want to make something like "Equalizer" with Processing.
but, I can't understand the meaning of the function fft.getband(int i)
getband(int i)
method "Returns the amplitude of the requested frequency band. "
(Please see http://code.compartmental.net/minim/javadoc/ddf/minim/analysis/FourierTransform.html#getBand(int))
What is the amplitude?
the amplitude changes with fft.timeSize
?
What is the difference with "db" ?
Following is my code.
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
Minim minim;
AudioPlayer ap;
FFT fft;
void setup()
{
int timeSize = 2048;
size(1280, 720);
minim = new Minim(this);
ap = minim.loadFile("sound_file.mp3", timeSize);
fft = new FFT(ap.bufferSize(), ap.sampleRate());
}
void draw()
{
background(0);
stroke(255);
fft.forward(ap.mix);
ap.play();
for(int i = 0; i < fft.specSize(); i++)
{
float band = fft.getBand(i);
float vo = height - band * 16;
line(i + 128, height, i + 128, vo);
}
}
}
void stop()
{
ap.close();
minim.stop();
super.stop();
}
(Please refer "File > Examples > Libraries > minim > AnalyzeSound")
When I change timeSize
, the amplitude changes as almost large as timeSize
.
How can I make EQ with Processing ? It itn't the best way coding with Processing?
Please help me…