Welcome to the documentation of the embedded filter design library! This is an open source library written in C that was created with embedded systems in mind. There are also bindings for other programming languages including C++ and Javascript via emscripten. The source code for the library and this webpage can be found on github.
You design any filter supported by the library online! The library is compiled to webassembly and included in this documentation site. It computes the values for all graphs.
There are examples for every supported filter! You can look at the filter responses, and once you have found one that you like, you can adapt it to your needs.
You can read the API documentation for C and C++ online. The documentation is generated from the comments in the source code with doxygen.
while (do_stuff) { double output; double input = get_input(); if (dh_filter(&filter, input, &output) == DH_FILTER_OK) { // use output } else { // handle error } }
#include "dh/cpp/filter.hpp" dh_filter_parameters opts; opts.filter_type = DH_IIR_BUTTERWORTH_LOWPASS; opts.cutoff_frequency_low = 2500.0; opts.sampling_frequency = 44100.0; opts.filter_order = 5; auto filter = dh::filter(opts);
The source code for this library and for this webpage is available on github.