12 SynthModule(0, kNumOutputs), beats_per_second_(beats_per_second), phaser_(nullptr) {
A multi-stage phaser effect that modulates filter cutoff with a low-frequency oscillator.
Definition phaser.h:19
void correctToTime(double seconds)
Corrects LFO phase according to an absolute time offset.
Definition phaser.cpp:134
@ kMix
Dry/wet mix control.
Definition phaser.h:27
@ kRate
LFO rate for cutoff modulation.
Definition phaser.h:28
@ kModDepth
Modulation depth (amount of sweep)
Definition phaser.h:31
@ kPhaseOffset
LFO phase offset for stereo spread.
Definition phaser.h:32
@ kFeedbackGain
Amount of feedback in the phaser filter.
Definition phaser.h:29
@ kBlend
Amount of pass/comb blend in the phaser.
Definition phaser.h:33
@ kCenter
Center frequency (MIDI note) for the phaser.
Definition phaser.h:30
void hardReset() override
Resets internal states, filters, and stored parameters.
Definition phaser.cpp:43
void init() override
Initializes the phaser, hooking up internal connections.
Definition phaser.cpp:29
@ kAudioOutput
Phaser audio output.
Definition phaser.h:42
@ kCutoffOutput
Current cutoff (MIDI note) at the final sample.
Definition phaser.h:43
void processWithInput(const poly_float *audio_in, int num_samples) override
Processes a block of audio using the provided input buffer.
Definition phaser.cpp:67
void hardReset() override
Performs a hard reset of the phaser's internal state.
Definition phaser_module.cpp:67
void enable(bool enable) override
Enables or disables the phaser module.
Definition phaser_module.cpp:78
@ kCutoffOutput
Definition phaser_module.h:26
@ kAudioOutput
Definition phaser_module.h:25
void setSampleRate(int sample_rate) override
Sets the sample rate for the module.
Definition phaser_module.cpp:104
void init() override
Initializes the phaser module by creating and connecting parameters to the Phaser processor.
Definition phaser_module.cpp:26
const Output * beats_per_second_
Definition phaser_module.h:100
void processWithInput(const poly_float *audio_in, int num_samples) override
Processes the input audio buffer through the phaser effect.
Definition phaser_module.cpp:117
PhaserModule(const Output *beats_per_second)
Constructs a PhaserModule.
Definition phaser_module.cpp:11
virtual ~PhaserModule()
Destructor.
Definition phaser_module.cpp:18
Phaser * phaser_
Definition phaser_module.h:101
void correctToTime(double seconds) override
Adjusts the phaser to a given time position.
Definition phaser_module.cpp:92
void useOutput(Output *output)
Uses an existing Output object as this Processor's first output.
Definition processor.cpp:138
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 setSampleRate(int sample_rate) override
Sets the sample rate for all Processors in this router.
Definition processor_router.cpp:90
virtual void addIdleProcessor(Processor *processor)
Adds a Processor that should remain idle (not processed) in the router.
Definition processor_router.cpp:146
virtual void process(int num_samples) override
Processes audio through all Processors managed by this router.
Definition processor_router.cpp:57
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
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
virtual void correctToTime(double seconds)
Allows correction of module state to a given time (if needed).
Definition synth_module.h:252
virtual void enable(bool enable) override
Enables or disables this SynthModule and its owned processors.
Definition synth_module.cpp:516
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
Contains classes and functions used within the Vital synthesizer framework.
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