14 SynthModule(kNumInputs, kNumOutputs), prefix_(std::move(prefix)), on_(nullptr), distortion_type_(nullptr) {
18 was_on_ = std::make_shared<bool>(
true);
SynthOscillator * oscillator_
Definition oscillator_module.h:105
OscillatorModule(std::string prefix="")
Constructs an OscillatorModule with an optional prefix for parameter naming.
Definition oscillator_module.cpp:13
std::shared_ptr< Wavetable > wavetable_
Definition oscillator_module.h:101
std::shared_ptr< bool > was_on_
Definition oscillator_module.h:102
Value * distortion_type_
Definition oscillator_module.h:106
@ kLevelled
Definition oscillator_module.h:36
@ kRaw
Definition oscillator_module.h:35
void process(int num_samples) override
Processes the oscillator for a given number of samples.
Definition oscillator_module.cpp:116
std::string prefix_
Definition oscillator_module.h:100
void init() override
Initializes the module and sets up the internal SynthOscillator with appropriate parameters.
Definition oscillator_module.cpp:26
Value * on_
Definition oscillator_module.h:104
@ kMidi
Definition oscillator_module.h:25
@ kActiveVoices
Definition oscillator_module.h:26
@ kReset
Definition oscillator_module.h:23
@ kRetrigger
Definition oscillator_module.h:24
void useOutput(Output *output)
Uses an existing Output object as this Processor's first output.
Definition processor.cpp:138
force_inline Input * input(unsigned int index=0) const
Retrieves the Input pointer at a given index.
Definition processor.h:587
void useInput(Input *input)
Uses an existing Input object as this Processor's first input.
Definition processor.cpp:126
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 init()
Called after constructor, used for any additional initialization. Subclasses can override....
Definition processor.h:258
virtual void reset(poly_mask reset_mask)
Called to reset the Processor's per-voice state (e.g., on note-on).
Definition processor.h:267
virtual void addProcessor(Processor *processor)
Adds a Processor to be managed by this router.
Definition processor_router.cpp:121
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
Output * createPolyModControl(std::string name, bool audio_rate=false, bool smooth_value=false, Output *internal_modulation=nullptr, Input *reset=nullptr)
Creates a polyphonic mod control, including applying parameter scaling.
Definition synth_module.cpp:173
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
A core oscillator processor that generates audio by reading wavetable data with various effects.
Definition synth_oscillator.h:74
@ kMidiTrack
MIDI tracking toggle.
Definition synth_oscillator.h:83
@ kPhase
Phase offset.
Definition synth_oscillator.h:92
@ kDistortionAmount
Distortion amount.
Definition synth_oscillator.h:107
@ kRandomPhase
Random phase amount.
Definition synth_oscillator.h:94
@ kStereoSpread
Stereo spread amount.
Definition synth_oscillator.h:96
@ kReset
Manual reset (phase reset)
Definition synth_oscillator.h:109
@ kMidiNote
MIDI note (for pitch)
Definition synth_oscillator.h:82
@ kBlend
Blend between center voice and detuned voices.
Definition synth_oscillator.h:95
@ kSpectralMorphType
Spectral morph type.
Definition synth_oscillator.h:103
@ kDistortionPhase
Phase distortion offset.
Definition synth_oscillator.h:93
@ kTune
Fine tune.
Definition synth_oscillator.h:87
@ kUnisonVoices
Number of unison voices.
Definition synth_oscillator.h:90
@ kDetuneRange
Detune range.
Definition synth_oscillator.h:99
@ kRetrigger
Retrigger mask.
Definition synth_oscillator.h:110
@ kUnisonDistortionSpread
Unison distortion spread.
Definition synth_oscillator.h:101
@ kSpectralUnison
Toggle for spectral unison.
Definition synth_oscillator.h:105
@ kPan
Stereo panning.
Definition synth_oscillator.h:89
@ kTranspose
Transpose amount.
Definition synth_oscillator.h:85
@ kSmoothlyInterpolate
Not used directly in this file, but part of the Vital architecture.
Definition synth_oscillator.h:84
@ kDistortionType
Distortion type.
Definition synth_oscillator.h:106
@ kUnisonDetune
Unison detune amount.
Definition synth_oscillator.h:91
@ kSpectralMorphAmount
Spectral morph amount.
Definition synth_oscillator.h:104
@ kDetunePower
Detune power exponent.
Definition synth_oscillator.h:98
@ kAmplitude
Output amplitude.
Definition synth_oscillator.h:88
@ kUnisonSpectralMorphSpread
Unison spectral morph spread.
Definition synth_oscillator.h:102
@ kUnisonFrameSpread
Unison wavetable frame spread.
Definition synth_oscillator.h:100
@ kStackStyle
Unison stack style.
Definition synth_oscillator.h:97
@ kWaveFrame
Waveform frame selection.
Definition synth_oscillator.h:81
@ kActiveVoices
Active voice mask.
Definition synth_oscillator.h:108
@ kTransposeQuantize
Transpose quantize setting.
Definition synth_oscillator.h:86
@ kLevelled
Output after amplitude leveling/panning.
Definition synth_oscillator.h:119
@ kRaw
Unleveled or "raw" output.
Definition synth_oscillator.h:118
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
force_inline mono_float value() const
Returns the current mono_float value of the first lane.
Definition value.h:60
Contains classes and functions used within the Vital synthesizer framework.
constexpr int kNumOscillatorWaveFrames
Number of wave frames in each oscillator’s wavetable.
Definition synth_constants.h:19
Holds and manages a buffer of samples (poly_float) for a Processor's output.
Definition processor.h:35
void clearBuffer()
Zeros out the entire output buffer.
Definition processor.h:81