45 components_.push_back(std::unique_ptr<WavetableComponent>(component));
A base class representing a component in a wavetable synthesis chain.
Definition wavetable_component.h:32
A class representing a group of WavetableComponents combined to form part of a wavetable.
Definition wavetable_group.h:24
void reset()
Clears all components and loads a default group configuration.
Definition wavetable_group.cpp:44
void jsonToState(json data)
Restores this group's state from a JSON object.
Definition wavetable_group.cpp:121
void addComponent(WavetableComponent *component)
Adds a new WavetableComponent to this group.
Definition wavetable_group.h:44
WavetableComponent * getComponent(int index) const
Retrieves a component by index.
Definition wavetable_group.h:92
void moveUp(int index)
Moves a component one position up in the ordering.
Definition wavetable_group.cpp:20
void renderTo(vital::Wavetable *wavetable)
Renders the entire group directly into a Wavetable object.
Definition wavetable_group.cpp:74
int getComponentIndex(WavetableComponent *component)
Gets the index of a particular WavetableComponent within this group.
Definition wavetable_group.cpp:12
json stateToJson()
Serializes this group's state, including all its components, to JSON.
Definition wavetable_group.cpp:110
void prerender()
Allows components to precompute any necessary data before rendering.
Definition wavetable_group.cpp:50
WavetableGroup()
Constructs an empty WavetableGroup.
Definition wavetable_group.h:29
int getLastKeyframePosition()
Gets the largest keyframe position among all components in the group.
Definition wavetable_group.cpp:101
void render(vital::WaveFrame *wave_frame, float position) const
Renders the combined waveform for a given position from all components.
Definition wavetable_group.cpp:66
void removeComponent(int index)
Removes a component at a given index.
Definition wavetable_group.cpp:36
bool isShepardTone()
Determines if all components in this group produce a Shepard tone.
Definition wavetable_group.cpp:56
vital::WaveFrame compute_frame_
Temporary WaveFrame for combining component outputs.
Definition wavetable_group.h:151
int numComponents() const
Gets the number of WavetableComponents in this group.
Definition wavetable_group.h:84
void loadDefaultGroup()
Loads a default group configuration (e.g., a basic wave source).
Definition wavetable_group.cpp:86
std::vector< std::unique_ptr< WavetableComponent > > components_
The list of components in this group.
Definition wavetable_group.h:152
void moveDown(int index)
Moves a component one position down in the ordering.
Definition wavetable_group.cpp:28
Represents a single frame of a wavetable, containing both time-domain and frequency-domain data.
Definition wave_frame.h:16
A class representing a wavetable, holding multiple frames of waveforms and their frequency-domain rep...
Definition wavetable.h:20
nlohmann::json json
Definition line_generator.h:7
Contains classes and functions used within the Vital synthesizer framework.