SynthLab SDK
SynthLab::TinyReson Class Reference

Minute implementation of a 2nd order resonator filter. More...

#include <synthbase.h>

Public Member Functions

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

Protected Types

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

Protected Attributes

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

Detailed Description

Minute implementation of a 2nd order resonator filter.

  • taken from the AudioFilter object in the FX book below
  • can set the fc 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::TinyReson::processAudioSample ( double  xn,
double  loss = 1.0 
)
inline

run the filter

Parameters
xnthe input sample
Returns
the filtered output

◆ reset()

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

reset to init state

◆ setParameters()

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

set filter fc and Q


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