GithubHelp home page GithubHelp logo

arsrna / biquad-filter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ircam-rnd/biquad-filter

0.0 0.0 0.0 644 KB

JavaScript Biquad Filters Cascade

Home Page: http://ircam-rnd.github.io/biquad-filter/

JavaScript 99.69% HTML 0.31%

biquad-filter's Introduction

Biquad Filter library

The Biquad Filter is a JavaScript library that implements a cascade of biquad filters

This library implements a biquad filter with the possibility of use a cascade of biquad filters where you can specify the coefficients:

                       1 + b1*z^-1 + b2*z^-2
One biquad:   H1(z) = -----------------------
                       1 + a1*z^-1 + a2*z^-2

Cascade of biquads:   H(z) = g · H1(z) · H2(z) · ... · Hn(z)
where g is the global gain of the cascade of biquads and n is the number of biquad filters.

Example

A working demo for this module can be found here and in the examples folder.

Coefficients format

The input format of the coefficients for the library is a JavaScript Array with all the coefficients:

For one biquad filter:

[g, b1, b2, a1, a2]

For two or more biquad filters:

[g, b1_1, b2_1, a1_1, a2_1, b1_2, b2_2, a1_2, a2_2, ... , b1_n, b2_n, a1_n, a2_n ]

where n is the number of biquad filters and g is the global gain of the cascade of biquads.

API

The binauralFIR object exposes the following API:

Method Description
biquadFilter.setCoefficients(coef) Set the coefficients of the filter.
biquadFilter.process(inputBuffer, outputBuffer) Calculate the output of the cascade biquad filter for an inputBuffer. The inputBuffer and the outputBuffer are Arrays with the same length.

License

This module is released under the BSD-3-Clause license.

Acknowledgments

This code has been developed from both Acoustic And Cognitive Spaces and Analysis of Musical Practices IRCAM research teams. It is also part of the WAVE project (http://wave.ircam.fr), funded by ANR (The French National Research Agency), ContInt program, 2012-2015.

biquad-filter's People

Contributors

ouhouhsami avatar narnau avatar yanlaz avatar

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.