Minim - Duration of maximum peaks
in
Core Library Questions
•
3 years ago
hi
i am very new to processing enviroment and i have a very simple and basic question..
i am using minim.FFT to find the peaks from an audio source.
how i can everytime compare the last two peaks in order to find how much time has
passed since another peak occurs.
i tried to store the values to an array and then compare the elements but had no lack.
i know its simple but i dont have the programming knowledge yet to do this.
here is a part of my code that i have stucked to
can anyone help me?
Thank you..
i am very new to processing enviroment and i have a very simple and basic question..
i am using minim.FFT to find the peaks from an audio source.
how i can everytime compare the last two peaks in order to find how much time has
passed since another peak occurs.
i tried to store the values to an array and then compare the elements but had no lack.
i know its simple but i dont have the programming knowledge yet to do this.
here is a part of my code that i have stucked to
my purpose is to find the the time that every maxband lasts.fft.forward(player.mix);//FFT ON THE BUFFER
for(int i=0;i<spectrum.length;i++)
{
spectrum[i] = (fft.getBand(i));//FILL THE ARRAY WITH THE SPECTRUM
line(i,height,i,height-fft.getBand(i));//DRAW THE SPECTRUM
if ((fft.getBand(i)>fft.getBand(maximum))&&fft.getBand(i)>120)
{
maximum=i;
currMaxBand = fft.getBand(maxim);
count=millis()-start;
}
}
start = millis();
can anyone help me?
Thank you..
1