Skip to content

daisysp::DelayLine

More...

#include <delayline.h>

Public Functions

Name
DelayLine()
~DelayLine()
void Init()
void Reset()
void SetDelay(size_t delay)
void SetDelay(float delay)
void Write(const T sample)
const T Read() const
const T Read(float delay) const
const T ReadHermite(float delay) const
const T Allpass(const T sample, size_t delay, const T coefficient)

Detailed Description

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

Simple Delay line. November 2019

Converted to Template December 2019

declaration example: (1 second of floats)

DelayLine del;

By: shensley

Public Functions Documentation

function DelayLine

inline DelayLine()

function ~DelayLine

inline ~DelayLine()

function Init

inline void Init()

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


function Reset

inline void Reset()

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


function SetDelay

inline void SetDelay(
    size_t delay
)

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


function SetDelay

inline void SetDelay(
    float delay
)

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


function Write

inline void Write(
    const T sample
)

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


function Read

inline const T Read() const

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


function Read

inline const T Read(
    float delay
) const

Read from a set location


function ReadHermite

inline const T ReadHermite(
    float delay
) const

function Allpass

inline const T Allpass(
    const T sample,
    size_t delay,
    const T coefficient
)

---

Updated on 2024-01-03 at 19:38:46 +0000