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 › FFT array index out of bounds
Page Index Toggle Pages: 1
FFT array index out of bounds (Read 903 times)
FFT array index out of bounds
Jan 2nd, 2008, 4:07am
 
Hi, I'm getting this "array-index-out-of-bounds-exception" error using ESS and "getLevel()" with FFT. I'm running code that amounts basically to what Krister has over at the ESS site, because past working from examples I don't really know what I'm doing. Any help would be super.
Re: FFT array index out of bounds
Reply #1 - Jan 4th, 2008, 2:01am
 
grahambw,
Check to make sure that when you are creating the new FFT, that the parameter for the number of bins is a power of 2. This is mentioned in the FFT page under Parameters (there's an example too):
http://www.tree-axis.com/Ess/FFT/FFT.html

Hope that helps, I was having the same problem
Re: FFT array index out of bounds
Reply #2 - May 18th, 2008, 9:12pm
 
I'm having a similar problem, but I'm not doing any frequency analysis, just getting levels, so I didn't set any initial parameters when creating a new FFT.

I'm just trying to get live volume information. As in:

Ess.start(this);
myInput = new AudioInput();
myFFT = new FFT();
myInput.start();

p_vol = myFFT.getLevel(myInput);

Any suggestions?

Page Index Toggle Pages: 1