Reusable C++ DSP code library
  • C++ 99.7%
  • Makefile 0.3%
Find a file
2018-08-27 14:04:39 +02:00
tests added another example on how to check the result 2018-07-29 10:53:52 +02:00
.gitignore Initial commit 2018-03-02 14:04:46 +01:00
complex.hh overwrite members directly here 2018-08-27 14:04:39 +02:00
const.hh added constexpr to constants .. 2018-08-13 20:21:25 +02:00
crc.hh added update() helper 2018-07-29 10:50:30 +02:00
fft.hh added mixed-radix fast Fourier transform 2018-08-25 12:22:58 +02:00
kahan.hh added same() method to Kahan summation 2018-03-03 12:14:22 +01:00
LICENSE Initial commit 2018-03-02 14:04:46 +01:00
pcm.hh added info methods to PCM interface and WAV reader 2018-08-08 15:20:43 +02:00
README.md added mixed-radix fast Fourier transform 2018-08-25 12:22:58 +02:00
regression.hh add default constructor 2018-08-19 15:45:00 +02:00
spline.hh init variables using ITYPE 2018-03-29 08:57:36 +02:00
wav.hh added info methods to PCM interface and WAV reader 2018-08-08 15:20:43 +02:00
window.hh added a divisor argument with default 1 to normalize() 2018-04-11 14:48:02 +02: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:

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.

crc.hh

A Cyclic redundancy check may not really be DSP-related, but it is needed over and over again when you do DSP that it fits just perfectly here.

For example, if we need to integrate CRC32 checking for a few bytes, like in the following:

# echo -n 'Hello World!' | rhash -C -
(stdin) 1C291CA3

We can add it to our project as simple as that:

DSP::CRC<uint32_t> crc(0xEDB88320, 0xFFFFFFFF);
for (uint8_t c: std::string("Hello World!")) crc(c);
assert(!crc(uint32_t(~0x1C291CA3)));

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