# Questions tagged [fft]

The fast Fourier transform is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse.

2,138 questions
Filter by
Sorted by
Tagged with
868 views

### change the frequency component of a spectrum in an audio file

I am working on an audio dynamic range compressor using Matlab. After calculating the FFT of the audio file, I use several bandpass filters to amplify specific bands separately. What I want to do then ...
31k views

### Picking the correct filter for accelerometer data

I am fairly new to DSP, and have done some research on possible filters for smoothing accelerometer data in python. An example of the type of data Ill be experiencing can be seen in the following ...
8k views

I implemented a 4-point radix-4 FFT and found that I need to do some manipulation of the output terms to get it to match a dft. My code is a pretty direct implementation of the matrix-formulation so ...
613 views

I'm writing a program to emulate a vocoder and it obviously works, but any speech that comes through is very difficult to understand. I'm going to explain exactly how my implementation works and then ...
822 views

### How to choose a windowing function when performing a Chirp $\mathcal Z$-transform?

I've got some data sampled at 32 Hz. The only interesting stuff is happening between about 0-8 Hz and I've got to do real time batch processing and detect events with a delay of no more than a second. ...
4k views

### Implementation of goertzel algorithm in C

I am implementing BFSK frequency hopping communication system on a DSP processor. It was suggested by some of the forum members to use Goertzel algorithm for the demodulation of frequency hopping at ...
227 views

### Why this two ways of FFT are different?

I have a small question that I am confused. N=16; x=[-pi:2*pi/N:pi-2*pi/N]; y=1.5*cos(x) z=fft(y)/N we will get negtive Fourier coefficients, however when we do ...
13k views

### Beginner Attempting FFT Signal Filtering With Numpy

I've tried looking around for information on this, but I'm really out of my league here. I'm a guy who likes to fool around with Python, and I wanted to make a program that would filter an audio file. ...
2k views

### Demodulation of a BFSK frequency hopping signal using FFT

I am not very familiar with DSP techniques, and I am currently working on my research project to develop the firmware of a DSP processor, using C/Linux. It involves the modulation and demodulation of ...
8k views

### Can edge detection be done in the frequency domain?

Can we take advantage of the fact that high frequency components in the FFT of an image generally correspond to edges, to implement an edge detection algorithm in the fourier domain? I did try ...
22k views

### Extracting frequencies from FFT

I performed 512 point FFT on a signal. I got another set of 512 Numbers. I understand that those numbers represent amplitude of the various sine and cosine waves having different frequencies. If my ...
18k views

### Fast Cosine Transform via FFT

I want to implement the Fast Cosine Transform. I read on wikipedia, that there is a fast version of the DCT which is similarly computed to the FFT. I tried to read the cited Makhoul* paper, for the ...
7k views

### Difference Between Linear Convolution and Circular Convolution

If I understood correctly (and this page should confirm: http://www.cs.ioc.ee/~khoros2/linear/convolution-teo/front-page.html) if I convolve linearly (the usual point-to-point multiplication and ...
2k views

### Can FFT be used to find peaks and pits on audio files

I'm able to read wav files and its values. I need to find peaks and pits positions and their values. First time, I tried to smooth it by $\frac{(i-1 + i + i + 1)}{3}$ formula, then searching on ...
1k views

### Standard deviation of spectral flatness — so what am I measuring, conceptually?

In my never-ending quest to identify snores, I've found that "spectral flatness" seems to be a fair measure of signal "quality". I'm computing spectral flatness as the geometric mean of the FFT ...
8k views

### Algorithms for computing FFT in parallel

I am trying to parallelize the computation of an FFT on terabyte-sized signal files. Right now such an FFT using an open-source library takes many hours, even running through CUDA on the fastest GPU I ...
686 views

### Get bit stream from known radio frequency

I'm a beginner in radio demodulation, and several days can't solve my problem. The problem is to get bit stream from known frequency. I made I C# application that gets the data in real time from ...
1k views

### Analysing 2500 frequencies using FFT with an input vector of 2048 samples?

I am currently reading the paper A Highly Robust Audio Fingerprinting System and on page 4 one can read about the technical parameters they use: Sampling rate of 5000 Hz, frames of 2048 samples as ...
15k views

What differences or other criteria can be used to help decide between using overlap-add and overlap-save for filtering? Both overlap-add and overlap-save are described as algorithms for doing FFT ...
1k views

### Sense of zeropadding in a time domain

I have the task related to Radon transform which contains a subtask which uses resampling by means of DFT. Let's consider the non-periodical discretized signal (Fig.1) (for example the string of ...
299 views

### Channel Vocoder producing output with “click” sounds

I'm trying to make a channel vocoder that takes two inputs, one a frequency rich carrier (a musical sound) and the other a modulator (vocals). Applying operations involved in the channel vocoder ...
4k views

### Output of KISS FFT interpretation

I'm receiving PCM data trough socket connection in packets containing 320 samples. Sample rate of sound is 8000 samples per second. I am doing with it something like this: ...
4k views

### Complex impulse response functions?

I think I must have misunderstood something regarding the relation between impulse and frequency responses. I have calculated the Impulse Response Function, IRF, from the Frequency Response Function,...
2k views

### Do FFT-based filtering methods add intrinsic latency to a real time algorithm?

In a current audio processing application, I am working entirely in the time domain using IIR filters. This is so I can use an audio buffer of just 3 or 4 samples and can guarantee that there will be ...
3k views

### Fast Fourier transform- non-integer number of cycles in the FFT aperture

There are a few excellent discussion threads and answers on this site (eletronics.se) on the theory of Fourier transforms. I tried implementing the same in a simulation tool (MS Excel :)). I have a ...
4k views

