arduino-audio-tools
Loading...
Searching...
No Matches
Delay Class Reference

Delay/Echo AudioEffect. See https://wiki.analog.com/resources/tools-software/sharc-audio-module/baremetal/delay-effect-tutorial Howver the dry value and wet value were replace by the depth parameter. More...

#include <AudioEffect.h>

Inheritance diagram for Delay:
AudioEffect

Public Member Functions

 Delay (const Delay &copy)
 Delay (uint16_t duration_ms=1000, float depth=0.5, float feedbackAmount=1.0, uint32_t sampleRate=44100)
 e.g. depth=0.5, ms=1000, sampleRate=44100
virtual bool active ()
 determines if the effect is active
Delay * clone ()
float getDepth ()
int16_t getDuration ()
float getFeedback ()
float getSampleRate ()
int id ()
 Allows to identify an effect.
effect_t process (effect_t input)
 calculates the effect output from the input
virtual void setActive (bool value)
 sets the effect active/inactive
void setDepth (float value)
void setDuration (int16_t dur)
void setFeedback (float feed)
void setId (int id)
 Allows to identify an effect.
void setSampleRate (int32_t sample)

Protected Member Functions

int16_t clip (int32_t in, int16_t clipLimit=32767, int16_t resultLimit=32767)
 generic clipping method
void copyParent (AudioEffect *copy)
void updateBufferSize ()

Protected Attributes

bool active_flag = true
Vector< effect_t > buffer {0}
size_t delay_len_samples = 0
size_t delay_line_index = 0
float depth = 0.0f
float duration = 0.0f
float feedback = 0.0f
int id_value = -1
float sampleRate = 0.0f

Detailed Description

Delay/Echo AudioEffect. See https://wiki.analog.com/resources/tools-software/sharc-audio-module/baremetal/delay-effect-tutorial Howver the dry value and wet value were replace by the depth parameter.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ Delay() [1/2]

Delay ( uint16_t duration_ms = 1000,
float depth = 0.5,
float feedbackAmount = 1.0,
uint32_t sampleRate = 44100 )
inline

e.g. depth=0.5, ms=1000, sampleRate=44100

◆ Delay() [2/2]

Delay ( const Delay & copy)
inline

Member Function Documentation

◆ active()

virtual bool active ( )
inlinevirtualinherited

determines if the effect is active

◆ clip()

int16_t clip ( int32_t in,
int16_t clipLimit = 32767,
int16_t resultLimit = 32767 )
inlineprotectedinherited

generic clipping method

◆ clone()

Delay * clone ( )
inlinevirtual

Implements AudioEffect.

◆ copyParent()

void copyParent ( AudioEffect * copy)
inlineprotectedinherited

◆ getDepth()

float getDepth ( )
inline

◆ getDuration()

int16_t getDuration ( )
inline

◆ getFeedback()

float getFeedback ( )
inline

◆ getSampleRate()

float getSampleRate ( )
inline

◆ id()

int id ( )
inlineinherited

Allows to identify an effect.

◆ process()

effect_t process ( effect_t in)
inlinevirtual

calculates the effect output from the input

Implements AudioEffect.

◆ setActive()

virtual void setActive ( bool value)
inlinevirtualinherited

sets the effect active/inactive

◆ setDepth()

void setDepth ( float value)
inline

◆ setDuration()

void setDuration ( int16_t dur)
inline

◆ setFeedback()

void setFeedback ( float feed)
inline

◆ setId()

void setId ( int id)
inlineinherited

Allows to identify an effect.

◆ setSampleRate()

void setSampleRate ( int32_t sample)
inline

◆ updateBufferSize()

void updateBufferSize ( )
inlineprotected

Member Data Documentation

◆ active_flag

bool active_flag = true
protectedinherited

◆ buffer

Vector<effect_t> buffer {0}
protected

◆ delay_len_samples

size_t delay_len_samples = 0
protected

◆ delay_line_index

size_t delay_line_index = 0
protected

◆ depth

float depth = 0.0f
protected

◆ duration

float duration = 0.0f
protected

◆ feedback

float feedback = 0.0f
protected

◆ id_value

int id_value = -1
protectedinherited

◆ sampleRate

float sampleRate = 0.0f
protected

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