96 static ISynthEnginePtr
create(i32
width = 32, i32 oversample = 16);
123 static ISynthOscillatorPtr
create(ISynthEnginePtr engine,
const SynthParams& params);
virtual ~ISynthEngine() FL_NOEXCEPT=default
static ISynthEnginePtr create(i32 width=32, i32 oversample=16)
Factory function to create an engine with the specified quality settings.
virtual i32 getOversample() const =0
Get the oversample setting.
virtual bool isValid() const =0
Check if engine was initialized successfully.
virtual i32 getWidth() const =0
Get the width setting.
Interface for synth engine that holds BLEP/BLAMP tables.
virtual void reset()=0
Reset oscillator to beginning of cycle.
virtual ISynthEnginePtr getEngine() const =0
Get the engine this oscillator uses.
virtual void setParams(const SynthParams ¶ms)=0
Change waveform parameters (takes effect at next cycle boundary)
virtual SynthParams getParams() const =0
Get current waveform parameters.
virtual void setShape(SynthShape shape)=0
Change waveform shape (takes effect at next cycle boundary)
virtual void generateSamples(float *output, i32 numSamples, float freq)=0
Generate audio samples.
virtual ~ISynthOscillator() FL_NOEXCEPT=default
Interface class for synth oscillator.
SynthShape
Predefined waveform shapes for synth oscillator.
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
float peakTime
Position of peak in cycle [0..1].
SynthParams() FL_NOEXCEPT=default
Default constructor - sawtooth wave.
float halfHeight
Height at half-cycle point.
static SynthParams fromShape(SynthShape shape)
Create parameters for a predefined shape.
float zeroWait
Wait time at zero [0..1].
i32 reflect
Mirror second half of waveform (0 or 1)
Waveform parameters for custom waveforms.