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

DelayL Class Reference

#include <DelayL.h>

Inheritance diagram for DelayL:

Delay Filter Stk

List of all members.


Detailed Description

STK linear interpolating delay line class.

This Delay subclass implements a fractional- length digital delay-line using first-order linear interpolation. A fixed maximum length of 4095 and a delay of zero is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.

Linear interpolation is an efficient technique for achieving fractional delay lengths, though it does introduce high-frequency signal attenuation to varying degrees depending on the fractional delay setting. The use of higher order Lagrange interpolators can typically improve (minimize) this attenuation characteristic.

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

Definition at line 30 of file DelayL.h.


Public Member Functions

void clear ()
 Clears the internal state of the delay line.
StkFloat contentsAt (unsigned long tapDelay)
 Return the value at tapDelay samples from the delay-line input.
 DelayL (StkFloat delay, unsigned long maxDelay)
 Overloaded constructor which specifies the current and maximum delay-line lengths.
 DelayL ()
 Default constructor creates a delay-line with maximum length of 4095 samples and zero delay.
StkFloat energy (void) const
 Calculate and return the signal energy in the delay-line.
StkFloat getDelay (void) const
 Return the current delay-line length.
StkFloat lastOut (void) const
 Return the last computed output value.
StkFloat nextOut (void)
 Return the value which will be output by the next call to tick().
void setDelay (unsigned long delay)
 Set the delay-line length.
void setDelay (StkFloat delay)
 Set the delay-line length.
void setMaximumDelay (unsigned long delay)
 Set the maximum delay-line length.
virtual StkFramestick (StkFrames &frames, unsigned int channel=0)
 Take a channel of the StkFrames object as inputs to the filter and replace with corresponding outputs.
virtual StkFloat tick (StkFloat sample)
 Input one sample to the filter and return one output.
 ~DelayL ()
 Class destructor.

Protected Types

typedef unsigned long StkFormat

Protected Member Functions

StkFloat computeSample (StkFloat input)
virtual StkFloat getGain (void) const
 Return the current filter gain.
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.
virtual void setGain (StkFloat gain)
 Set the filter gain.
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_
StkFloat alpha_
std::vector< StkFloat > b_
StkFloat delay_
bool doNextOut_
std::ostringstream errorString_
StkFloat gain_
unsigned long inPoint_
std::vector< StkFloat > inputs_
StkFloat nextOutput_
StkFloat omAlpha_
unsigned long outPoint_
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