DSP Library

Signalsmith Audio

This is a set of C++11 header-only classes/templates to support certain DSP tasks (mostly audio).

It's still growing, but currently includes:

How to use

Clone using Git:


				git clone https://signalsmith-audio.co.uk/code/dsp.git
			
There's also a GitHub mirror

Include the appropriate header file, and start using classes:

API docs

Check out the API documentation (Doxygen) for detailed information.

Testing

Tests (and scripts to plot graphs etc.) are in a separate repository, to keep the main repo neater:


				git clone https://signalsmith-audio.co.uk/code/dsp-doc.git
			
There's a GitHub mirror for this too

Goals

Where reasonable, the tests should measure actual output quality (not just basic correctness and smoke-tests).

For example, here's the aliasing/accuracy performance of a delay line with windowed-sinc interpolation:

The automated tests check this performance for various input bandwidths, using a table like this:


				// A table of acceptable limits for the 20-point windowed-sinc
				double bandwidth[] = {90, 80, 50, 25, 12.5};
				double aliasing[] = {-20.5, -61, -70.5, -76, -77.5};
				double ampLow[] = {-2, -0.02, -0.01, -0.01, -0.01};
				double ampHigh[] = {0.02, 0.02, 0.01, 0.01, 0.01};
				double delayError[] = {0.9, 0.03, 0.01, 0.01, 0.01};
			
Each column specifies performance for a particular input bandwidth - e.g. 25% would correspond to 4x oversampled input.

Running the tests

To run the tests:

make test

To run just the tests in tests/delay/ (or similar):

make test-delay

There are a few other targets (e.g. for plotting graphs) - check the Makefile if you're curious.

License

The main library is MIT licensed (see LICENSE.txt in the main repo), but the tests, docs and support scripts are licensed differently (just for developing/testing the library).

We're pretty flexible though - if you need something else, get in touch.