Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

syn::FilterModule Class Reference

implements a Source Module concept for AudioIStreams this is basically an IStream -> Module adapter ports available in this module: amplitude (input) mono output (output). More...

#include <FilterModule.h>

Inheritance diagram for syn::FilterModule:

Inheritance graph
[legend]
Collaboration diagram for syn::FilterModule:

Collaboration graph
[legend]
List of all members.

Public Types

enum  FilterType {
  NONE, LP, LP2, HP,
  LPFIR
}

Public Methods

 FilterModule ()
 default constructor. More...

virtual ~FilterModule ()
 destructor. More...

virtual void update ()
 defines this module's task (or frame) function. More...

virtual bool open ()
 modules need to be opened before they are used. More...

virtual bool isOpen ()
 check to see if the module is open. More...

virtual void close ()
 close the module when done with it. More...

virtual Moduleclone () const
 get an exact copy of me. More...

void setFilterType (FilterType t)
FilterType filterType () const
void setCutoff (float value=1.0f)
 scale between cutoff-lo and cutoff-hi. More...

void setCutoffLo (float hz=220.0f)
 Set the low point that setCutoff( 0 ) will produce. More...

void setCutoffHi (float hz=22050.0f)
 set high point that setCutoff( 1 ) will produce. More...

float cutoff () const
float cutoffLo () const
float cutoffHi () const
parameter access
virtual void getParam (const std::string &key, MultivariateType &value)
 a way to get module params without knowing the real funcs. More...

virtual void setParam (const std::string &key, const MultivariateType &value)
 a way to set module params without knowing the real funcs. More...


Detailed Description

implements a Source Module concept for AudioIStreams this is basically an IStream -> Module adapter ports available in this module: amplitude (input) mono output (output).

Definition at line 52 of file FilterModule.h.


Member Enumeration Documentation

enum syn::FilterModule::FilterType
 

Enumeration values:
NONE  
LP  
LP2  
HP  
LPFIR  

Definition at line 86 of file FilterModule.h.


Constructor & Destructor Documentation

syn::FilterModule::FilterModule ( )
 

default constructor.

Definition at line 39 of file FilterModule.cpp.

syn::FilterModule::~FilterModule ( ) [virtual]
 

destructor.

Definition at line 49 of file FilterModule.cpp.


Member Function Documentation

void syn::FilterModule::update ( ) [virtual]
 

defines this module's task (or frame) function.

Reimplemented from syn::Module.

Definition at line 68 of file FilterModule.cpp.

bool syn::FilterModule::open ( ) [virtual]
 

modules need to be opened before they are used.

Reimplemented from syn::Module.

Definition at line 55 of file FilterModule.cpp.

bool syn::FilterModule::isOpen ( ) [virtual]
 

check to see if the module is open.

Definition at line 53 of file FilterModule.cpp.

void syn::FilterModule::close ( ) [virtual]
 

close the module when done with it.

Reimplemented from syn::Module.

Definition at line 64 of file FilterModule.cpp.

Module * syn::FilterModule::clone ( ) const [inline, virtual]
 

get an exact copy of me.

Reimplemented from syn::Module.

Definition at line 74 of file FilterModule.h.

void syn::FilterModule::setFilterType ( FilterType t ) [inline]
 

Definition at line 90 of file FilterModule.h.

Referenced by setParam().

FilterType syn::FilterModule::filterType ( ) const [inline]
 

Definition at line 95 of file FilterModule.h.

Referenced by getParam().

void syn::FilterModule::setCutoff ( float value = 1.0f ) [inline]
 

scale between cutoff-lo and cutoff-hi.

Precondition:
: only pass in positive float values between 0-1 @post: calling this might be costly (might involve some trig)
Parameters:
value   When == 0.0 produces low-pass filter with cutoff set at cutoffLo(). When == 1.0 produces low-pass filter with cutoff set at cutoffHigh(). Valid ranges for this parameter is 0-1.

Definition at line 106 of file FilterModule.h.

Referenced by FilterModule(), setCutoffHi(), setCutoffLo(), setFilterType(), and setParam().

void syn::FilterModule::setCutoffLo ( float hz = 220.0f ) [inline]
 

Set the low point that setCutoff( 0 ) will produce.

Parameters:
hz   Positive value in Herz between 0 and Nyquist frequency (samplingrate / 2). Should be less than cutoffHi().

Definition at line 136 of file FilterModule.h.

Referenced by setParam().

void syn::FilterModule::setCutoffHi ( float hz = 22050.0f ) [inline]
 

set high point that setCutoff( 1 ) will produce.

Parameters:
hz   Positive value in Herz between 0 and Nyquist frequency (samplingrate / 2). Should be larger than cutoffLo().

Definition at line 148 of file FilterModule.h.

Referenced by setParam().

float syn::FilterModule::cutoff ( ) const [inline]
 

Definition at line 154 of file FilterModule.h.

Referenced by getParam().

float syn::FilterModule::cutoffLo ( ) const [inline]
 

Definition at line 155 of file FilterModule.h.

Referenced by getParam().

float syn::FilterModule::cutoffHi ( ) const [inline]
 

Definition at line 156 of file FilterModule.h.

Referenced by getParam().

void syn::FilterModule::getParam ( const std::string & key,
MultivariateType & value ) [inline, virtual]
 

a way to get module params without knowing the real funcs.

Reimplemented from syn::Module.

Definition at line 161 of file FilterModule.h.

void syn::FilterModule::setParam ( const std::string & key,
const MultivariateType & value ) [inline, virtual]
 

a way to set module params without knowing the real funcs.

Reimplemented from syn::Module.

Definition at line 174 of file FilterModule.h.


The documentation for this class was generated from the following files:
Generated at Mon Apr 15 09:27:55 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001