22 vertical_warp_ = std::make_unique<SynthSlider>(
"wave_warp_vertical");
30 vertical_warp_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
61 if (keyframe ==
nullptr) {
80 static constexpr float kSymmetryWidthHeightRatio = 3.5f;
81 static constexpr float kWarpWidthHeightRatio = 5.0f;
82 static constexpr float kWarpPaddingRatio = 0.5f;
85 int symmetry_width = bounds.getHeight() * kSymmetryWidthHeightRatio;
86 int warp_width = bounds.getHeight() * kWarpWidthHeightRatio;
87 int warp_padding = bounds.getHeight() * kWarpPaddingRatio;
88 int total_width = 2 * symmetry_width + 2 * warp_width + 3 * padding;
92 int x = bounds.getX() + (bounds.getWidth() - total_width) / 2;
94 int y = bounds.getY();
95 int y_title = y + title_height;
96 int height = bounds.getHeight();
97 int height_title = height - title_height;
98 int symmetry_padding = height / 6.0f;
101 horizontal_asymmetric_->setBounds(x, y + symmetry_padding, symmetry_width, height - 2 * symmetry_padding);
103 warp_width - 2 * warp_padding, height_title);
105 symmetry_width, height - 2 * symmetry_padding);
107 warp_width - 2 * warp_padding, height_title);
void addSlider(SynthSlider *slider, bool show=true, bool listen=true)
Definition synth_section.cpp:445
void addOpenGlComponent(OpenGlComponent *open_gl_component, bool to_beginning=false)
Definition synth_section.cpp:489
static TextLookAndFeel * instance()
Singleton instance access.
Definition text_look_and_feel.h:106
float getVerticalPower()
Gets the vertical warp power.
Definition wave_warp_modifier.h:62
void setHorizontalPower(float horizontal_power)
Sets the horizontal warp power.
Definition wave_warp_modifier.h:69
void setVerticalPower(float vertical_power)
Sets the vertical warp power.
Definition wave_warp_modifier.h:76
float getHorizontalPower()
Gets the horizontal warp power.
Definition wave_warp_modifier.h:55
void setVerticalAsymmetric(bool vertical_asymmetric)
Sets whether vertical warping is asymmetric.
Definition wave_warp_modifier.h:128
bool getHorizontalAsymmetric() const
Checks if horizontal warping is asymmetric.
Definition wave_warp_modifier.h:135
bool getVerticalAsymmetric() const
Checks if vertical warping is asymmetric.
Definition wave_warp_modifier.h:142
void setHorizontalAsymmetric(bool horizontal_asymmetric)
Sets whether horizontal warping is asymmetric.
Definition wave_warp_modifier.h:121
WaveWarpModifierKeyframe * getKeyframe(int index)
Retrieves a WaveWarpModifierKeyframe by index.
Definition wave_warp_modifier.cpp:139
std::unique_ptr< SynthSlider > horizontal_warp_
Slider controlling horizontal warp amount.
Definition wave_warp_overlay.h:94
WaveWarpModifier::WaveWarpModifierKeyframe * current_frame_
Currently selected keyframe's data.
Definition wave_warp_overlay.h:92
std::unique_ptr< OpenGlToggleButton > horizontal_asymmetric_
Toggle for horizontal asymmetry.
Definition wave_warp_overlay.h:96
virtual void setEditBounds(Rectangle< int > bounds) override
Sets the bounds for the overlay's editable UI area.
Definition wave_warp_overlay.cpp:78
virtual void frameSelected(WavetableKeyframe *keyframe) override
Called when a new keyframe is selected.
Definition wave_warp_overlay.cpp:60
void sliderDragEnded(Slider *moved_slider) override
Called when a slider drag ends.
Definition wave_warp_overlay.cpp:137
void buttonClicked(Button *clicked_Button) override
Called when a button (toggle) state changes.
Definition wave_warp_overlay.cpp:141
WaveWarpOverlay()
Constructs a WaveWarpOverlay with default parameters and UI elements.
Definition wave_warp_overlay.cpp:7
WaveWarpModifier * warp_modifier_
The WaveWarpModifier being controlled by this overlay.
Definition wave_warp_overlay.h:91
std::unique_ptr< SynthSlider > vertical_warp_
Slider controlling vertical warp amount.
Definition wave_warp_overlay.h:95
void sliderValueChanged(Slider *moved_slider) override
Called when a slider value changes.
Definition wave_warp_overlay.cpp:120
std::unique_ptr< OpenGlToggleButton > vertical_asymmetric_
Toggle for vertical asymmetry.
Definition wave_warp_overlay.h:97
void addTitle(const std::string &title)
Adds a title string for the next control section.
Definition wavetable_component_overlay.h:94
void addLine(int position)
Adds a vertical line divider at the given position.
Definition wavetable_component_overlay.h:88
void clearTitles()
Clears all control section titles.
Definition wavetable_component_overlay.h:82
void clearLines()
Clears all line divider positions.
Definition wavetable_component_overlay.h:77
A base overlay component for editing and interacting with a wavetable component's parameters.
Definition wavetable_component_overlay.h:22
void setControlsWidth(int width)
Sets the total width for controls in the overlay.
Definition wavetable_component_overlay.h:267
ControlsBackground controls_background_
Definition wavetable_component_overlay.h:300
virtual void setEditBounds(Rectangle< int > bounds)
Sets the editing bounds within which controls and titles are placed.
Definition wavetable_component_overlay.cpp:67
static constexpr float kTitleHeightRatio
Definition wavetable_component_overlay.h:32
int getPadding()
Gets the current padding value.
Definition wavetable_component_overlay.h:248
void notifyChanged(bool mouse_up)
Notifies listeners that a change has occurred to the frame.
Definition wavetable_component_overlay.cpp:86
Represents a single state of a waveform at a specific position in a wavetable.
Definition wavetable_keyframe.h:35
int index()
Gets the index of this keyframe within its owner component.
Definition wavetable_keyframe.cpp:32
WavetableComponent * owner()
Gets the WavetableComponent that owns this keyframe.
Definition wavetable_keyframe.h:152