SynthLab SDK
SynthLab::TinyBPF Class Reference

Implements a simple 2nd order BPF. More...

#include <synthbase.h>

Public Member Functions

void reset (double _sampleRate)
 
void setParameters (double _fc, double _Q)
 
double processAudioSample (double xn)
 run the filter More...
 

Protected Types

enum  {
  xz1, xz2, yz1, yz2,
  numStates
}
 
enum  {
  a0, a1, a2, b1,
  b2
}
 

Protected Attributes

double state [4] = { 0.0, 0.0, 0.0, 0.0 }
 
double coeffs [5] = { 0.0, 0.0, 0.0, 0.0, 0.0 }
 
double fc = 5.0
 
double Q = 0.5
 
double sampleRate = 1.0
 

Detailed Description

Implements a simple 2nd order BPF.

  • taken from the AudioFilter object in the FX book below
  • can set the fo and Q values
  • uses biquad filter
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Member Function Documentation

◆ processAudioSample()

double SynthLab::TinyBPF::processAudioSample ( double  xn)
inline

run the filter

Parameters
xnthe input sample
Returns
the filtered output

◆ reset()

void SynthLab::TinyBPF::reset ( double  _sampleRate)
inline

flush state variables

◆ setParameters()

void SynthLab::TinyBPF::setParameters ( double  _fc,
double  _Q 
)
inline

set the fo and Q values


The documentation for this class was generated from the following file: