virtual void processWithInput(const poly_float *audio_in, int num_samples) override
Processes a block of audio from a given input buffer.
Definition delay.cpp:83
@ kFrequency
Base delay frequency.
Definition delay.h:70
@ kFeedback
Feedback amount.
Definition delay.h:72
@ kWet
Wet mix amount.
Definition delay.h:69
@ kFilterCutoff
Filter cutoff (in MIDI note).
Definition delay.h:75
@ kFilterSpread
Filter spread around cutoff.
Definition delay.h:76
@ kStyle
Delay style selection.
Definition delay.h:74
@ kFrequencyAux
Auxiliary delay frequency (for stereo/ping-pong).
Definition delay.h:71
void setMaxSamples(int max_samples)
Sets the maximum number of samples for the delay.
Definition delay.cpp:57
virtual void setSampleRate(int sample_rate) override
Sets the sample rate for the delay. This ensures that time-based parameters remain accurate.
Definition delay_module.cpp:51
DelayModule(const Output *beats_per_second)
Constructs the DelayModule, linking it to a beats-per-second output for tempo synchronization.
Definition delay_module.cpp:8
virtual void processWithInput(const poly_float *audio_in, int num_samples) override
Processes audio input through the delay effect.
Definition delay_module.cpp:68
const Output * beats_per_second_
An output providing tempo information for syncing delay times.
Definition delay_module.h:90
static constexpr mono_float kMaxDelayTime
The maximum delay time in seconds.
Definition delay_module.h:19
StereoDelay * delay_
The underlying StereoDelay processor implementing the delay effect.
Definition delay_module.h:91
virtual ~DelayModule()
Destroys the DelayModule and releases associated resources.
Definition delay_module.cpp:15
virtual void init() override
Initializes the DelayModule, creating and linking parameters and setting up the StereoDelay processor...
Definition delay_module.cpp:17
virtual void setOversampleAmount(int oversample) override
Sets the oversample amount and updates internal delay buffer sizes accordingly.
Definition delay_module.cpp:60
virtual void setOversampleAmount(int oversample)
Sets the oversampling amount and updates the effective sample rate.
Definition processor.h:293
void useOutput(Output *output)
Uses an existing Output object as this Processor's first output.
Definition processor.cpp:138
force_inline int getSampleRate() const
Retrieves the current (effective) sample rate.
Definition processor.h:326
void plug(const Output *source)
Connects an external Output to this Processor's first input.
Definition processor.cpp:79
virtual void process(int num_samples)=0
Main processing function. Called by the ProcessorRouter.
force_inline Output * output(unsigned int index=0) const
Retrieves the Output pointer at a given index.
Definition processor.h:616
virtual void setSampleRate(int sample_rate)
Updates the sample rate of this Processor (scaled by oversampling).
Definition processor.h:285
virtual void init()
Called after constructor, used for any additional initialization. Subclasses can override....
Definition processor.h:258
virtual void addIdleProcessor(Processor *processor)
Adds a Processor that should remain idle (not processed) in the router.
Definition processor_router.cpp:146
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
Value * createBaseControl(std::string name, bool audio_rate=false, bool smooth_value=false)
Creates a simple control processor for a given parameter name.
Definition synth_module.cpp:22
Output * createTempoSyncSwitch(std::string name, Processor *frequency, const Output *beats_per_second, bool poly, Input *midi=nullptr)
Creates a tempo sync switch that toggles between tempo-based frequency and free-running frequency.
Definition synth_module.cpp:289
Output * createMonoModControl(std::string name, bool audio_rate=false, bool smooth_value=false, Output *internal_modulation=nullptr)
Creates a monophonic mod control, including applying parameter scaling.
Definition synth_module.cpp:104
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
Declares classes for time-domain memory storage and retrieval with cubic interpolation.
Contains classes and functions used within the Vital synthesizer framework.
Delay< StereoMemory > StereoDelay
StereoDelay is a Delay processor specialized with StereoMemory.
Definition delay.h:307
Holds and manages a buffer of samples (poly_float) for a Processor's output.
Definition processor.h:35
Processor * owner
Owning processor.
Definition processor.h:112
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600