|
Vital
|
A keyframe class that stores the fold boost parameter for wave-folding at a given position. More...
#include <wave_fold_modifier.h>
Public Member Functions | |
| WaveFoldModifierKeyframe () | |
| Constructs a keyframe with a default wave fold boost value of 1.0. | |
| virtual | ~WaveFoldModifierKeyframe () |
| void | copy (const WavetableKeyframe *keyframe) override |
| Copies the state from another keyframe of the same type. | |
| void | interpolate (const WavetableKeyframe *from_keyframe, const WavetableKeyframe *to_keyframe, float t) override |
| Linearly interpolates between two keyframes. | |
| void | render (vital::WaveFrame *wave_frame) override |
| Renders the waveform of this keyframe into a WaveFrame. | |
| json | stateToJson () override |
| Serializes the state of this keyframe to a JSON object. | |
| void | jsonToState (json data) override |
| Restores the keyframe's state from a JSON object. | |
| float | getWaveFoldBoost () |
| Gets the current wave fold boost factor. | |
| void | setWaveFoldBoost (float boost) |
| Sets a new wave fold boost factor. | |
Public Member Functions inherited from WavetableKeyframe | |
| WavetableKeyframe () | |
| Constructs a WavetableKeyframe with a default position of 0 and no owner. | |
| virtual | ~WavetableKeyframe () |
| int | index () |
| Gets the index of this keyframe within its owner component. | |
| int | position () const |
| Gets the wavetable frame position of this keyframe. | |
| void | setPosition (int position) |
| Sets the frame position of this keyframe. | |
| virtual void | smoothInterpolate (const WavetableKeyframe *prev_keyframe, const WavetableKeyframe *from_keyframe, const WavetableKeyframe *to_keyframe, const WavetableKeyframe *next_keyframe, float t) |
| Performs a smooth (cubic) interpolation using four keyframes for even smoother transitions. | |
| WavetableComponent * | owner () |
| Gets the WavetableComponent that owns this keyframe. | |
| void | setOwner (WavetableComponent *owner) |
| Sets the owner of this keyframe. | |
Protected Attributes | |
| float | wave_fold_boost_ |
| The factor by which the wave is folded. | |
Protected Attributes inherited from WavetableKeyframe | |
| int | position_ |
| The position of this keyframe along the wavetable dimension. | |
| WavetableComponent * | owner_ |
| The component that owns this keyframe. | |
Additional Inherited Members | |
Static Public Member Functions inherited from WavetableKeyframe | |
| static float | linearTween (float point_from, float point_to, float t) |
| Performs linear interpolation between two points. | |
| static float | cubicTween (float point_prev, float point_from, float point_to, float point_next, float range_prev, float range, float range_next, float t) |
| Performs cubic interpolation taking into account a previous and next point for smoother curves. | |
A keyframe class that stores the fold boost parameter for wave-folding at a given position.
The WaveFoldModifierKeyframe contains a single parameter, wave_fold_boost_, which determines how aggressively the wave is folded. Interpolating between keyframes allows for dynamic changes in folding amount across the wavetable.
| WaveFoldModifier::WaveFoldModifierKeyframe::WaveFoldModifierKeyframe | ( | ) |
Constructs a keyframe with a default wave fold boost value of 1.0.
|
inlinevirtual |
|
overridevirtual |
Copies the state from another keyframe of the same type.
| keyframe | The source keyframe to copy from. |
Implements WavetableKeyframe.
|
inline |
Gets the current wave fold boost factor.
|
overridevirtual |
Linearly interpolates between two keyframes.
| from_keyframe | The starting keyframe. |
| to_keyframe | The ending keyframe. |
| t | The interpolation factor [0,1]. |
Implements WavetableKeyframe.
|
overridevirtual |
Restores the keyframe's state from a JSON object.
| data | The JSON object containing the keyframe's state. |
Reimplemented from WavetableKeyframe.
|
overridevirtual |
Renders the waveform of this keyframe into a WaveFrame.
| wave_frame | The WaveFrame to fill with this keyframe's waveform data. |
Implements WavetableKeyframe.
|
inline |
Sets a new wave fold boost factor.
Higher values mean more intense wave folding.
| boost | The new fold boost factor. |
|
overridevirtual |
Serializes the state of this keyframe to a JSON object.
Reimplemented from WavetableKeyframe.
|
protected |
The factor by which the wave is folded.