FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fromShape()

SynthParams fl::audio::SynthParams::fromShape ( SynthShape shape)
static

Create parameters for a predefined shape.

Definition at line 78 of file synth.cpp.hpp.

78 {
79 switch (shape) {
81 return SynthParams(1, 0.0f, 0.0f, 0.0f);
83 return SynthParams(1, 0.0f, 1.0f, 0.0f);
85 return SynthParams(1, 0.5f, 0.0f, 0.0f);
87 return SynthParams(0, 0.0f, 0.0f, 0.0f);
89 default:
90 return SynthParams(); // Default to sawtooth
91 }
92}
SynthParams() FL_NOEXCEPT=default
Default constructor - sawtooth wave.

References SynthParams(), fl::audio::AlternatingSaw, fl::audio::Custom, fl::audio::Sawtooth, fl::audio::Square, and fl::audio::Triangle.

Referenced by fl::audio::ISynthOscillator::create(), and fl::audio::SynthOscillatorImpl::setShape().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: