Reusable C++ DSP code library
  • C++ 99.7%
  • Makefile 0.3%
Find a file
2019-02-08 08:17:32 +01:00
tests make it work for negative n too 2019-01-18 22:21:51 +01:00
.gitignore Initial commit 2018-03-02 14:04:46 +01:00
atan2.hh added FMD{1..5}, atan and atan2 approximations 2019-02-06 19:58:00 +01:00
biquad.hh added EMA and Biquad 2019-02-04 11:11:18 +01:00
coeffs.hh be able to normalize at construction 2019-01-20 17:45:26 +01:00
complex.hh added conj() 2019-02-06 14:27:03 +01:00
const.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
ema.hh added EMA and Biquad 2019-02-04 11:11:18 +01:00
fft.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
filter.hh added low pass which only uses unit circle 2019-01-26 21:50:00 +01:00
fmd.hh unwrap -> wrap_around 2019-02-08 08:17:32 +01:00
kahan.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
LICENSE Initial commit 2018-03-02 14:04:46 +01:00
pcm.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
phasor.hh added an NCO 2019-02-04 12:29:40 +01:00
README.md added FMD{1..5}, atan and atan2 approximations 2019-02-06 19:58:00 +01:00
regression.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
resampler.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
spline.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
unit_circle.hh make it work for negative n too 2019-01-18 22:21:51 +01:00
utils.hh added quick and dirty decibel approximation 2019-01-21 11:36:50 +01:00
wav.hh time to embrace #pragma once 2019-01-19 14:07:07 +01:00
window.hh removed CoeffsFunc 2019-01-20 13:23:08 +01:00

This is a work in progress and a long overdue attempt to bring all our DSP code together and make it reusable for our future projects.

Before using any of this you should enter the tests directory and execute "make". This will check if your compiler is able to create binaries that are able to produce correct results when executed.

What we have included so far:

kahan.hh

When working with Floating-point arithmetic we soon realize, that addition is not necessarily associative. For example, whenever we need to add values with an ever decreasing magnitude to a running sum with an ever increasing magnitude, the Kahan summation algorithm comes in handy and helps keeping the error growth small.

window.hh

Implemented are the follwing Window functions:

filter.hh

Implemented are the following finite impulse response filters:

ema.hh

The exponential moving average is an infinite impulse response low-pass filter. There is also support for cascading, to improve roll-off while a correction factor helps to keep the same cutoff frequency.

biquad.hh

The following infinite impulse response digital biquad filter implementations are available:

phasor.hh

Numerically controlled oscillator implemented using a phasor and complex multiplication instead of a lookup table.

fmd.hh

Frequency modulation demodulation with and without atan2.

atan2.hh

atan and atan2.

const.hh

Some constants we need

pcm.hh

Interface for reading and writing PCM data

wav.hh

Read and write WAV files

spline.hh

Algorithm for computing uniform and natural cubic splines Very useful for data interpolation.

regression.hh

Implemented Simple linear regression for Regression analysis of data.

complex.hh

Faster alternative (no Inf/NaN handling) to the std::complex implementation.

fft.hh

Mixed-radix decimation-in-time fast Fourier transform

utils.hh

Some everyday helpers:

resampler.hh

When working with Analog-to-digital and Digital-to-analog converters, we often face the ugly truth, that we can't always have a precise Sampling rate. But if we can estimate the Sampling frequency offset, we can correct it by Resampling the sampled data.

unit_circle.hh

Sometimes we only need trigonometric functions that stay on the unit circle: