DSPFilters

repository·master·Indexed 24 days ago

https://github.com/vinniefalco/dspfilters

A C++ template-based library for high-performance multichannel Infinite Impulse Response (IIR) filters. It supports various response types including Butterworth, Chebyshev, Elliptic, Bessel, and Legendre, with transformations for Low Pass, High Pass, Band Pass, Band Stop, and Shelf filters. Designed for embedded systems, it avoids malloc/new and external dependencies, supporting Direct Form I, Direct Form II, and smooth parameter interpolation to prevent audio artifacts.

Tokens
610
Snippets
1
Records
3
Agent score
35%

What's inside dspfilters

  1. Overview of DSPFilters library

    master

    DSPFilters is a C++ template-based library designed for Digital Signal Processing, specifically focusing on multichannel Infinite Impulse Response (IIR) filters. It allows for the realization of filters with various response types (Butterworth, Chebyshev, Elliptic, Bessel, Legendre) and transformations (Low Pass, High Pass, Band Pass, Band Stop, and Shelf filters).

    Key characteristics:

    • No external dependencies: Uses only the standard C++ library.
    • Embedded-friendly: No calls to malloc or new are made, making it suitable for embedded systems.
    • Template-based: Uses C++ templates for efficiency and allows for arbitrary filter orders.
    • Seamless parameter changes: Supports smooth interpolation of filter settings, poles/zeros, and biquad coefficients to prevent clicks or popping during real-time changes.
    • Flexible realization: Supports Direct Form I, Direct Form II, or user-provided classes.
  2. How to use DSPFilters in C++

    master

    To use the library, you instantiate a filter template specifying the filter type and the number of channels. You then call .setup() to configure the filter parameters and .process() to process audio buffers.

    Example: Creating and using a Chebyshev type I Band Stop filter of order 3 for 2 channels of audio.

    // Create a Chebyshev type I Band Stop filter of order 3
    // with state for processing 2 channels of audio.
    Dsp::SimpleFilter <Dsp::ChebyshevI::BandStop <3>, 2> f;
    f.setup (3,    // order
             44100,// sample rate
             4000, // center frequency
             880,  // band width
             1);   // ripple dB
    f.process (numSamples, arrayOfChannels);
  3. View DSPFiltersDemo version information

    master

    The DSPFiltersDemo application (part of the vinniefalco/dspfilters repository) contains the following versioning and metadata information in its Windows resource configuration:

    • File Version: 0,9,7,1,0
    • Product Version: 0,9,7,1,0
    • Product Name: DSP Filters
    • File Description: DSP Filters Demo
    • Company Name: One Guy Group, Inc.
    • Legal Copyright: Copyright (C) 2008-2011 by One Guy Group, Inc., All rights reserved worldwide.