Signalsmith Audio's DSP Library  1.6.0
Useful C++ classes/templates for audio effects
Static Attributes | Methods
signalsmith::delay::Delay< Sample, Interpolator > Class Template Reference

#include <delay.h>

Detailed Description

template<class Sample, template< typename > class Interpolator = InterpolatorLinear>
class signalsmith::delay::Delay< Sample, Interpolator >

A single-channel delay-line containing its own buffer.

Inherits signalsmith::delay::Reader< Sample, InterpolatorLinear >.

Static Attributes

static constexpr Sample latency = Super::latency
 

Methods

 Delay (int capacity=0)
 
 Delay (const Interpolator< Sample > &interp, int capacity=0)
 Pass in a configured interpolator. More...
 
void reset (Sample value=Sample())
 
void resize (int minCapacity, Sample value=Sample())
 
Sample read (Sample delaySamples) const
 Read a sample from delaySamples >= 0 in the past. More...
 
Delaywrite (Sample value)
 Writes a sample. Returns the same object, so that you can say delay.write(v).read(delay). More...
 

Constructor & Destructor Documentation

◆ Delay()

template<class Sample , template< typename > class Interpolator = InterpolatorLinear>
signalsmith::delay::Delay< Sample, Interpolator >::Delay ( const Interpolator< Sample > &  interp,
int  capacity = 0 
)
inline

Pass in a configured interpolator.

Method Details

◆ read()

template<class Sample , template< typename > class Interpolator = InterpolatorLinear>
Sample signalsmith::delay::Delay< Sample, Interpolator >::read ( Sample  delaySamples) const
inline

Read a sample from delaySamples >= 0 in the past.

The interpolator may add its own latency on top of this (see Delay::latency). The default interpolation (linear) has 0 latency.

◆ write()

template<class Sample , template< typename > class Interpolator = InterpolatorLinear>
Delay& signalsmith::delay::Delay< Sample, Interpolator >::write ( Sample  value)
inline

Writes a sample. Returns the same object, so that you can say delay.write(v).read(delay).