|
FastLED 3.9.15
|
Interface class for synth oscillator.
This interface provides a clean API for waveform synthesis. Use the static create() factory function to obtain an instance.
#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 ¶ms)=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 ¶ms) |
| 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. | |