Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to use FFT?
    primarykey
    data
    text
    <p>I'm working on an android application which records sound and then gets the FFT of that recordning. I've been doing lots or research and found alot of things on stack overflow,, but im confused on what to use ,</p> <p>from this link: <a href="https://stackoverflow.com/questions/7604011/how-can-i-get-frequency-data-from-pcm-using-fft">How can I get frequency data from PCM using FFT</a></p> <p>i found this answer very useful:</p> <p>Assuming the audioData array contains the raw audio data, you need to create a Complex[] object from the audioData array as such:</p> <pre><code> Complex[] complexData = new Complex[audioData.length]; for (int i = 0; i &lt; complexData.length; i++) { complexData[i] = new Complex(audioData[i], 0); } </code></pre> <p>Now you can pass your complexData object as a parameter to your FFT function:</p> <pre><code> Complex[] fftResult = FFT.fft(complexData); </code></pre> <p>And i did that! but my issue is ,, is this all? do i need to do anything else? and what is FFT.fft(complexData) supposed to do?! </p> <p>Or do i have to use: fft.complexForward(a),or realForward(double[] a), or.... From this link: <a href="http://incanter.org/docs/parallelcolt/api/edu/emory/mathcs/jtransforms/fft/DoubleFFT_1D.html#complexForward%28double%5B%5D%29" rel="nofollow noreferrer">http://incanter.org/docs/parallelcolt/api/edu/emory/mathcs/jtransforms/fft/DoubleFFT_1D.html#complexForward%28double%5B%5D%29</a></p> <p>Note: i'm using this FFT class: <a href="http://www.cs.princeton.edu/introcs/97data/FFT.java" rel="nofollow noreferrer">http://www.cs.princeton.edu/introcs/97data/FFT.java</a> and this is the complex class to go with it: <a href="http://introcs.cs.princeton.edu/java/97data/Complex.java.html" rel="nofollow noreferrer">http://introcs.cs.princeton.edu/java/97data/Complex.java.html</a></p> <p>And i already imported the jtransform: import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D;</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload