Questions tagged [signal-processing]

AKA digital signal processing (DSP). A signal is an information-carrying changing attribute of an entity, but in the digital sense, 'signal' refers to either received or transmitted streams/blocks of data, commonly representing real-world quantities such as audio levels, luminosity, pressure etc over time or distance. 'Processing' is the act of altering, analyzing or characterizing the data to retrieve/modify information inherent in the signal in question.

A signal is an information-carrying changing attribute of an entity, but in the digital sense, 'signal' refers to either received or transmitted streams/blocks of data, commonly representing real-world quantities such as audio levels, luminosity, pressure etc over time or distance.

These real-world quantities usually comes as analogue signals that are being sampled and quantized into a digital format, i.e. a sequence or higher-dimensional array of discrete numbers.

'Processing' is the act of altering, analyzing or characterizing the data to retrieve/modify information inherent in the signal in question.

NOTE: questions not related to the programming of signal processing implementations but the signal processing theory behind are off-topic for Stack Overflow and should be posted to the appropriate sister site, Signal Processing SE.

Common topics include:

  • digital filtering;
  • audio processing;
  • image processing;
  • sampling;
  • data compression;
  • spectral analysis;

Analysis tools commonly in practice are the Discrete Fourier Transform (DFT), especially its fast implementations (FFT); and wavelet transforms.

Common softwares used in the field include ; ; , especially with /; ///; ; and various languages.

5814 questions
25
votes
3 answers

High-pass filtering in MATLAB

Does anyone know how to use filters in MATLAB? I am not an aficionado, so I'm not concerned with roll-off characteristics etc — I have a 1 dimensional signal vector x sampled at 100 kHz, and I want to perform a high pass filtering on it (say,…
user391339
  • 8,355
  • 13
  • 58
  • 71
25
votes
2 answers

Calculate autocorrelation using FFT in Matlab

I've read some explanations of how autocorrelation can be more efficiently calculated using the fft of a signal, multiplying the real part by the complex conjugate (Fourier domain), then using the inverse fft, but I'm having trouble realizing this…
skj
  • 275
  • 1
  • 5
  • 7
24
votes
1 answer

How to use createPeriodicWave instead of createScriptProcessor and getChannelData

I found some libraries which do instrument synthesizing with the Web Audio API. One of them (Band.js) uses createOscillator(), in combination with the oscillator type (sine, square, ...) see source. But it sounds too synthetic (example to listen) I…
timaschew
  • 16,254
  • 6
  • 61
  • 78
24
votes
7 answers

identifying phase shift between signals

I have generated three identical waves with a phase shift in each. For example: t = 1:10800; % generate time vector fs = 1; % sampling frequency (seconds) A = 2; % amplitude P = 1000; % period (seconds), the time it takes for the signal to repeat…
Emma Tebbs
  • 1,457
  • 2
  • 17
  • 29
24
votes
2 answers

Learning Digital Signal Processing

What are some good resources for learning about DSP (including the mathematics and algorithms necessary for actually understanding these resources)? Let's assume that my math skills are rusty from lack of use as well, so a roadmap along the lines…
Kevin L.
  • 4,548
  • 7
  • 39
  • 54
24
votes
6 answers

FFT-based 2D convolution and correlation in Python

Is there a FFT-based 2D cross-correlation or convolution function built into scipy (or another popular library)? There are functions like these: scipy.signal.correlate2d - "the direct method implemented by convolveND will be slow for large…
endolith
  • 25,479
  • 34
  • 128
  • 192
23
votes
6 answers

How to get high and low envelope of a signal

I have quite a noisy data, and I am trying to work out a high and low envelope to the signal. It is kind of like this example in MATLAB in "Extracting Peak Envelope". Is there a similar function in Python that can do that? My entire project has been…
user5224720
23
votes
5 answers

Pitch recognition of musical notes on a smart phone

With limited resources such as slower CPUs, code size and RAM, how best to detect the pitch of a musical note, similar to what an electronic or software tuner would do? Should I use: Kiss FFT FFTW Discrete Wavelet Transform autocorrelation zero…
mahboudz
  • 39,196
  • 16
  • 97
  • 124
22
votes
6 answers

lowpass and high pass filter in C#

I need low pass and high pass filter written in c#. I have double arrays for this filter process. I think if I try to convert matlab Butterworth and Chebyshev algorithms to c#, it would be easier. But I couldn't find the code of butter.m and…
user741319
  • 625
  • 3
  • 9
  • 18
22
votes
4 answers

Why do I need to apply a window function to samples when building a power spectrum of an audio signal?

I have found for several times the following guidelines for getting the power spectrum of an audio signal: collect N samples, where N is a power of 2 apply a suitable window function to the samples, e.g. Hanning pass the windowed samples to an FFT…
Nuno Santos
  • 1,476
  • 3
  • 17
  • 34
22
votes
4 answers

FFT real/imaginary/abs parts interpretation

I'm currently learning about discret Fourier transform and I'm playing with numpy to understand it better. I tried to plot a "sin x sin x sin" signal and obtained a clean FFT with 4 non-zero points. I naively told myself : "well, if I plot a "sin +…
Cyrille
  • 13,905
  • 2
  • 22
  • 41
22
votes
6 answers

How do you do bicubic (or other non-linear) interpolation of re-sampled audio data?

I'm writing some code that plays back WAV files at different speeds, so that the wave is either slower and lower-pitched, or faster and higher-pitched. I'm currently using simple linear interpolation, like so: int newlength =…
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
21
votes
3 answers

How Shazam or Sound Hound works?

I'm developing an iOS application with SDK for iOS 5.0 and XCode 4.2. I want to develop an application that recognize sounds. I see there is an application called Sound Hound that recognize music and tells artist and title. How can I do something…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
21
votes
2 answers

How can I determine if my convolution is separable?

What makes a convolution kernel separable? How would I be able to tell what those separable parts were in order to do two 1D convolutions instead of a 2D convolution> Thanks
Derek
  • 11,715
  • 32
  • 127
  • 228
21
votes
2 answers

What is the difference between numpy.fft.fft and numpy.fft.rfft?

The documentation says that np.fft.fft does this: Compute the one-dimensional discrete Fourier Transform. and np.fft.rfft does this: Compute the one-dimensional discrete Fourier Transform for real input. I also see that for my data (audio data,…