endolith
  • Member for 10 years, 5 months
  • Last seen this week
What is the physical significance of negative frequencies?
134 votes

Negative frequency doesn't make much sense for sinusoids, but the Fourier transform doesn't break up a signal into sinusoids, it breaks it up into complex exponentials (also called "complex sinusoids" ...

View answer
If humans can only hear up to 20 kHz frequency sound, why is music audio sampled at 44.1 kHz?
Accepted answer
95 votes

The sampling rate of a real signal needs to be greater than twice the signal bandwidth. Audio practically starts at 0 Hz, so the highest frequency present in audio recorded at 44.1 kHz is 22.05 kHz (...

View answer
How do I implement cross-correlation to prove two audio files are similar?
67 votes

Cross-correlation and convolution are closely related. In short, to do convolution with FFTs, you zero-pad the input signals a and b (add zeros to the end of each. The zero padding should fill the ...

View answer
Applying filter in scipy.signal: Use lfilter or filtfilt?
Accepted answer
40 votes

filtfilt is zero-phase filtering, which doesn't shift the signal as it filters. Since the phase is zero at all frequencies, it is also linear-phase. Filtering backwards in time requires you to ...

View answer
Algorithm(s) to mix audio signals without clipping
30 votes

The physically "correct" way to do this is summing the samples. However when you add two arbitrary samples, the resulting value could be up to twice the maximum value. ... The naive solution here is ...

View answer
Fast Cosine Transform via FFT
29 votes

I've been reading about this and there are multiple ways to do it, using different size N. My Matlab is rusty, so here they are in Python (N is length of input signal x, k is arange(N) = $[0, 1, 2, .....

View answer
"River" detection in text
29 votes

Hmmm... I guess Radon transform isn't that easy to extract from. (Radon transform basically rotates the image while "looking through it" edge-on. It's the principle behind CAT scans.) The transform ...

View answer
Terminology: spectrum, spectrogram, spectrograph, sonogram, etc
Accepted answer
24 votes

It depends on context. In signal processing, a spectrum (plural is spectra) shows the frequency content of an entire signal. It's a 1-dimensional function of amplitude (vertical axis) vs frequency (...

View answer
Add odd/even harmonics to signal?
Accepted answer
21 votes

What your distortion box does is apply a non-linear transfer function to the signal: output = function(input) or y = f(x). You're just applying the same function to every individual input sample to ...

View answer
Tips for improving pitch detection
Accepted answer
21 votes

I'm guessing the other frequencies it gets are harmonics of the fundamental? Like you're playing 100 Hz and it picks out 200 Hz or 300 Hz instead? First, you should limit your search space to the ...

View answer
How poles are related to frequency response
19 votes

One thing that really helped me understand poles and zeros is to visualize them as amplitude surfaces. Several of these plots can be found in A Filter Primer. Some notes: It's probably easier to ...

View answer
Point Pattern Recognition
Accepted answer
17 votes

This is not the best solution, but it's a solution. I'd like to learn of better techniques: If they were not going to be rotated or scaled, you could use a simple cross-correlation of the images. ...

View answer
Find the stomata in a plant microscopy image
15 votes

Sorry I don't know OpenCV, and this is more a pre-processing step than a complete answer: First, you don't want an edge detector. An edge detector converts transitions (like this dark-to-light): ...

View answer
What is the least JPG-compressible pattern? (camera shooting piece of cloth, scale/angle/lighting may vary)
15 votes

Noise is quite good (hard to compress), but it becomes grey when looking from far, becoming easy to compress. A good pattern would be kind of fractal, looking similar at all scales. Well, there is ...

View answer
Detecting drum bpm in a noisy .wav file
Accepted answer
13 votes

One method that works if there's a relatively strong drum beat is to take the magnitude of the STFT of the waveform, and then auto-correlate it in only the time dimension. The peak of the auto-...

View answer
How do I plot the spectrogram of a wav file?
13 votes

This isn't a great question, but I'll try to answer: All the files that I have, have two channels. A spectrogram can only show one channel at a time. Either make one spectrogram for each channel,...

View answer
How do I remove motion blur?
Accepted answer
12 votes

Yes, deconvolution. This page describes a number of deconvolution methods and methods for estimating the point spread function: Removing Motion Blur from Astrophotographic Images They say the ...

View answer
Reading the Wavelet transform plot
12 votes

These plots were helpful for me to understand, coming from a STFT background: The complex Morlet (sinusoidal) wavelet looks and behaves like the complex kernel of a STFT (since it's derived from the ...

View answer
From a physics perspective, why does D/A quantization error result in a noise floor?
Accepted answer
11 votes

For the last week or so I have been trying to understand how quantization error results in the noise floor outside of a mathematical perspective and I haven't really had any luck finding a source that ...

View answer
How to check the FFT results of a sine wave?
11 votes

You need to plot the magnitude of the output of the FFT. I'm not familiar with your programming language, but in Python you would use something like plot(abs(fft(a))). For a silent input, the output ...

View answer
Extracting Binary Magnetic-Strip Card Data from raw WAV
10 votes

This is called biphase mark code, and you have to focus on the zero-crossings instead of the pulse amplitudes. You have multiple zero crossings per pulse, though, because of the low-cut filters ...

View answer
Extraction of non-sinusiodal repetition rates
Accepted answer
9 votes

You are right that the repetition is around 650 by how exactly do I compute that automatically? Seems like a peak-picking problem to me? Or is there some other methods that can be used? Yes, it's ...

View answer
Real-Time Human Pitch Detection
Accepted answer
9 votes

I've tried to get the bin with greatest magnitude but that only give me right results for higher pitch signals, it doesn't matter which oversampling factor I use I still get bad data for low freq ...

View answer
Are IIR filters (and specifically Butterworth filter) causal?
Accepted answer
8 votes

Yes, Butterworth are IIR. The decay from an impulse technically lasts forever. Yes, all [implementable] IIR are causal. Yes, because of #1 and #2. Don't use signal.filtfilt. Use signal.lfilter. ...

View answer
filtfilt giving unexpected results
8 votes

So the issue is that your filter order is too high. There are 2 problems with this: SciPy has a bug that generates inaccurate filters at high orders. On any platform, higher-order filters cannot be ...

View answer
Applying A-weighting
Accepted answer
8 votes

Yes, you could hardcode the values, do an FFT of your signal, and multiply by the hardcoded values, then get the amplitude in the frequency domain from Parseval's theorem (example). You could also ...

View answer
Intuitive interpretation of Laplace transform
8 votes

Why is the fourier transform a special case of the laplace transform? The Laplace transform produces a 2D surface of complex values, while the Fourier transform produces a 1D line of complex values. ...

View answer
Sum of sines sound wave using microcontroller
Accepted answer
8 votes

To explain the problem (without solving it): However, for some reason, besides seeing the pure 17KHz frequency, I also hear (and see on the oscilloscope) parasitic 5KHz frequency! Your sampling ...

View answer
How do I get started with Wavelets
8 votes

If you're familiar with Fourier transforms, I think the bridge between the Fourier worlds and the wavelet worlds is the Gabor transform (a Gaussian-windowed STFT) and the complex Morlet wavelet ...

View answer
Simulating analog filter using convolution or converting with fft
Accepted answer
8 votes

What's not clear to me is what the fundamental difference (if any) is between simulating an analog filter and making a digital filter. Either way, these functions will produce "ba" transfer function ...

View answer
1
2 3 4 5