We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Minim FFT getAvg() size
Page Index Toggle Pages: 1
Minim FFT getAvg() size? (Read 1050 times)
Minim FFT getAvg() size?
Jan 2nd, 2009, 8:32am
 
Does anyone know the actual upper bound for the size returned by FFT.getAvg(i)?

Seems odd not to use 0.0 to 1.0 as the range...
Thanks!
Re: Minim FFT getAvg() size?
Reply #1 - Feb 17th, 2009, 11:35pm
 
Knock!

I'll try to do some experiments to figure this out. I'll either find out or maybe even blow out my eardrums trying!
Re: Minim FFT getAvg() size?
Reply #2 - Feb 17th, 2009, 11:49pm
 
My eardrums are fine... I created a simple audio source with a sine wave and modulated the freq and amp. It seems as if the upper bound changes based on the frequency.

Is this because different frequencies carry different amounts of energy and the values are not normalized?
Re: Minim FFT getAvg() size?
Reply #3 - Feb 18th, 2009, 12:30am
 
Glad to hear your ear drums are fine Smiley
I think that is a reasonable assumption... It's just too bad that a) the values are not normalized or b) there are no methods to extract the current 'upper bound' to be able to use in a variety of applications.
Thanks for the reply!
Re: Minim FFT getAvg() size?
Reply #4 - Feb 24th, 2009, 3:19am
 
That function returns the value of the i<sup>th</sup> average band. The number of average bands is set directly by calling linAverages, or indirectly by calling logAverages. You can find out how many average bands there are by calling avgSize(). Does that answer it for you?
Re: Minim FFT getAvg() size?
Reply #5 - Feb 24th, 2009, 4:07am
 
ddf,
I realize that it returns the ith average band (from 0 to avgSize())
However, my question was initially why getAvg(i) does not seem to be normalized at all (returning a float between 0 and 1.0, for example).
Re: Minim FFT getAvg() size?
Reply #6 - Mar 20th, 2009, 10:22pm
 
what I do is keep an array that holds the highest value of every getAvg, and then map my getAvg from 0 to array[] and 0 to 1. the longer the music the plays, the more accurate it gets Wink
Page Index Toggle Pages: 1