Skip to content

kleydon/FIR-Filter-Demo-Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIR-Filter, C++

Easy-to-use DSP filter code, written in C++, with low, high, and band-pass variants. Implements a windowed sync FIR using the overlap-and-add method.

Usage:

FIRFilter* filter = &FIRFilter::getSingleton();
    
//Low Pass:
filter->initializeAsLowPass(44100.0f, //sample rate
                            256, //frame length
                            4000.0f, //cutoff frequency
                            1000.0f); //transition bandwidth
    
//High Pass:
filter->initializeAsHighPass(44100.0, //sample rate
                             256, //frame length
                             1000.0f, //cutoff frequency
                             1000.0f); //transition bandwidth
    

//Band Pass:
filter->initializeAsBandPass(44100.0, //sample rate
                             256, //frame length
                             500.0f, //low cutoff frequency
                             200.0f, //low transition bandwidth
                             4000.0f, //high cutoff frequency
                             200.0f); //high transition bandwidth

//Demo/Test:
float frequency = 4500.0f;
float duration = 0.010f;
filter->test(frequency, duration);

//filter->test() calls:
applyFilter(const float inputFrameSamples[],
            float outputFrameSamples[]) 
//...which can be in-place w.r.t. input and output.

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy