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
37
votes
5 answers

Estimate Autocorrelation using Python

I would like to perform Autocorrelation on the signal shown below. The time between two consecutive points is 2.5ms (or a repetition rate of 400Hz). This is the equation for estimating autoacrrelation that I would like to use (Taken from…
8765674
  • 1,234
  • 4
  • 17
  • 32
35
votes
8 answers

Chord detection algorithms?

I am developing software that depends on musical chords detection. I know some algorithms for pitch detection, with techniques based on cepstral analysis or autocorrelation, but they are mainly focused on monophonic material recognition. But I need…
Nemeth
  • 1,070
  • 1
  • 11
  • 16
35
votes
4 answers

Creating sine or square wave in C#

How do I generate an audio sine or square wave of a given frequency? I am hoping to do this to calibrate equipment, so how precise would these waves be?
johnc
  • 39,385
  • 37
  • 101
  • 139
33
votes
16 answers

calculate exponential moving average in python

I have a range of dates and a measurement on each of those dates. I'd like to calculate an exponential moving average for each of the dates. Does anybody know how to do this? I'm new to python. It doesn't appear that averages are built into the…
Jim
  • 11,229
  • 20
  • 79
  • 114
33
votes
6 answers

Note onset detection

I am developing a system as an aid to musicians performing transcription. The aim is to perform automatic music transcription (it does not have to be perfect, as the user will correct glitches / mistakes later) on a single instrument monophonic…
Alan
  • 476
  • 2
  • 6
  • 10
32
votes
1 answer

How to get frequency from fft result?

I have recorded an array[1024] of data from my mic on my Android phone, passed it through a 1D forward DFT of the real data (setting a further 1024 bits to 0). I saved the array to a text file, and repeated this 8 times. I got back 16384 results. I…
Ben Taliadoros
  • 7,003
  • 15
  • 60
  • 97
32
votes
5 answers

Cepstral Analysis for pitch detection

I'm looking to extract pitches from a sound signal. Someone on IRC just explained to me how taking a double FFT achieves this. Specifically: take FFT take log of square of absolute value (can be done with lookup table) take another FFT take…
P i
  • 29,020
  • 36
  • 159
  • 267
32
votes
6 answers

Python baseline correction library

I am currently working with some Raman Spectra data, and I am trying to correct my data caused by florescence skewing. Take a look at the graph below: I am pretty close to achieving what I want. As you can see, I am trying to fit a polynomial in…
Tinker
  • 4,165
  • 6
  • 33
  • 72
32
votes
2 answers

How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?

The resampling algorithm i use expects float array containing input samples in the range -1.0 to 1.0 . The audio data is 16 bit PCM with samplerate 22khz. I want to downsample the audio from 22khz to 8khz, how to represent the samples in byte array…
Raneez Ahmed
  • 3,808
  • 3
  • 35
  • 58
32
votes
5 answers

calculate turning points / pivot points in trajectory (path)

I'm trying to come up with an algorithm that will determine turning points in a trajectory of x/y coordinates. The following figures illustrates what I mean: green indicates the starting point and red the final point of the trajectory (the entire…
memyself
  • 11,907
  • 14
  • 61
  • 102
31
votes
4 answers

Reverb Algorithm

I'm looking for a simple or commented reverb algorithm, even in pseudocode would help a lot. I've found a couple, but the code tends to be rather esoteric and hard to follow.
Reu
  • 1,257
  • 3
  • 15
  • 30
31
votes
2 answers

Step detection in one-dimensional data

Is there an existing implementation in Python for detecting steps in one dimensional data? E.g. something that detects one step in this data: There are quite a few descriptions of algorithms out there but I am wondering if something suited for the…
John Crow
  • 927
  • 3
  • 13
  • 26
31
votes
3 answers

C/C++ library for reading MIDI signals from a USB MIDI device

I want to write C/C++ programs that take input from a MIDI device. The MIDI device connects to my PC using a USB connector. I'm looking for a (C/C++ implemented) library that I can use to read the MIDI signals from the MIDI device through the USB…
David
  • 14,047
  • 24
  • 80
  • 101
30
votes
3 answers

How to detect significant change / trend in a time series data?

So I have an array of say 25 samples and I would want to be able to note the trends of whether it's decreasing n or increasing from those 25 sample time interval(basically 25 samples array is my buffer that is being filled by every say 1 ms). Note…
as3rdaccount
  • 3,711
  • 12
  • 42
  • 62
29
votes
7 answers

Real time pitch detection

For real time pitch detection of a user's singing FFT and autocorrelation don't get a good result. I can't find C / C++ methods. Microphone input data is correct and when using a sine wave results are more or less the correct pitch. I'm visualizing…
Niall
  • 757
  • 3
  • 9
  • 17