Vital
Loading...
Searching...
No Matches
vital::Delay< MemoryType > Class Template Reference

A flexible delay line effect processor that can operate in various styles and apply filtering. More...

#include <delay.h>

Inheritance diagram for vital::Delay< MemoryType >:
vital::Processor

Public Types

enum  {
  kAudio , kWet , kFrequency , kFrequencyAux ,
  kFeedback , kDamping , kStyle , kFilterCutoff ,
  kFilterSpread , kNumInputs
}
 Input indices for the delay processor. More...
 
enum  Style {
  kMono , kStereo , kPingPong , kMidPingPong ,
  kNumStyles , kClampedDampened , kClampedUnfiltered , kUnclampedUnfiltered
}
 Styles of delay. More...
 

Public Member Functions

 Delay (int size)
 Constructs a Delay processor with a given memory size.
 
virtual ~Delay ()
 Virtual destructor.
 
Processorclone () const override
 Clones this Processor for polyphonic expansion. Must be overridden by subclasses.
 
void hardReset () override
 Hard-resets the delay line and internal filters.
 
void setMaxSamples (int max_samples)
 Sets the maximum number of samples for the delay.
 
virtual void process (int num_samples) override
 Processes a block of audio using the connected inputs.
 
virtual void processWithInput (const poly_float *audio_in, int num_samples) override
 Processes a block of audio from a given input buffer.
 
void processCleanUnfiltered (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_wet, poly_float current_dry)
 Processes a clean, unfiltered delay without clamping or filtering.
 
void processUnfiltered (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_wet, poly_float current_dry)
 Processes an unfiltered delay with possible feedback saturation.
 
void process (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_filter_gain, poly_float current_low_coefficient, poly_float current_high_coefficient, poly_float current_wet, poly_float current_dry)
 Processes a filtered delay applying low-pass and high-pass filtering.
 
void processDamped (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_low_coefficient, poly_float current_wet, poly_float current_dry)
 Processes a damped delay line using a low-pass filter for damping.
 
void processPingPong (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_filter_gain, poly_float current_low_coefficient, poly_float current_high_coefficient, poly_float current_wet, poly_float current_dry)
 Processes a ping-pong delay, alternating the delayed signal between channels.
 
void processMonoPingPong (const poly_float *audio_in, int num_samples, poly_float current_period, poly_float current_feedback, poly_float current_filter_gain, poly_float current_low_coefficient, poly_float current_high_coefficient, poly_float current_wet, poly_float current_dry)
 Processes a mono ping-pong delay, collapsing input before ping-ponging.
 
poly_float tickCleanUnfiltered (poly_float audio_in, poly_float period, poly_float feedback, poly_float wet, poly_float dry)
 A single-sample tick for a clean, unfiltered delay line.
 
poly_float tickUnfiltered (poly_float audio_in, poly_float period, poly_float feedback, poly_float wet, poly_float dry)
 A single-sample tick for an unfiltered delay line with saturation.
 
poly_float tick (poly_float audio_in, poly_float period, poly_float feedback, poly_float filter_gain, poly_float low_coefficient, poly_float high_coefficient, poly_float wet, poly_float dry)
 A single-sample tick for a filtered delay line.
 
poly_float tickDamped (poly_float audio_in, poly_float period, poly_float feedback, poly_float low_coefficient, poly_float wet, poly_float dry)
 A single-sample tick for a damped delay line using a low-pass filter.
 
poly_float tickPingPong (poly_float audio_in, poly_float period, poly_float feedback, poly_float filter_gain, poly_float low_coefficient, poly_float high_coefficient, poly_float wet, poly_float dry)
 A single-sample tick for a ping-pong delay line.
 
poly_float tickMonoPingPong (poly_float audio_in, poly_float period, poly_float feedback, poly_float filter_gain, poly_float low_coefficient, poly_float high_coefficient, poly_float wet, poly_float dry)
 A single-sample tick for a mono ping-pong delay line.
 
- Public Member Functions inherited from vital::Processor
 Processor (int num_inputs, int num_outputs, bool control_rate=false, int max_oversample=1)
 Constructs a Processor with a given number of inputs/outputs and oversampling.
 
virtual ~Processor ()
 Virtual destructor.
 
virtual bool hasState () const
 Indicates whether this Processor requires per-voice state.
 
virtual void init ()
 Called after constructor, used for any additional initialization. Subclasses can override. Sets the initialized flag.
 
virtual void reset (poly_mask reset_mask)
 Called to reset the Processor's per-voice state (e.g., on note-on).
 
bool initialized ()
 Returns whether this Processor has been initialized.
 
virtual void setSampleRate (int sample_rate)
 Updates the sample rate of this Processor (scaled by oversampling).
 
virtual void setOversampleAmount (int oversample)
 Sets the oversampling amount and updates the effective sample rate.
 
force_inline bool enabled () const
 Checks if this Processor is enabled.
 
virtual void enable (bool enable)
 Enables or disables this Processor.
 
force_inline int getSampleRate () const
 Retrieves the current (effective) sample rate.
 
force_inline int getOversampleAmount () const
 Retrieves the current oversampling factor.
 
force_inline bool isControlRate () const
 Checks if this Processor is running at control rate (buffer_size == 1).
 
virtual void setControlRate (bool control_rate)
 Sets whether this Processor runs at control rate.
 
force_inline poly_mask getResetMask (int input_index) const
 Retrieves a mask indicating which voices triggered a note-on event. Compares the input's trigger_value to kVoiceOn.
 
force_inline void clearOutputBufferForReset (poly_mask reset_mask, int input_index, int output_index) const
 Clears output samples for voices that are about to be reset, based on the trigger offset.
 
bool inputMatchesBufferSize (int input=0)
 Checks whether the buffer size of a particular input matches the size needed by this Processor.
 
bool checkInputAndOutputSize (int num_samples)
 Checks if all inputs and outputs have buffers big enough for num_samples.
 
virtual bool isPolyphonic () const
 Checks if this Processor is polyphonic by querying its ProcessorRouter.
 
void plug (const Output *source)
 Connects an external Output to this Processor's first input.
 
void plug (const Output *source, unsigned int input_index)
 Connects an external Output to a specified input index.
 
void plug (const Processor *source)
 Connects the first output of a Processor to this Processor's first input.
 
void plug (const Processor *source, unsigned int input_index)
 Connects the first output of a Processor to a specified input index.
 
void plugNext (const Output *source)
 Connects an external Output to the first available (unplugged) input.
 
void plugNext (const Processor *source)
 Connects the first output of a Processor to the first available (unplugged) input.
 
void useInput (Input *input)
 Uses an existing Input object as this Processor's first input.
 
void useInput (Input *input, int index)
 Uses an existing Input object at a specified input index.
 
void useOutput (Output *output)
 Uses an existing Output object as this Processor's first output.
 
void useOutput (Output *output, int index)
 Uses an existing Output object at a specified output index.
 
int connectedInputs ()
 Counts how many inputs are connected to a real source (not null_source_).
 
virtual void unplugIndex (unsigned int input_index)
 Removes the connection at a specified input index, if any.
 
virtual void unplug (const Output *source)
 Removes a connection to a given Output from all inputs.
 
virtual void unplug (const Processor *source)
 Removes connections to all outputs from a given Processor.
 
virtual void numInputsChanged ()
 Called when the number of inputs changes (e.g., new connections). Subclasses may override for dynamic behavior.
 
force_inline void router (ProcessorRouter *router)
 Sets the ProcessorRouter that owns or manages this Processor.
 
force_inline ProcessorRouterrouter () const
 Returns the ProcessorRouter that currently owns this Processor.
 
ProcessorRoutergetTopLevelRouter () const
 Gets the topmost (root) ProcessorRouter by traversing parent routers.
 
virtual void registerInput (Input *input, int index)
 Registers a new input, appending it to the input list.
 
virtual OutputregisterOutput (Output *output, int index)
 Registers a new Output in the output list at a specified index.
 
virtual void registerInput (Input *input)
 Registers a new Input by appending it to the end of the input list.
 
virtual OutputregisterOutput (Output *output)
 Registers a new Output by appending it to the end of the output list.
 
force_inline int numInputs () const
 Returns the total number of Input pointers (owned or otherwise).
 
force_inline int numOutputs () const
 Returns the total number of Output pointers (owned or otherwise).
 
force_inline int numOwnedInputs () const
 Returns how many Input objects this Processor owns.
 
force_inline int numOwnedOutputs () const
 Returns how many Output objects this Processor owns.
 
force_inline Inputinput (unsigned int index=0) const
 Retrieves the Input pointer at a given index.
 
force_inline bool isInputSourcePolyphonic (int index=0)
 Checks if the input source at a given index is polyphonic.
 
force_inline InputownedInput (unsigned int index=0) const
 Retrieves an owned Input pointer at a given index.
 
force_inline Outputoutput (unsigned int index=0) const
 Retrieves the Output pointer at a given index.
 
force_inline OutputownedOutput (unsigned int index=0) const
 Retrieves an owned Output pointer at a given index.
 
void setPluggingStart (int start)
 Sets the position at which plugNext starts searching for an open input.
 

Static Public Member Functions

static poly_float getFilterRadius (poly_float spread)
 Computes the filter radius based on spread.
 

Static Public Attributes

static constexpr mono_float kSpreadOctaveRange = 8.0f
 Constants for internal calculations.
 
static constexpr mono_float kDefaultPeriod = 100.0f
 Default delay period in samples.
 
static constexpr mono_float kDelayHalfLife = 0.02f
 Time constant for smoothing frequency transitions.
 
static constexpr mono_float kMinDampNote = 60.0f
 Minimum MIDI note for damping frequency.
 
static constexpr mono_float kMaxDampNote = 136.0f
 Maximum MIDI note for damping frequency.
 

Protected Member Functions

 Delay ()
 Protected default constructor for derived classes.
 
- Protected Member Functions inherited from vital::Processor
OutputaddOutput (int oversample=1)
 Creates and registers a new Output. Handles control rate vs. audio rate.
 
InputaddInput ()
 Creates and registers a new Input, initially connected to null_source_.
 

Protected Attributes

std::unique_ptr< MemoryType > memory_
 Internal memory buffer for delay line.
 
poly_float last_frequency_
 Tracks last frequency for smoothing delay time changes.
 
poly_float feedback_
 Current feedback value.
 
poly_float wet_
 Current wet mix value.
 
poly_float dry_
 Current dry mix value.
 
poly_float period_
 Current delay period in samples.
 
poly_float low_coefficient_
 Low-pass filter coefficient.
 
poly_float high_coefficient_
 High-pass filter coefficient.
 
poly_float filter_gain_
 Gain applied before filtering stages.
 
OnePoleFilter low_pass_
 Low-pass filter for damping/frequency shaping.
 
OnePoleFilter high_pass_
 High-pass filter for shaping.
 
- Protected Attributes inherited from vital::Processor
std::shared_ptr< ProcessorStatestate_
 Shared state (sample rate, oversample, etc.)
 
int plugging_start_
 The index at which plugNext starts searching for an unplugged input.
 
std::vector< std::shared_ptr< Input > > owned_inputs_
 Inputs owned by this Processor.
 
std::vector< std::shared_ptr< Output > > owned_outputs_
 Outputs owned by this Processor.
 
std::shared_ptr< std::vector< Input * > > inputs_
 All inputs, owned or external.
 
std::shared_ptr< std::vector< Output * > > outputs_
 All outputs, owned or external.
 
ProcessorRouterrouter_
 The ProcessorRouter that manages this Processor.
 

Additional Inherited Members

- Static Protected Attributes inherited from vital::Processor
static const Output null_source_
 A null (dummy) source used for unconnected inputs.
 

Detailed Description

template<class MemoryType>
class vital::Delay< MemoryType >

A flexible delay line effect processor that can operate in various styles and apply filtering.

The Delay class is templated on a MemoryType, allowing for different memory implementations (e.g., stereo or mono). It supports multiple delay styles (mono, stereo, ping-pong, damped, etc.) and can apply filtering to the delayed signal via internal one-pole filters.

Inputs:

  • kAudio: The input audio signal.
  • kWet: The wet mix percentage (0.0 to 1.0).
  • kFrequency: The base delay frequency in Hz (controls the delay time).
  • kFrequencyAux: The secondary delay frequency, used for stereo or ping-pong modes.
  • kFeedback: The amount of delayed signal fed back into the input.
  • kDamping: Controls the damping frequency applied in certain modes.
  • kStyle: The style of delay (mono, stereo, ping-pong, etc.).
  • kFilterCutoff: The cutoff frequency (in MIDI note) for internal filtering.
  • kFilterSpread: The frequency spread around the cutoff for the filter bands.

Output:

  • One audio output containing the processed delay signal.

Styles:

  • kMono: A simple mono delay.
  • kStereo: Stereo delay with separate delay times for left and right channels.
  • kPingPong: A ping-pong delay that alternates the delayed signal between left and right.
  • kMidPingPong: A ping-pong style delay starting from a mid-image source.
  • kClampedDampened: Delay with clamped dampening filters.
  • kClampedUnfiltered: Delay with clamped parameters but no filtering.
  • kUnclampedUnfiltered: Unclamped, no filtering delay (clean).

The delay time is derived from the input frequency parameters and can be modulated over time. Internal filtering is handled by one-pole high-pass and low-pass filters applied to the delayed signal.

Template Parameters
MemoryTypeThe memory implementation type (e.g., Memory or StereoMemory).

Member Enumeration Documentation

◆ anonymous enum

template<class MemoryType >
anonymous enum

Input indices for the delay processor.

Enumerator
kAudio 

Input audio signal.

kWet 

Wet mix amount.

kFrequency 

Base delay frequency.

kFrequencyAux 

Auxiliary delay frequency (for stereo/ping-pong).

kFeedback 

Feedback amount.

kDamping 

Damping control.

kStyle 

Delay style selection.

kFilterCutoff 

Filter cutoff (in MIDI note).

kFilterSpread 

Filter spread around cutoff.

kNumInputs 

◆ Style

template<class MemoryType >
enum vital::Delay::Style

Styles of delay.

Enumerator
kMono 
kStereo 
kPingPong 
kMidPingPong 
kNumStyles 
kClampedDampened 
kClampedUnfiltered 
kUnclampedUnfiltered 

Constructor & Destructor Documentation

◆ Delay() [1/2]

template<class MemoryType >
vital::Delay< MemoryType >::Delay ( int size)
inline

Constructs a Delay processor with a given memory size.

Parameters
sizeThe maximum delay size in samples.

◆ ~Delay()

template<class MemoryType >
virtual vital::Delay< MemoryType >::~Delay ( )
inlinevirtual

Virtual destructor.

◆ Delay() [2/2]

template<class MemoryType >
vital::Delay< MemoryType >::Delay ( )
inlineprotected

Protected default constructor for derived classes.

Member Function Documentation

◆ clone()

template<class MemoryType >
Processor * vital::Delay< MemoryType >::clone ( ) const
inlineoverridevirtual

Clones this Processor for polyphonic expansion. Must be overridden by subclasses.

Returns
A pointer to a newly allocated Processor that is a copy of this Processor.

Implements vital::Processor.

◆ getFilterRadius()

template<class MemoryType >
static poly_float vital::Delay< MemoryType >::getFilterRadius ( poly_float spread)
inlinestatic

Computes the filter radius based on spread.

Parameters
spreadThe input spread (0.0 to 1.0).
Returns
Filter radius in semitones.

◆ hardReset()

template<class MemoryType >
void vital::Delay< MemoryType >::hardReset ( )
overridevirtual

Hard-resets the delay line and internal filters.

Resets the delay memory, low-pass, and high-pass filters to default states.

Reimplemented from vital::Processor.

◆ process() [1/2]

template<class MemoryType >
void vital::Delay< MemoryType >::process ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_filter_gain,
poly_float current_low_coefficient,
poly_float current_high_coefficient,
poly_float current_wet,
poly_float current_dry )

Processes a filtered delay applying low-pass and high-pass filtering.

Processes audio with filtering, saturation, and parameter smoothing.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_filter_gainCurrent gain factor for filtering.
current_low_coefficientCurrent low-pass filter coefficient.
current_high_coefficientCurrent high-pass filter coefficient.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ process() [2/2]

template<class MemoryType >
void vital::Delay< MemoryType >::process ( int num_samples)
overridevirtual

Processes a block of audio using the connected inputs.

Processes the delay by reading from the kAudio input buffer.

Parameters
num_samplesNumber of samples to process.

Implements vital::Processor.

◆ processCleanUnfiltered()

template<class MemoryType >
void vital::Delay< MemoryType >::processCleanUnfiltered ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_wet,
poly_float current_dry )

Processes a clean, unfiltered delay without clamping or filtering.

Processes audio for a clean, unfiltered delay line (no saturation or filtering).

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ processDamped()

template<class MemoryType >
void vital::Delay< MemoryType >::processDamped ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_low_coefficient,
poly_float current_wet,
poly_float current_dry )

Processes a damped delay line using a low-pass filter for damping.

Processes audio with a single low-pass filter for damping.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_low_coefficientCurrent low-pass filter coefficient.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ processMonoPingPong()

template<class MemoryType >
void vital::Delay< MemoryType >::processMonoPingPong ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_filter_gain,
poly_float current_low_coefficient,
poly_float current_high_coefficient,
poly_float current_wet,
poly_float current_dry )

Processes a mono ping-pong delay, collapsing input before ping-ponging.

Processes a mono ping-pong delay, merging channels to mono before bouncing left/right.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_filter_gainFilter gain factor.
current_low_coefficientLow-pass filter coefficient.
current_high_coefficientHigh-pass filter coefficient.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ processPingPong()

template<class MemoryType >
void vital::Delay< MemoryType >::processPingPong ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_filter_gain,
poly_float current_low_coefficient,
poly_float current_high_coefficient,
poly_float current_wet,
poly_float current_dry )

Processes a ping-pong delay, alternating the delayed signal between channels.

Processes a stereo ping-pong delay, swapping channels and applying filters.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_filter_gainFilter gain factor.
current_low_coefficientLow-pass filter coefficient.
current_high_coefficientHigh-pass filter coefficient.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ processUnfiltered()

template<class MemoryType >
void vital::Delay< MemoryType >::processUnfiltered ( const poly_float * audio_in,
int num_samples,
poly_float current_period,
poly_float current_feedback,
poly_float current_wet,
poly_float current_dry )

Processes an unfiltered delay with possible feedback saturation.

Processes audio with unfiltered memory but includes mild saturation in the feedback path.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.
current_periodCurrent delay period.
current_feedbackCurrent feedback value.
current_wetCurrent wet mix.
current_dryCurrent dry mix.

◆ processWithInput()

template<class MemoryType >
void vital::Delay< MemoryType >::processWithInput ( const poly_float * audio_in,
int num_samples )
overridevirtual

Processes a block of audio from a given input buffer.

The main entry point for delay processing, selecting a style and applying transformations.

Parameters
audio_inThe input audio buffer.
num_samplesNumber of samples to process.

Calculates smooth transitions of parameters (wet, dry, feedback, etc.), then calls one of the style-specific process methods.

Parameters
audio_inPointer to the input buffer.
num_samplesNumber of samples to process.

Reimplemented from vital::Processor.

◆ setMaxSamples()

template<class MemoryType >
void vital::Delay< MemoryType >::setMaxSamples ( int max_samples)

Sets the maximum number of samples for the delay.

Allocates a new memory buffer with max_samples and clamps the current delay period.

Parameters
max_samplesThe new maximum size of the delay buffer.
max_samplesMaximum samples for the new buffer size.

◆ tick()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tick ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float filter_gain,
poly_float low_coefficient,
poly_float high_coefficient,
poly_float wet,
poly_float dry )

A single-sample tick for a filtered delay line.

Single-sample tick for the main (filtered, saturated) delay process.

◆ tickCleanUnfiltered()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tickCleanUnfiltered ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float wet,
poly_float dry )

A single-sample tick for a clean, unfiltered delay line.

Single-sample tick for a clean, unfiltered delay.

◆ tickDamped()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tickDamped ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float low_coefficient,
poly_float wet,
poly_float dry )

A single-sample tick for a damped delay line using a low-pass filter.

Single-sample tick for a damped delay (low-pass filtering only).

◆ tickMonoPingPong()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tickMonoPingPong ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float filter_gain,
poly_float low_coefficient,
poly_float high_coefficient,
poly_float wet,
poly_float dry )

A single-sample tick for a mono ping-pong delay line.

Single-sample tick for a mono ping-pong delay, merging channels before swap.

◆ tickPingPong()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tickPingPong ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float filter_gain,
poly_float low_coefficient,
poly_float high_coefficient,
poly_float wet,
poly_float dry )

A single-sample tick for a ping-pong delay line.

Single-sample tick for a stereo ping-pong delay, swapping channels.

◆ tickUnfiltered()

template<class MemoryType >
force_inline poly_float vital::Delay< MemoryType >::tickUnfiltered ( poly_float audio_in,
poly_float period,
poly_float feedback,
poly_float wet,
poly_float dry )

A single-sample tick for an unfiltered delay line with saturation.

Single-sample tick for an unfiltered delay including mild saturation.

Member Data Documentation

◆ dry_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::dry_
protected

Current dry mix value.

◆ feedback_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::feedback_
protected

Current feedback value.

◆ filter_gain_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::filter_gain_
protected

Gain applied before filtering stages.

◆ high_coefficient_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::high_coefficient_
protected

High-pass filter coefficient.

◆ high_pass_

template<class MemoryType >
OnePoleFilter vital::Delay< MemoryType >::high_pass_
protected

High-pass filter for shaping.

◆ kDefaultPeriod

template<class MemoryType >
mono_float vital::Delay< MemoryType >::kDefaultPeriod = 100.0f
staticconstexpr

Default delay period in samples.

◆ kDelayHalfLife

template<class MemoryType >
mono_float vital::Delay< MemoryType >::kDelayHalfLife = 0.02f
staticconstexpr

Time constant for smoothing frequency transitions.

◆ kMaxDampNote

template<class MemoryType >
mono_float vital::Delay< MemoryType >::kMaxDampNote = 136.0f
staticconstexpr

Maximum MIDI note for damping frequency.

◆ kMinDampNote

template<class MemoryType >
mono_float vital::Delay< MemoryType >::kMinDampNote = 60.0f
staticconstexpr

Minimum MIDI note for damping frequency.

◆ kSpreadOctaveRange

template<class MemoryType >
mono_float vital::Delay< MemoryType >::kSpreadOctaveRange = 8.0f
staticconstexpr

Constants for internal calculations.

Octave range of filter spread.

◆ last_frequency_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::last_frequency_
protected

Tracks last frequency for smoothing delay time changes.

◆ low_coefficient_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::low_coefficient_
protected

Low-pass filter coefficient.

◆ low_pass_

template<class MemoryType >
OnePoleFilter vital::Delay< MemoryType >::low_pass_
protected

Low-pass filter for damping/frequency shaping.

◆ memory_

template<class MemoryType >
std::unique_ptr<MemoryType> vital::Delay< MemoryType >::memory_
protected

Internal memory buffer for delay line.

◆ period_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::period_
protected

Current delay period in samples.

◆ wet_

template<class MemoryType >
poly_float vital::Delay< MemoryType >::wet_
protected

Current wet mix value.


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