fft

Peak-finding algorithm for Python/SciPy

I can write something myself by finding zero-crossings of the first derivative or something, but it seems like a common-enough function to be included in standard libraries. Anyone know of one? My particular application is a 2D array, but usually it would be used for finding peaks in FFTs, etc. Specifically, in these kinds of problems...

Clarification on FFT

I know there is something wrong with the following reasoning but I'm not sure what it is. The FFT: given two polynomials A = a_0 + a_1 x + a_2 x^2 + ... + a_n x^n and B = b_0 + b_1 x + b_2 x^2 + ... + b_n x^n you can compute the coefficients of the product AB = \sum _k = 0 ^ 2n ( \sum _ j = 0 ^ k (a_j b_{k-j}))x^k in O(n lo...

Which time-frequency coefficients does the Wavelet transform compute?

The Fast Fourier Transform takes O(N log N) operations, while the Fast Wavelet Transform takes O(N). But what, specifically, does the FWT compute? Although they are often compared, it seems like the FFT and FWT are apples and oranges. As I understand it, a more appropriate comparison would be the STFT (FFTs of small chunks over time) ...

How to use numpy with portaudio to extract bass, mid treble

As in this example http://stackoverflow.com/questions/259451/how-to-extract-frequency-information-from-an-input-audio-stream-using-portaudio I'm curious about portaudio and numpy... I'm not 100% sure about fft, how can I pass numpy a chunk and get back three values from -1.0 to 1.0 for bass, mid and treble ? I don't mind if this just...

Magnitude of FFT result depends on wave frequency?

I'm baffled by the results I'm getting from FFT and would appreciate any help. I'm using FFTW 3.2.2 but have gotten similar results with other FFT implementations (in Java). When I take the FFT of a sine wave, the scaling of the result depends on the frequency (Hz) of the wave--specifically, whether it's close to a whole number or not....

Audio File FFT in an OS X environment

I'm looking to perform an FFT on a linear PCM audio file (with potentially more than one audio channel) on OS X. What is the best way to go about this? Several sources have indicated that Apple's Accelerate Framework is what I need. If so, how should I extract and properly prepare the floating point data for use in those FFT functions...

Using Core Audio to extract floats from AIFF

Is there a way using Core Audio on OS X to extract a set of frames in an AIFF file into an array of 32-bit floats suitable for performing an FFT on? ...

MATLAB: creating a graph using fft

I have data for the y axis of a graph and I need to perform FFT on the data to receive a graph. I don't have much experience with Matlab, any help will be very appreciated. ...

"Winamp style" spectrum analyzer

I have a program that plots the spectrum analysis (Amp/Freq) of a signal, which is preety much the DFT converted to polar. However, this is not exactly the sort of graph that, say, winamp (right at the top-left corner), or effectively any other audio software plots. I am not really sure what is this sort of graph called (if it has a dist...

Coding UnsharpMask without Fourier functions

I am doing some image processing code in C#, but I cant use any libraries or GNU like code. The UnsharpMask function depends on Gaussian blur which in turn depends on Fourier Transforms. I wrote code for all this and things are working, but to make a long story short, I need to remove the FFT functions. Is there any way to perform unsh...

Sine wave frequency fitting

This question is based on a previous similar question. I have the following equation and an adjusted (some random data): 0.44*sin(N* 2*PI/30) I am trying to use the FFT to get the frequency from the data generated. However the frequency ends up being close but not equal to the frequency (which makes the wave a bit larger than intended)...

Spectrogram C++ library

Hi For my current project in C++ / Qt I need a library (LGPL is preferred) which can calculate a spectrogram from a signal ( basically an array of doubles ). I already use Qwt for the GUI part. Any suggestions? Thanks. ...

Using FFT in MATLAB on multiple matrices of data to find differences within responses

I have 4 matrices of data F1,F2,O1,O2. All are neural signals collected at 1ms for a second. F1 and O1 were collected at the same time as with F2 and O2. I need to find how the data collected differes between the 2 trials and also compare the components of each trial (F1 and O1) to each other to notice and differences in respones. I'm ne...

C: Numerical Recipies (FFT)

This question is directed at any fans of Numerical Recipes or anyone that understands FFT well. Can anyone explain why the real component is calculated by -2*(sin(theta/2))^2 ? I can't seem to wrap my head around it. I've seen other examples such as http://www.dspdimension.com/admin/dft-a-pied/ tutorial which simply takes cos(theta) as ...

How can I compare market data feed sources for quality and latency improvement?

I am in the very first stages of implementing a tool to compare 2 market data feed sources in order to prove the quality of new developed sources to my boss ( meaning there are no regressions, no missed updates, or wrong ), and to prove latencies improvement. So the tool I need must be able to check updates differences as well as to tel...

Pitch detection using FFT for trumpet.....

Hi...How do i get frequency using FFT? What's the right procedure and codes? ...

c++ FFT Beat detection library?

Hi, I am currently looking around for a good allround beat detection library / source code in C++ since I found it really hard to achieve satisfying results with the beat detection code I wrote myself using this tutorial: http://www.gamedev.net/reference/programming/features/beatdetection/ It's especially really hard if you want to mak...

sending audio data to javascript

hi, i was wondering if there is any way to get audio signals from a microphone into javascript (interfacing with flash, processing.js, etc.). i've seen examples of javascript receiving data (a string) from flash (http://www.permadi.com/tutorial/flashjscommand/) but am curious if it's possible to record from a microphone using something ...

How to calculate the square of (x + x2 + x4 + x5+x8) using FFT in PHP?

It's from this answer,which is said to be a nlgn algorithm. ...

STFT and ISTFT in Python

Is there any form of short-time Fourier transform with corresponding inverse transform built into SciPy or NumPy or whatever? There's the pyplot specgram function in matplotlib, which calls ax.specgram(), which calls mlab.specgram(), which calls _spectral_helper(): #The checks for if y is x are so that we can use the same function to ...