19namespace hw = third_party::hexwave;
120 hw::hexwave_engine_destroy(
mEngine);
138 if (!engine || !engine->isValid()) {
159 engine->getEngineInternal(),
175 if (
mHexWave && output && numSamples > 0) {
176 hw::hexwave_generate_samples(output, numSamples,
mHexWave, freq);
static ISynthEnginePtr create(i32 width=32, i32 oversample=16) FL_NO_EXCEPT
Factory function to create an engine with the specified quality settings.
Interface for synth engine that holds BLEP/BLAMP tables.
static ISynthOscillatorPtr create(ISynthEnginePtr engine, const SynthParams ¶ms) FL_NO_EXCEPT
Factory function to create an oscillator with specified engine and parameters.
Interface class for synth oscillator.
SynthEngineImpl(const SynthEngineImpl &) FL_NO_EXCEPT=delete
~SynthEngineImpl() FL_NO_EXCEPT override
hw::HexWaveEngine * mEngine
i32 getOversample() const FL_NO_EXCEPT override
Get the oversample setting.
bool isValid() const FL_NO_EXCEPT override
Check if engine was initialized successfully.
hw::HexWaveEngine * getEngineInternal() const FL_NO_EXCEPT
SynthEngineImpl & operator=(const SynthEngineImpl &) FL_NO_EXCEPT=delete
SynthEngineImpl(i32 width, i32 oversample) FL_NO_EXCEPT
i32 getWidth() const FL_NO_EXCEPT override
Get the width setting.
SynthParams mCurrentParams
SynthParams getParams() const FL_NO_EXCEPT override
Get current waveform parameters.
ISynthEnginePtr getEngine() const FL_NO_EXCEPT override
Get the engine this oscillator uses.
SynthOscillatorImpl(const SynthOscillatorImpl &) FL_NO_EXCEPT=delete
void setParams(const SynthParams ¶ms) FL_NO_EXCEPT override
Change waveform parameters (takes effect at next cycle boundary)
void generateSamples(float *output, i32 numSamples, float freq) FL_NO_EXCEPT override
Generate audio samples.
void setShape(SynthShape shape) FL_NO_EXCEPT override
Change waveform shape (takes effect at next cycle boundary)
~SynthOscillatorImpl() FL_NO_EXCEPT override
SynthOscillatorImpl & operator=(const SynthOscillatorImpl &) FL_NO_EXCEPT=delete
SynthOscillatorImpl(fl::shared_ptr< SynthEngineImpl > engine, const SynthParams ¶ms) FL_NO_EXCEPT
fl::shared_ptr< SynthEngineImpl > mEngine
void reset() FL_NO_EXCEPT override
Reset oscillator to beginning of cycle.
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
SynthShape
Predefined waveform shapes for synth oscillator.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
FASTLED_FORCE_INLINE void free(void *ptr) FL_NO_EXCEPT
FASTLED_FORCE_INLINE void * malloc(size_t size) FL_NO_EXCEPT
FASTLED_FORCE_INLINE void * memset(void *s, int c, size_t n) FL_NO_EXCEPT
shared_ptr< T > static_pointer_cast(const shared_ptr< Y > &other) FL_NO_EXCEPT
Base definition for an LED controller.
#define FL_STB_HEXWAVE_MAX_BLEP_LENGTH
static SynthParams fromShape(SynthShape shape) FL_NO_EXCEPT
Create parameters for a predefined shape.
SynthParams() FL_NO_EXCEPT=default
Default constructor - sawtooth wave.
Waveform parameters for custom waveforms.
Bandlimited audio synthesizer - waveform oscillator module.