### How to do prediction using frequency domain data?

Both linear regression and Kalman filtering can be used to estimate and then predict from a time domain sequence of data (given some assumptions about the model behind the data). What methods, if ...
3k views

### Generating wavelet using amplitude spectra

Equation (4) of a recent paper (An improved peak-frequency-shift method for Q estimation) shows how to generate a wavelet using a zero-phase Ricker wavelet. $|B_1(f)| = |B_0(f)|\exp(-\pi t f / Q)$ ...
2k views

### FFT for line detection

I am trying use the FFT in a different way then most people ask about. I want to be able to take a picture of a graph with regular repeating vertical lines, and to process the image to determine how ...
767 views

### Is it valid to increase amplitude (and presumably FFT quality) by simply scaling the data?

I'm using a version of "KISS FFT" by Mark Borgerding. It accepts an array of 16-bit fixed-point input values and produces a 32-bit float result array. I've discovered that if the input amplitudes ...
4k views

### FFT with asymmetric windowing?

Common non-rectangular window functions all seem to be symmetric. Is there ever a case when one would want to use a non-symmetric window function before an FFT? (Say if the data on one side of the ...
298 views

### What sonic artifacts are caused by phase vocoders?

When using a phase vocoder to alter the spectral envelope of a signal, the input signal is split up into many (often hundreds of) bands. With many phase vocoders, the output levels these individual ...
5k views

### What is a good FFT window function to reject DC?

I'm using an FFT to analyze what is essentially the power envelope of a signal (see here for info on the containing project), and, since power numbers are always positive, to eliminate the DC ...
6k views

### How to Average Complex Responses (and Justification)?

I am developing software that calculates the response of a system by comparing the FFT of input and output signals. The input and output signals are divided into windows and, for each window, the ...
579 views

### FFT on non-rectangular part of image

I need to do a FFT on an image for noise reduction, but the problem is that I do not need the complete image, but only a circle in the middle. The borders are a fixed rig, thus I am not interested in ...
4k views

### I need advice about how to make an audio frequency analyzer

I just need some clarification of some very basic aspects of creating a frequency analyzer. I am writing a c++ program, so far it is just a media player, with a custom explorer. You can make ...
3k views

### What statistic is used to determine presence of a signal in noise?

This is a detector problem I believe: I am being stumped by what appears to be a simple problem. Basically, I have a band of interest. If signal energies exist within this band of interest, then I ...
9k views

### How do you calculate spectral flatness from an FFT?

Ok, the spectral flatness (also called Wiener entropy) is defined as the ratio of the geometric mean of a spectrum to its arithmetic mean. Wikipedia and other references say the power spectrum. Isn'...
19k views

### How to shift the frequency spectrum?

Lets say we have a spectrum ranging from -X MHz to +X MHz. I would need to correct the frequency error in the spectrum by shifting the zero component to the middle (0 Hz). If the output (the ...
3k views

### What's the best criterion for determining a frequency peak?

I'm writing an algorithm that analyzes results of discrete Fourier transform (DFT). The algorithm should detect amplitude peaks in predefined ranges of frequencies. This is an example of such a peak: ...
293 views

### How to calculate the gain in a bivariate fft in R?

In Statistica gain is defined as follows: Gain. The gain value is computed by dividing the cross-amplitude value by the spectrum density estimates for one of the two series in the analysis. ...
19k views

### Efficiently calculating autocorrelation using FFTs

I'm trying to calculate an autocorrelation on a platform where the only accelerated primitive I have available is the (I)FFT. I'm having a problem though. I prototyped it in MATLAB. I am, however, ...
6k views

### How to distinguish voice from snoring?

Background: I'm working on an iPhone application (alluded to in several other posts) that "listens to" snoring/breathing while one is asleep and determines if there are signs of sleep apnea (as a pre-...
1k views

### DFT with geometrically-spaced bins?

The traditional Discrete Fourier Transform (DFT) and its cousin, the FFT, produce bins that are spaced equally. In other words, you get something like the first 10 hertz in the first bin, 10.1 through ...
1k views

### Does down-mixing a signal before taking the fourier transform aid in signal detection?

Let us assume that we have a narrowband signal $s[n]$, at frequency $f_1$, and let us further assume that this $f_1$ is just below $\frac{f_s}{2}$, where $f_s$ is the sampling rate. Furthermore, let ...
154 views

### Help me understand this simple code snippet to get the magnitude frequency response

I inherited the following FFT code to get the magnitude frequency response of a sample window. I understand what fft() does. What I don't understand are the lines marked with a "???". What do they do? ...
1k views

### Time resolution of the Short Time Fourier Transform (STFT)

I'm struggling to figure out how the time points of an STFT are calculated, and I can't find a definitive answer. Let's say I have a 4Hz stationary signal and I'm going to use a 64 second window with ...
6k views

### Does using the Goertzel algorithm actually give better frequency resolution?

I am reading this article, and I am getting a little confused by the author's liberal use of 'frequency resolution' regarding the Goertzel Algorithm. Basic question: Does using the Goertzel algorithm ...
20k views

### Frequency spectrum of a set of images in Matlab

I wish the compute the frequency distribution of a set of images. I basically am keen on finding out how the the frequency varies in the images. I know I can use the 'fft2' function to compute the 2-...