Git Product home page Git Product logo

filtersuite's Introduction

#Filter Generator

Here are implemented some filters based on the filters of A.J. Fisher (a genius who died much too soon [https://www-users.cs.york.ac.uk/~fisher/tribute.html]).

Following filters are currently supported in this collection:

Order: 1st, 2nd and 3rd order (use 3rd order with care, better cascade)

Pass modes: low and high pass, band stop, band pass.

Characters: Chebyshev, Butterworth and Bessel characters.

plus resonator.

##AllFilters.h

AllFilters.h is generated by generator/GenerateFilterSuite It contains the templates as described.

Filter are created as templates (see next code block for usage):

LowPassOrder1
HighPassOrder1
BandPassOrder1
BandStopOrder1
LowPassOrder2
HighPassOrder2
BandPassOrder2
BandStopOrder2
LowPassOrder3  // order 3 are not working with satisfaction
HighPassOrder3
BandPassOrder3
BandStopOrder3
AllPassResonatorOrder1
BandPassResonatorOrder1
BandStopResonatorOrder1

using a filter is pretty easy

// create filter
        BandPassResonatorOrder1<double> filter(FC_RESONATOR,10);
        
        // compute alpha values, i.e.:
        double a = 200.0/44100.0; // corner frequency 200Hz when sample rate is 44100
        double a2 = 300.0/44100.0; // corner frequency 300Hz when sample rate is 44100
        filter.setAlphas(a, a2); // complete octave for a band stop or band pass
        
        double outvalue = filter.step(invalue);

#Tests

if you want to run the tests you will need:

gnuplot (for printing the actual response graphs)
sox (for creating sample files)
googlemock (for unittest on coefficients and packing the whole thing)

filtersuite's People

Contributors

scjurgen avatar

Stargazers

 avatar  avatar

Watchers

 avatar James Cloos avatar

Forkers

vladkozlov69

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.