Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Delay Class Reference

STK non-interpolating delay line class. More...

#include <Delay.h>

Inheritance diagram for Delay:

Filter Stk DelayA DelayL List of all members.

Public Member Functions

 Delay ()
 Default constructor creates a delay-line with maximum length of 4095 samples and zero delay.

 Delay (long theDelay, long maxDelay)
 Overloaded constructor which specifies the current and maximum delay-line lengths.

virtual ~Delay ()
 Class destructor.

void clear ()
 Clears the internal state of the delay line.

void setDelay (long theDelay)
 Set the delay-line length.

long getDelay (void) const
 Return the current delay-line length.

MY_FLOAT energy (void) const
 Calculate and return the signal energy in the delay-line.

MY_FLOAT contentsAt (unsigned long tapDelay) const
 Return the value at tapDelay samples from the delay-line input.

MY_FLOAT lastOut (void) const
 Return the last computed output value.

virtual MY_FLOAT nextOut (void) const
 Return the value which will be output by the next call to tick().

virtual MY_FLOAT tick (MY_FLOAT sample)
 Input one sample to the delay-line and return one output.

virtual MY_FLOAT * tick (MY_FLOAT *vector, unsigned int vectorSize)
 Input vectorSize samples to the delay-line and return an equal number of outputs in vector.


Detailed Description

STK non-interpolating delay line class.

This protected Filter subclass implements a non-interpolating digital delay-line. 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.

A non-interpolating delay line is typically used in fixed delay-length applications, such as for reverberation.

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

Definition at line 26 of file Delay.h.


Member Function Documentation

void Delay::setDelay long  theDelay  ) 
 

Set the delay-line length.

The valid range for theDelay is from 0 to the maximum delay-line length.

MY_FLOAT Delay::contentsAt unsigned long  tapDelay  )  const
 

Return the value at tapDelay samples from the delay-line input.

The tap point is determined modulo the delay-line length and is relative to the last input value (i.e., a tapDelay of zero returns the last input value).

virtual MY_FLOAT Delay::nextOut void   )  const [virtual]
 

Return the value which will be output by the next call to tick().

This method is valid only for delay settings greater than zero!


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.