Giter VIP home page Giter VIP logo

sndfilter's Introduction

sndfilter

Algorithms for sound filters, like reverb, dynamic range compression, lowpass, highpass, notch, etc.

It's easy to find countless math equations on sound filters, but a bit harder to find simple source code. This library is my attempt at cleaning up and presenting the math-heavy filter algorithms for the programming community.

Please note that I favored simple code over fast code. Hopefully it's made it more understandable.

(MIT License)

Build Instructions

The ./build script is a simple bash script that compiles the source files using clang. It's dirt simple, I promise.

Simply run ./build and the executable should be ./tgt/sndfilter.

Filters

Implementation

The reverb.c, compressor.c, and biquad.c are the core algorithms.

I do not understand the biquad math, so please don't ask me any questions :-). The core formulas were extracted from Biquad.cpp (Chromium source), and cleaned up a bit to make easier to read.

The compressor came from DynamicsCompressorKernel.cpp (also from Chromium), and cleaned up a bit more. I swapped out the adaptive release curve and simplified the knee calculations. I feel a little more comfortable with that algorithm because there isn't a whole lot of magical math involved.

The reverb effect is a complete rewrite of Freeverb3's Progenitor2 algorithm. It took quite a lot of effort to tear apart the algorithm and rebuild it, but I'm pretty sure it's right.

sndfilter's People

Contributors

velipso avatar buslov 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.