FastLED 3.9.15
Loading...
Searching...
No Matches
fl::audio::ISynthOscillator Class Referenceabstract

Detailed Description

Interface class for synth oscillator.

This interface provides a clean API for waveform synthesis. Use the static create() factory function to obtain an instance.

Note
Future versions will expand this interface with envelope generators, filters, and modulation sources as the synthesizer grows.

Definition at line 117 of file synth.h.

#include <synth.h>

+ Inheritance diagram for fl::audio::ISynthOscillator:

Public Member Functions

virtual ~ISynthOscillator () FL_NOEXCEPT=default
 
virtual void generateSamples (fl::span< float > output, float freq)=0
 Generate audio samples (span version)
 
virtual void generateSamples (float *output, i32 numSamples, float freq)=0
 Generate audio samples.
 
virtual ISynthEnginePtr getEngine () const =0
 Get the engine this oscillator uses.
 
virtual SynthParams getParams () const =0
 Get current waveform parameters.
 
virtual void reset ()=0
 Reset oscillator to beginning of cycle.
 
virtual void setParams (const SynthParams &params)=0
 Change waveform parameters (takes effect at next cycle boundary)
 
virtual void setShape (SynthShape shape)=0
 Change waveform shape (takes effect at next cycle boundary)
 

Static Public Member Functions

static ISynthOscillatorPtr create (ISynthEnginePtr engine, const SynthParams &params)
 Factory function to create an oscillator with specified engine and parameters.
 
static ISynthOscillatorPtr create (ISynthEnginePtr engine, SynthShape shape=SynthShape::Sawtooth)
 Factory function to create an oscillator with specified engine and shape.
 

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