chowdsp_utils icon indicating copy to clipboard operation
chowdsp_utils copied to clipboard

Filter differences between juce Butterworth filters

Open 7sharp9 opened this issue 1 year ago • 1 comments

Hi, thanks for making this library, I was just wondering what the difference were between the filters you have defined here and those that are implemented in juce like the Butterworth filter.

Thanks! Dave.

7sharp9 avatar Feb 22 '23 21:02 7sharp9

Sure, so there's a few differences:

JUCE contains some "general" filter types

  • FIR filter
  • IIR filter (with coefficient makers for basic filter types)
  • State Variable Filters
  • Linkwitz-Riley Filter (4th-order)

chowdsp_filters has these types of filters as well, but with a few differences:

  • FIR filter: our implementation uses SIMD (on Windows/Linux) and Accelerate (on Mac) to get better performance. To get a rough idea of the performance difference, you can take a look at the relevant benchmarks.
  • IIR Filter
    • chowdsp::IIRFilter has a filter order that is fixed at compile-time
    • Coefficient makers for basic filter types are accessible through sub-classes
    • I believe our coefficient makers use some slightly different equations than the JUCE implementation
  • State Variable Filters: our implementation uses a slightly different derivation as well, and has a "multi-mode" mode.
  • Linkwitz-Riley Filter: our implementation covers more filter orders

This library also has some higher-order filter types:

And then there's a few other odds and ends, which are probably not needed as often, but can be kind of fun:

  • chowdsp::ARPFilter: a linear emulation of the ARP 1047 multi-mode filter
  • chowdsp::WernerFilter: an implementation of the filter from this DAFx paper, but with a different derivation than the one in the paper.
  • chowdsp::FractionalOrderFilter: an approximate fraction-order filter based on this DAFx paper
  • chowdsp::ModFilterWrapper: wraps a chowdsp::IIRFilter as a state variable filter to allow for fast modulation

jatinchowdhury18 avatar Feb 22 '23 23:02 jatinchowdhury18