9class RetriggerSelector;
97 LfoSection(String name, std::string value_prepend,
126 void reset()
override;
154 void setPhase(
float phase)
override { phase_->setValue(phase); }
162 void lineEditorScrolled(
const MouseEvent& e,
const MouseWheelDetails& wheel)
override;
192 void loadFile(
const File& file)
override;
234 std::unique_ptr<LfoEditor> editor_;
239 std::unique_ptr<PresetSelector> preset_selector_;
244 std::unique_ptr<SynthSlider> phase_;
249 std::unique_ptr<SynthSlider> frequency_;
254 std::unique_ptr<SynthSlider> tempo_;
259 std::unique_ptr<SynthSlider> keytrack_transpose_;
264 std::unique_ptr<SynthSlider> keytrack_tune_;
269 std::unique_ptr<SynthSlider> fade_;
274 std::unique_ptr<SynthSlider> smooth_;
279 std::string smooth_mode_control_name_;
284 std::unique_ptr<PlainTextComponent> smooth_mode_text_;
289 std::unique_ptr<ShapeButton> smooth_mode_type_selector_;
294 std::unique_ptr<SynthSlider> delay_;
299 std::unique_ptr<SynthSlider> stereo_;
304 std::unique_ptr<TempoSelector> sync_;
309 std::unique_ptr<TextSelector> sync_type_;
314 std::unique_ptr<PaintPatternSelector> paint_pattern_;
319 std::unique_ptr<OpenGlQuad> transpose_tune_divider_;
324 std::unique_ptr<SynthSlider> grid_size_x_;
329 std::unique_ptr<SynthSlider> grid_size_y_;
334 std::unique_ptr<OpenGlShapeButton> paint_;
339 std::unique_ptr<OpenGlShapeButton> lfo_smooth_;
346 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
LfoSection)
A user interface section that displays and controls an LFO (Low Frequency Oscillator) in the synthesi...
Definition lfo_section.h:33
static std::vector< std::pair< float, float > > getPaintPattern(int pattern)
Retrieves a paint pattern as a vector of (x, y) pairs.
Definition lfo_section.h:54
void textMouseDown(const MouseEvent &e) override
Handles mouse-down events on the text component, usually to open a file browser.
Definition lfo_section.cpp:479
void prevClicked() override
Loads the previous LFO preset.
Definition lfo_section.cpp:451
void nextClicked() override
Loads the next LFO preset.
Definition lfo_section.cpp:463
void loadFile(const File &file) override
Loads the LFO configuration from the specified file.
Definition lfo_section.cpp:516
File getCurrentFile() override
Retrieves the current LFO file.
Definition lfo_section.h:199
void lineEditorScrolled(const MouseEvent &e, const MouseWheelDetails &wheel) override
Responds to scrolling events in the line editor component.
Definition lfo_section.cpp:390
void reset() override
Resets all LFO settings to their default states.
Definition lfo_section.cpp:311
void importLfo() override
Imports an LFO from a user-selected file.
Definition lfo_section.cpp:411
void resized() override
Called when the component is resized.
Definition lfo_section.cpp:245
void setAllValues(vital::control_map &controls) override
Updates all control values in this section from the given map of controls.
Definition lfo_section.cpp:322
void exportLfo() override
Exports the current LFO configuration to a user-selected file.
Definition lfo_section.cpp:423
LfoSection(String name, std::string value_prepend, LineGenerator *lfo_source, const vital::output_map &mono_modulations, const vital::output_map &poly_modulations)
Constructs a new LfoSection.
Definition lfo_section.cpp:21
PaintPattern
Enumerates the paint patterns used for LFO shape painting.
Definition lfo_section.h:39
@ kDown
A downward linear ramp.
Definition lfo_section.h:42
@ kUp
An upward linear ramp.
Definition lfo_section.h:43
@ kTri
A triangular shape.
Definition lfo_section.h:44
@ kStep
A step pattern (horizontal line at the top).
Definition lfo_section.h:40
@ kNumPaintPatterns
The number of available paint patterns.
Definition lfo_section.h:45
@ kHalf
A pattern rising half-way and then dropping to zero.
Definition lfo_section.h:41
void setPhase(float phase) override
Sets the LFO phase.
Definition lfo_section.h:154
void buttonClicked(Button *clicked_button) override
Responds to a button click event.
Definition lfo_section.cpp:362
void setSmoothModeSelected(int result)
Sets the selected smooth mode.
Definition lfo_section.cpp:499
void fileLoaded() override
Called when an LFO file has been successfully loaded.
Definition lfo_section.cpp:444
void togglePaintMode(bool enabled, bool temporary_switch) override
Toggles paint mode for the LFO editor.
Definition lfo_section.cpp:403
void sliderValueChanged(Slider *changed_slider) override
Responds to a slider value change event.
Definition lfo_section.cpp:341
void paintBackground(Graphics &g) override
Paints the background of the LFO section.
Definition lfo_section.cpp:199
Interface for classes that want to receive notifications about line editor changes.
Definition line_editor.h:86
A class for generating and storing a line shape, defined by a series of points and associated powers.
Definition line_generator.h:20
A specialized TextSelector that draws a visual pattern instead of text.
Definition text_selector.h:47
Interface for objects that want to be notified of PresetSelector events.
Definition preset_selector.h:24
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
A specialized slider with extended functionality for modulation, parameter control,...
Definition synth_slider.h:314
A slider component that allows selection between different tempo modes (seconds, tempo,...
Definition tempo_selector.h:14
A specialized SynthSlider that displays a popup menu of text options.
Definition text_selector.h:14
std::map< std::string, Output * > output_map
Maps parameter names to Output pointers, representing output signals from various modules.
Definition synth_types.h:229
std::map< std::string, Value * > control_map
Maps parameter names to Value pointers representing synth control parameters.
Definition synth_types.h:214
Declares the PresetSelector class which provides a UI component for selecting presets.