Logo Search packages:      
Sourcecode: csound version File versions  Download package

PoleZero Class Reference

#include <PoleZero.h>

Inheritance diagram for PoleZero:

Filter Stk

List of all members.

Detailed Description

STK one-pole, one-zero filter class.

This protected Filter subclass implements a one-pole, one-zero digital filter. A method is provided for creating an allpass filter with a given coefficient. Another method is provided to create a DC blocking filter.

by Perry R. Cook and Gary P. Scavone, 1995 - 2005.

Definition at line 20 of file PoleZero.h.

Public Member Functions

void clear (void)
 Clears the internal states of the filter.
StkFloat getGain (void) const
 Return the current filter gain.
StkFloat lastOut (void) const
 Return the last computed output value.
 PoleZero ()
 Default constructor creates a first-order pass-through filter.
void setA1 (StkFloat a1)
 Set the a[1] coefficient value.
void setAllpass (StkFloat coefficient)
 Set the filter for allpass behavior using coefficient.
void setB0 (StkFloat b0)
 Set the b[0] coefficient value.
void setB1 (StkFloat b1)
 Set the b[1] coefficient value.
void setBlockZero (StkFloat thePole=0.99)
 Create a DC blocking filter with the given pole position in the z-plane.
void setGain (StkFloat gain)
 Set the filter gain.
StkFramestick (StkFrames &frames, unsigned int channel=0)
 Take a channel of the StkFrames object as inputs to the filter and replace with corresponding outputs.
StkFloat tick (StkFloat sample)
 Input one sample to the filter and return one output.
 ~PoleZero ()
 Class destructor.

Protected Types

typedef unsigned long StkFormat

Protected Member Functions

void handleError (StkError::Type type)
 Internal function for error reporting which assumes message in errorString_ variable.
void setCoefficients (std::vector< StkFloat > &bCoefficients, std::vector< StkFloat > &aCoefficients, bool clearState=false)
 Set filter coefficients.
void setDenominator (std::vector< StkFloat > &aCoefficients, bool clearState=false)
 Set denominator coefficients.
void setNumerator (std::vector< StkFloat > &bCoefficients, bool clearState=false)
 Set numerator coefficients.

Static Protected Member Functions

static void handleError (std::string message, StkError::Type type)
 Static function for error reporting and handling using c++ strings.
static void handleError (const char *message, StkError::Type type)
 Static function for error reporting and handling using c-strings.
static void printErrors (bool status)
 Toggle display of error messages before throwing exceptions.
static std::string rawwavePath (void)
 Static method which returns the current rawwave path.
static StkFloat sampleRate (void)
 Static method which returns the current STK sample rate.
static void setRawwavePath (std::string path)
 Static method which sets the STK rawwave path.
static void setSampleRate (StkFloat rate)
 Static method which sets the STK sample rate.
static void showWarnings (bool status)
 Toggle display of WARNING and STATUS messages.
static void sleep (unsigned long milliseconds)
 Static cross-platform method to sleep for a number of milliseconds.
static void swap16 (unsigned char *ptr)
 Static method which byte-swaps a 16-bit data type.
static void swap32 (unsigned char *ptr)
 Static method which byte-swaps a 32-bit data type.
static void swap64 (unsigned char *ptr)
 Static method which byte-swaps a 64-bit data type.

Protected Attributes

std::vector< StkFloat > a_
std::vector< StkFloat > b_
std::ostringstream errorString_
StkFloat gain_
std::vector< StkFloat > inputs_
std::vector< StkFloat > outputs_

Static Protected Attributes

static const StkFormat STK_FLOAT32 = 0x10
static const StkFormat STK_FLOAT64 = 0x20
static const StkFormat STK_SINT16 = 0x2
static const StkFormat STK_SINT24 = 0x4
static const StkFormat STK_SINT32 = 0x8
static const StkFormat STK_SINT8 = 0x1

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

Generated by  Doxygen 1.6.0   Back to index