11 loop_frame_ = std::make_unique<WaveSourceKeyframe>();
virtual WavetableComponentFactory::ComponentType getType() override
Returns the component type associated with this source.
Definition shepard_tone_source.cpp:41
ShepardToneSource()
Constructs a ShepardToneSource with a loop frame for seamless frequency content.
Definition shepard_tone_source.cpp:9
virtual ~ShepardToneSource()
Definition shepard_tone_source.cpp:14
std::unique_ptr< WaveSourceKeyframe > loop_frame_
A loop frame used to create the repetitive Shepard effect.
Definition shepard_tone_source.h:54
virtual void render(vital::WaveFrame *wave_frame, float position) override
Renders a frame of the Shepard tone wavetable at a given position.
Definition shepard_tone_source.cpp:16
std::unique_ptr< WaveSourceKeyframe > compute_frame_
A keyframe for intermediate interpolation computations.
Definition wave_source.h:79
InterpolationMode interpolation_mode_
The mode of interpolation.
Definition wave_source.h:80
WaveSourceKeyframe * getKeyframe(int index)
Retrieves a WaveSourceKeyframe by index.
Definition wave_source.cpp:51
A keyframe that holds a single WaveFrame and supports various interpolation methods.
Definition wave_source.h:92
vital::WaveFrame * wave_frame()
Provides direct access to the stored WaveFrame.
Definition wave_source.h:107
ComponentType
Enumerates all known WavetableComponents, including sources and modifiers.
Definition wavetable_component_factory.h:28
@ kShepardToneSource
Definition wavetable_component_factory.h:33
int numFrames() const
Gets the number of keyframes.
Definition wavetable_component.h:155
Represents a single frame of a wavetable, containing both time-domain and frequency-domain data.
Definition wave_frame.h:16
void copy(const WaveFrame *other)
Copies another WaveFrame's time and frequency domain data into this one.
Definition wave_frame.cpp:57
std::complex< float > frequency_domain[kWaveformSize]
The frequency-domain representation (complex spectrum).
Definition wave_frame.h:125
static constexpr int kWaveformSize
The size of the waveform (number of samples per frame).
Definition wave_frame.h:21
void toTimeDomain()
Converts the currently loaded frequency-domain data into time-domain representation.
Definition wave_frame.cpp:77
constexpr int kNumOscillatorWaveFrames
Number of wave frames in each oscillator’s wavetable.
Definition synth_constants.h:19