Vital
Loading...
Searching...
No Matches
compressor_section.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "JuceHeader.h"
7#include "synth_section.h"
8#include "text_selector.h"
9
11class SynthButton;
12class SynthSlider;
13
22public:
25 CompressorSection(const String& name);
26
29
32 void paintBackground(Graphics& g) override;
33
36 void paintBackgroundShadow(Graphics& g) override { if (isActive()) paintTabShadow(g); }
37
39 void resized() override;
40
43 void setAllValues(vital::control_map& controls) override;
44
47 void setActive(bool active) override;
48
51 void sliderValueChanged(Slider* changed_slider) override;
52
53private:
55 void setCompressorActiveBands();
56
57 std::unique_ptr<SynthButton> on_;
58 std::unique_ptr<SynthSlider> mix_;
59 std::unique_ptr<SynthSlider> attack_;
60 std::unique_ptr<SynthSlider> release_;
61 std::unique_ptr<SynthSlider> low_gain_;
62 std::unique_ptr<SynthSlider> band_gain_;
63 std::unique_ptr<SynthSlider> high_gain_;
64 std::unique_ptr<TextSelector> enabled_bands_;
65 std::unique_ptr<CompressorEditor> compressor_editor_;
66
67 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CompressorSection)
68};
A graphical interface component for editing a multiband compressor's thresholds and ratios.
Definition compressor_editor.h:22
A UI section for configuring a multiband compressor effect.
Definition compressor_section.h:21
CompressorSection(const String &name)
Definition compressor_section.cpp:14
void setAllValues(vital::control_map &controls) override
Definition compressor_section.cpp:106
~CompressorSection()
Destructor.
void paintBackground(Graphics &g) override
Definition compressor_section.cpp:61
void resized() override
Resizes and lays out the compressor's knobs and editor.
Definition compressor_section.cpp:75
void paintBackgroundShadow(Graphics &g) override
Definition compressor_section.h:36
void setActive(bool active) override
Definition compressor_section.cpp:112
void sliderValueChanged(Slider *changed_slider) override
Definition compressor_section.cpp:117
A specialized OpenGlToggleButton with additional functionality for the Vital synth.
Definition synth_button.h:450
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
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
std::map< std::string, Value * > control_map
Maps parameter names to Value pointers representing synth control parameters.
Definition synth_types.h:214
Declares the TextSelector class and PaintPatternSelector class for selecting text-based options and d...