SynthLab SDK
SynthLab::HighShelfFilter Class Reference

Implementation of a high shelving filter. More...

#include <synthbase.h>

Public Member Functions

void reset (double _sampleRate)
 
void setParameters (double shelfFreq, double boostCut_dB)
 
double processAudioSample (double xn)
 run the filter More...
 

Protected Types

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

Protected Attributes

double state [4] = { 0.0, 0.0, 0.0, 0.0 }
 
double coeffs [7] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }
 
double fc = 440.0
 
double boostCut_dB = 0.0
 
double sampleRate = 1.0
 

Detailed Description

Implementation of a high shelving 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::HighShelfFilter::processAudioSample ( double  xn)
inline

run the filter

Parameters
xnthe input sample
Returns
the filtered output

◆ reset()

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

reset to init state

◆ setParameters()

void SynthLab::HighShelfFilter::setParameters ( double  shelfFreq,
double  boostCut_dB 
)
inline

set shelving frequency and boost/cut in dB


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