Vital
Loading...
Searching...
No Matches
equalizer_section.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "JuceHeader.h"
8#include "synth_section.h"
9
10class SynthSlider;
11class Spectrogram;
12class TabSelector;
13
21public:
25 EqualizerSection(String name, const vital::output_map& mono_modulations);
27 virtual ~EqualizerSection();
28
31 void paintBackground(Graphics& g) override;
32
35 void paintBackgroundShadow(Graphics& g) override { if (isActive()) paintTabShadow(g); }
36
38 void resized() override;
39
42 void setActive(bool active) override;
43
45 void lowBandSelected() override;
46
48 void midBandSelected() override;
49
51 void highBandSelected() override;
52
55 void sliderValueChanged(Slider* slider) override;
56
59 void buttonClicked(Button* button) override;
60
63 void setScrollWheelEnabled(bool enabled) override;
64
66 void setGainActive();
67
69 void parentHierarchyChanged() override;
70
74 void renderOpenGlComponents(OpenGlWrapper& open_gl, bool animate) override;
75
76private:
77 SynthGuiInterface* parent_;
78
79 std::unique_ptr<SynthButton> on_;
80
81 std::unique_ptr<OpenGlShapeButton> low_mode_;
82 std::unique_ptr<OpenGlShapeButton> band_mode_;
83 std::unique_ptr<OpenGlShapeButton> high_mode_;
84
85 std::unique_ptr<EqualizerResponse> eq_response_;
86 std::unique_ptr<Spectrogram> spectrogram_;
87
88 std::unique_ptr<SynthSlider> low_cutoff_;
89 std::unique_ptr<SynthSlider> low_resonance_;
90 std::unique_ptr<SynthSlider> low_gain_;
91
92 std::unique_ptr<SynthSlider> band_cutoff_;
93 std::unique_ptr<SynthSlider> band_resonance_;
94 std::unique_ptr<SynthSlider> band_gain_;
95
96 std::unique_ptr<SynthSlider> high_cutoff_;
97 std::unique_ptr<SynthSlider> high_resonance_;
98 std::unique_ptr<SynthSlider> high_gain_;
99
100 std::unique_ptr<TabSelector> selected_band_;
101
102 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(EqualizerSection)
103};
Interface for objects that want to be notified when a band is selected.
Definition equalizer_response.h:36
A UI section for configuring a 3-band equalizer with selectable modes (Low, Band, High).
Definition equalizer_section.h:20
void midBandSelected() override
Called when the mid band is selected in the EQ response.
Definition equalizer_section.cpp:218
EqualizerSection(String name, const vital::output_map &mono_modulations)
Definition equalizer_section.cpp:29
void parentHierarchyChanged() override
Called when the parent hierarchy changes, used to set up spectrogram memory.
Definition equalizer_section.cpp:293
void renderOpenGlComponents(OpenGlWrapper &open_gl, bool animate) override
Definition equalizer_section.cpp:303
void resized() override
Resizes and lays out child components (filter sliders, spectrogram, etc.).
Definition equalizer_section.cpp:157
void sliderValueChanged(Slider *slider) override
Definition equalizer_section.cpp:250
void paintBackground(Graphics &g) override
Definition equalizer_section.cpp:132
void setGainActive()
Sets the gain sliders active or inactive based on the current mode and active state.
Definition equalizer_section.cpp:287
void setActive(bool active) override
Definition equalizer_section.cpp:195
virtual ~EqualizerSection()
Destructor.
Definition equalizer_section.cpp:130
void paintBackgroundShadow(Graphics &g) override
Definition equalizer_section.h:35
void highBandSelected() override
Called when the high band is selected in the EQ response.
Definition equalizer_section.cpp:234
void buttonClicked(Button *button) override
Definition equalizer_section.cpp:265
void lowBandSelected() override
Called when the low band is selected in the EQ response.
Definition equalizer_section.cpp:202
void setScrollWheelEnabled(bool enabled) override
Definition equalizer_section.cpp:282
Renders a frequency-domain representation (spectrogram) using OpenGL.
Definition oscilloscope.h:64
An interface class linking the Vital synthesizer backend (SynthBase) with a GUI.
Definition synth_gui_interface.h:56
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
virtual void animate(bool animate)
Triggers animation state change in sub-sections if needed.
Definition synth_section.cpp:822
bool isActive() const
Checks if the section is currently active.
Definition synth_section.h:683
virtual void paintTabShadow(Graphics &g)
Paints a tab-like shadow effect around the component.
Definition synth_section.cpp:188
A specialized slider with extended functionality for modulation, parameter control,...
Definition synth_slider.h:314
A slider-based UI component that displays selectable tabs.
Definition tab_selector.h:16
std::map< std::string, Output * > output_map
Maps parameter names to Output pointers, representing output signals from various modules.
Definition synth_types.h:229
A helper struct containing references to OpenGL context, shaders, and display scale.
Definition shaders.h:174