logo
Main Page | Namespaces | Classes | Compounds | Files | Compound Members | Related

SynthCore::BiQuad Class Reference

The BiQuad module implements biquadratic filters. More...

#include <filters.h>

Inheritance diagram for SynthCore::BiQuad:

SynthCore::Module List of all members.

Public Types

enum  {
  lowpass, highpass, notch, bandpass2,
  bandpass1, allpass, highShelf, lowShelf,
  peakingEQ, bypass
}

Public Methods

virtual std::string getName ()
 The name.

virtual ModulesharedClone ()
 BiQuad (SynthVoice *S1)
 Constructor.

 ~BiQuad ()
 Destructor;.

void update ()
 Main routine;.

void setDry (float s)
 Dry/Wet percentage.

void setFreqAndRez (float frequence, float resonance)
 Notice resonance only is a resonance for low and high pass filters.

void updateFreqAndRez ()
std::string getXML (int indent=0)
void loadXML (XMLNode *n, bool firstPass)
 Reads parameters from XML document (use the parser in the Utils namespace).


Static Public Methods

ModulenewInstance (SynthVoice *S1)
 Static constructor (for 'factory' use).


Public Attributes

bool HACK
 HACK.

float rez
 Current resonance (Q-parameter).

float freq
 Current frequency.

int filterType
 Current filter type.

float dry
 Determines throughput (dryness). Obsolete?

OutputOutput1
 Mono output.

InputInput1
 Mono input.

InputFreqInput
 Frequency Input.

InputRezInput
BiFiltermyFilter
 Filter 1. (for 12 db/Octave).

BiFiltermyFilter2
 Filter 2. (for another 12 db/octave).


Detailed Description

The BiQuad module implements biquadratic filters.

Thus allowing up to two poles and zeroes in the Z-plane transform of the transfer-function.

Definition at line 32 of file filters.h.


Member Function Documentation

std::string SynthCore::BiQuad::getXML int    indent = 0 [virtual]
 

Return XML representation of parameters. Used for serializing modules.

Reimplemented from SynthCore::Module.

Definition at line 74 of file filter.cpp.

References dry, freq, FreqInput, SynthCore::Input::getXML(), SynthCore::Output::getXML(), Input1, Utils::intToString(), Utils::newline(), Output1, rez, RezInput, and Utils::space().

void SynthCore::BiQuad::setDry float    s
 

Dry/Wet percentage.

Todo:
consider the soundness of this.

Definition at line 69 of file filter.cpp.

References dry.

Module * SynthCore::BiQuad::sharedClone   [virtual]
 

Creates a copy of the Module. If any ressources can be shared across a voice the method should utilize it.

Reimplemented from SynthCore::Module.

Definition at line 20 of file filter.cpp.

References BiQuad(), dry, filterType, SynthCore::Module::firstVoice, freq, SynthCore::Module::hostVoice, SynthCore::Module::ModID, and rez.

void SynthCore::BiQuad::updateFreqAndRez  
 

The filter coefficients are not calcuted every samplestep (That would be to time consuming) Call this method to update coefficients.

Definition at line 132 of file filter.cpp.

References SynthCore::BiFilter::allpassFreqAndQ(), SynthCore::BiFilter::bandpass1FreqAndQ(), SynthCore::BiFilter::bandpass2FreqAndQ(), SynthCore::BiFilter::bypassFreqAndQ(), SynthCore::BiFilter::clone(), freq, SynthCore::BiFilter::highpassFreqAndQ(), SynthCore::BiFilter::highShelfFreqAndQAndA(), SynthCore::BiFilter::lowpassFreqAndQ(), SynthCore::BiFilter::lowShelfFreqAndQAndA(), myFilter, myFilter2, SynthCore::BiFilter::notchFreqAndQ(), SynthCore::BiFilter::peakingEQFreqAndQAndA(), and rez.

Referenced by BiQuad(), setFreqAndRez(), and update().


Member Data Documentation

bool SynthCore::BiQuad::HACK
 

HACK.

Todo:
clean this

Definition at line 43 of file filters.h.

Referenced by BiQuad(), and update().

Input* SynthCore::BiQuad::RezInput
 

Resonance (that is: Q factor) Input. This number is just a parameter used in determing the filter coefficients. For low and high pass filters it is a resonance factor.

Definition at line 73 of file filters.h.

Referenced by BiQuad(), getXML(), loadXML(), update(), and ~BiQuad().


The documentation for this class was generated from the following files:
Syntopia Project. Visit the web page, or the SourceForge page.
Docs made by Doxygen. Email: Mikael Christensen