DaisySP
Loading...
Searching...
No Matches
Public Member Functions | List of all members
daisysp::DelayLine< T, max_size > Class Template Reference

#include <delayline.h>

Public Member Functions

void Init ()
 
void Reset ()
 
void SetDelay (size_t delay)
 
void SetDelay (float delay)
 
void Write (const T sample)
 
constRead () const
 
constRead (float delay) const
 
constReadHermite (float delay) const
 
constAllpass (const T sample, size_t delay, const T coefficient)
 

Detailed Description

template<typename T, size_t max_size>
class daisysp::DelayLine< T, max_size >

Simple Delay line. November 2019

Converted to Template December 2019

declaration example: (1 second of floats)

DelayLine<float, SAMPLE_RATE> del;

By: shensley

Member Function Documentation

◆ Init()

template<typename T , size_t max_size>
void daisysp::DelayLine< T, max_size >::Init ( )
inline

initializes the delay line by clearing the values within, and setting delay to 1 sample.

◆ Read() [1/2]

template<typename T , size_t max_size>
const T daisysp::DelayLine< T, max_size >::Read ( ) const
inline

returns the next sample of type T in the delay line, interpolated if necessary.

◆ Read() [2/2]

template<typename T , size_t max_size>
const T daisysp::DelayLine< T, max_size >::Read ( float delay) const
inline

Read from a set location

◆ Reset()

template<typename T , size_t max_size>
void daisysp::DelayLine< T, max_size >::Reset ( )
inline

clears buffer, sets write ptr to 0, and delay to 1 sample.

◆ SetDelay() [1/2]

template<typename T , size_t max_size>
void daisysp::DelayLine< T, max_size >::SetDelay ( float delay)
inline

sets the delay time in samples If a float is passed in, a fractional component will be calculated for interpolating the delay line.

◆ SetDelay() [2/2]

template<typename T , size_t max_size>
void daisysp::DelayLine< T, max_size >::SetDelay ( size_t delay)
inline

sets the delay time in samples If a float is passed in, a fractional component will be calculated for interpolating the delay line.

◆ Write()

template<typename T , size_t max_size>
void daisysp::DelayLine< T, max_size >::Write ( const T sample)
inline

writes the sample of type T to the delay line, and advances the write ptr


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