Questions tagged [fft]

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

2719 questions
112
votes
3 answers

Why is it a bad idea to filter by zeroing out FFT bins?

It's very easy to filter a signal by performing an FFT on it, zeroing out some of the bins, and then performing an IFFT. For instance: t = linspace(0, 1, 256, endpoint=False) x = sin(2 * pi * 3 * t) + cos(2 * pi * 100 * t) X = fft(x) X[64:192] =…
endolith
  • 14,765
  • 7
  • 63
  • 114
96
votes
6 answers

Why should I zero-pad a signal before taking the Fourier transform?

In an answer to a previous question, it was stated that one should zero-pad the input signals (add zeros to the end so that at least half of the wave is "blank") What's the reason for this?
Jonas
  • 2,981
  • 2
  • 18
  • 19
67
votes
8 answers

How do I implement cross-correlation to prove two audio files are similar?

I have to do cross correlation of two audio file to prove they are similar. I have taken the FFT of the two audio files and have their power spectrum values in separate arrays. How should I proceed further to cross-correlate them and prove that…
Warrior
36
votes
9 answers

Is there an algorithm for finding a frequency without DFT or FFT?

I was looking in the Android app store for a guitar tuner. I found a tuner app that claimed it was faster than other apps. It claimed it could find the frequency without using the DFT (I wish I still had the URL to this specification). I have never…
Slamice
  • 463
  • 1
  • 4
  • 6
31
votes
3 answers

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 image: Essentially, I am looking for advice as to…
Michael M
  • 413
  • 1
  • 4
  • 5
28
votes
4 answers

Which time-frequency coefficients does the Wavelet transform compute?

The Fast Fourier Transform takes $\mathcal O(N \log N)$ operations, while the Fast Wavelet Transform takes $\mathcal O(N)$. But what, specifically, does the FWT compute? Although they are often compared, it seems like the FFT and FWT are apples and…
endolith
  • 14,765
  • 7
  • 63
  • 114
27
votes
5 answers

Is there a technical term for this simple method of smoothing out a signal?

Firstly, I am new to DSP and have no real education in it, but I am developing an audio visualization program and I am representing an FFT array as vertical bars as in a typical frequency spectrum visualization. The problem I had was that the audio…
Michael Bromley
  • 373
  • 3
  • 7
27
votes
2 answers

Overlap-Add versus Overlap-Save

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 based fast convolution of data streams with FIR…
hotpaw2
  • 33,409
  • 7
  • 40
  • 88
26
votes
1 answer

What is the difference between PSD and squared magnitude of frequency spectrum?

The power spectrum of a signal can be calculated by taking the magnitude squared of its Fourier transform. Being an audio person, the signal of interest for me would be a time series. How does this representation differ from a PSD (power spectral…
learnvst
  • 1,483
  • 2
  • 16
  • 25
24
votes
1 answer

low pass filter and FFT for beginners with Python

I am new to signal processing and especially to FFT, hence I am not sure if I am doing the correct thing here and I am a bit confused with the result. I have a discrete real function (measurement data) and want to set up a low pass filter on that.…
Till B
  • 343
  • 1
  • 2
  • 5
24
votes
5 answers

What is a frequency bin?

I'm doing a research on the FFT method, and a term that always comes up is "frequency bin". From what I understand, this has something to do with the band created around the frequency of a given sinusoid, but I can't really figure out how. I also…
JonTrav1
  • 241
  • 1
  • 2
  • 3
23
votes
3 answers

Tips for improving pitch detection

I'm working on a simple web app that allows the user to tune his/her guitar. I'm a real beginner in signal processing, so please don't judge me too harshly if my question is inappropriate. So, I managed to get the fundamental frequency using an FFT…
Rad'Val
  • 433
  • 1
  • 4
  • 9
22
votes
3 answers

What effect does a delay in the time domain have in the frequency domain?

If I have a signal that is time limited, say a sinusoid that only lasts for $T$ seconds, and I take the FFT of that signal, I see the frequency response. In the example this would be a spike at the sinusoid's main frequency. Now, say I take that…
gallamine
  • 643
  • 1
  • 4
  • 10
22
votes
4 answers

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-screen for "sleep lab" testing). The…
Daniel R Hicks
  • 1,493
  • 1
  • 13
  • 24
22
votes
2 answers

Improving spectrogram resolution in Python?

I'm using the specgram() function in matplotlib to generate spectrograms of speech wave files in Python, but the output is always of vastly inferior quality to what my normal transcription software, Praat, can generate. For example, the following…
Alek Storm
  • 323
  • 1
  • 2
  • 5
1
2 3
99 100