Hi, i’m trying to make audio reactive visuals from an electric guitar input. For now im just trying to obtain sound values to work on.

Guitar pitchs work from 82 to 987 Hz, and I use minim fft analysis to detect the amplitude of each note, there are 43 different freqs to analyze in that range.

The problem is that, as there are so many frequencies in that range, the only way i’ve found for

making minim separate them into different amplitudes is making a 8192 samples bufferSize, as the spectrum analized is of 22010Hz ( Nyquist frequency, half the .mp3 samplerate, 8192 ), to, for example, getting a different amplitude value for 82Hz and 92Hz, not being analyzed as one group.

So i’m analyzing a total of 8192 samples in an enormous range, to just work with the ones between 82 to 987Hz, using the getFreq() function. This itself gets low performance, and making somewhat intricate realtime visuals on top of that is getting complicated.

Is there a way to make minim (or .sound) just FFT the frequency range i’m interested on? Can I maybe modify the library .dll? Is there a more proper method to work on this pitch range than FFT? Thanks, best regards.

On the other side, im also using WindowFunction FFT.LANCZOS, i don’t have much idea of what is the difference between the options available, but i’ve found this one isolates the amplitudes better.

YOU CAN USE THE SAME MP3 FILE I’M USING, google drive link

```
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer guitarra;
FFT fft;
String windowName;
float barWidth;
//guitar pitch notes
float F[] = {82.41,87.31,92.50,98.00,103.83,110.00,116.54,123.47,130.81,138.59,146.83,155.56,164.81,174.61,185.00,
196.00,207.65,220.00,233.08,246.94,261.63,277.18,293.66,311.13,349.23,369.99,392.00,415.30,440.0,466.16,
493.88,523.25,554.37,587.33,622.25,659.26,698.46,739.99,783.99,830.61,880.00,932.33,987.77};
void setup() {
size(600,400);
minim = new Minim(this);
guitarra=minim.loadFile("guitarra.mp3", 8192);
guitarra.loop();
//smooth(10);
fft = new FFT( guitarra.bufferSize(), guitarra.sampleRate() );
barWidth = width/float(F.length);
windowName = "Rectangular Window";
WindowFunction newWindow = FFT.LANCZOS;
fft.window( newWindow );
windowName = newWindow.toString();
background(0);
noStroke();
}
void draw()
{
fft.forward( guitarra.mix );
background(0); fill(100,100,100);
for(int i = 0; i < F.length; i++)
{
rect(i*barWidth, height, barWidth, -fft.getFreq(F[i]));
//println(F[i]+": "+fft.getFreq(F[i]));
}
}
```