Vital
|
A top-level section for managing all modulation connections, amounts, and related UI components. More...
#include <modulation_manager.h>
Public Member Functions | |
ModulationManager (std::map< std::string, ModulationButton * > modulation_buttons, std::map< std::string, SynthSlider * > sliders, vital::output_map mono_modulations, vital::output_map poly_modulations) | |
Constructs a ModulationManager. | |
~ModulationManager () | |
Destructor. | |
void | createModulationMeter (const vital::Output *mono_total, const vital::Output *poly_total, SynthSlider *slider, OpenGlMultiQuad *quads, int index) |
Creates a modulation meter for a given slider and places it into an OpenGlMultiQuad for visualization. | |
void | createModulationSlider (std::string name, SynthSlider *slider, bool poly) |
Creates internal structures for handling modulation of a given parameter (slider). | |
void | connectModulation (std::string source, std::string destination) |
Connects a modulation source to a destination parameter. | |
void | removeModulation (std::string source, std::string destination) |
Removes a modulation connection between a source and a destination. | |
void | setModulationSliderValue (int index, float value) |
Sets the modulation value for a given modulation index. | |
void | setModulationSliderBipolar (int index, bool bipolar) |
Sets the bipolar state for a given modulation index. | |
void | setModulationSliderValues (int index, float value) |
Sets the modulation values and updates all connected auxiliary nodes. | |
void | setModulationSliderScale (int index) |
Adjusts the displayed range of a modulation slider based on parameter scaling. | |
void | setModulationValues (std::string source, std::string destination, vital::mono_float amount, bool bipolar, bool stereo, bool bypass) |
Sets multiple modulation properties at once. | |
void | reset () override |
Resets the section and all sub-sections. | |
void | initAuxConnections () |
void | resized () override |
Called when the component is resized. Arranges layout of child components. | |
void | parentHierarchyChanged () override |
void | updateModulationMeterLocations () |
void | modulationAmountChanged (SynthSlider *slider) override |
void | modulationRemoved (SynthSlider *slider) override |
void | modulationDisconnected (vital::ModulationConnection *connection, bool last) override |
Called when a modulation connection is disconnected. | |
void | modulationSelected (ModulationButton *source) override |
Called when this modulation button is selected. | |
void | modulationClicked (ModulationButton *source) override |
Called when the modulation button is clicked (mouse up) without dragging out. | |
void | modulationCleared () override |
Called when all modulations associated with this button have been cleared. | |
bool | hasFreeConnection () |
void | startModulationMap (ModulationButton *source, const MouseEvent &e) override |
Called when the user begins dragging out to map the modulation (dragging out of the button). | |
void | modulationDragged (const MouseEvent &e) override |
Called while modulation is being dragged out (during mouse drag). | |
void | modulationWheelMoved (const MouseEvent &e, const MouseWheelDetails &wheel) override |
Called when the mouse wheel moves while interacting with the modulation button. | |
void | clearTemporaryModulation () |
void | clearTemporaryHoverModulation () |
void | modulationDraggedToHoverSlider (ModulationAmountKnob *hover_slider) |
void | modulationDraggedToComponent (Component *component, bool bipolar) |
void | setTemporaryModulationBipolar (Component *component, bool bipolar) |
void | endModulationMap () override |
Called when the user finishes dragging out modulation connections. | |
void | modulationLostFocus (ModulationButton *source) override |
Called when the modulation button loses keyboard focus. | |
void | expansionFocusLost () override |
Called when the expansion box loses focus. | |
void | clearModulationSource () |
void | disconnectModulation (ModulationAmountKnob *modulation_knob) override |
Called when the modulation is disconnected. | |
void | setModulationSettings (ModulationAmountKnob *modulation_knob) |
void | setModulationBypass (ModulationAmountKnob *modulation_knob, bool bypass) override |
Called when modulation bypass state changes. | |
void | setModulationBipolar (ModulationAmountKnob *modulation_knob, bool bipolar) override |
Called when modulation bipolar state changes. | |
void | setModulationStereo (ModulationAmountKnob *modulation_knob, bool stereo) override |
Called when modulation stereo state changes. | |
void | initOpenGlComponents (OpenGlWrapper &open_gl) override |
Initializes all OpenGL components in this section and sub-sections. | |
void | drawModulationDestinations (OpenGlWrapper &open_gl) |
void | drawCurrentModulator (OpenGlWrapper &open_gl) |
void | drawDraggingModulation (OpenGlWrapper &open_gl) |
void | renderOpenGlComponents (OpenGlWrapper &open_gl, bool animate) override |
Renders all OpenGL components in this section and sub-sections. | |
void | renderMeters (OpenGlWrapper &open_gl, bool animate) |
void | renderSourceMeters (OpenGlWrapper &open_gl, int index) |
void | updateSmoothModValues () |
void | destroyOpenGlComponents (OpenGlWrapper &open_gl) override |
Destroys all OpenGL components in this section and sub-sections. | |
void | paintBackground (Graphics &g) override |
Paints the background of the section. Calls paintContainer, heading, knobs, children. | |
void | setModulationAmounts () |
void | setVisibleMeterBounds () |
void | hoverStarted (SynthSlider *slider) override |
void | hoverEnded (SynthSlider *slider) override |
void | menuFinished (SynthSlider *slider) override |
void | modulationsChanged (const std::string &name) override |
int | getIndexForModulationSlider (Slider *slider) |
int | getModulationIndex (std::string source, std::string destination) |
vital::ModulationConnection * | getConnectionForModulationSlider (Slider *slider) |
vital::ModulationConnection * | getConnection (int index) |
vital::ModulationConnection * | getConnection (const std::string &source, const std::string &dest) |
void | mouseDown (SynthSlider *slider) override |
void | mouseUp (SynthSlider *slider) override |
void | doubleClick (SynthSlider *slider) override |
void | beginModulationEdit (SynthSlider *slider) override |
void | endModulationEdit (SynthSlider *slider) override |
void | sliderValueChanged (Slider *slider) override |
Called when a slider value changes. Updates the synth parameter accordingly. | |
void | buttonClicked (Button *button) override |
Called when a button is clicked. Updates the synth parameter accordingly. | |
void | hideUnusedHoverModulations () |
float | getAuxMultiplier (int index) |
void | addAuxConnection (int from_index, int to_index) |
void | removeAuxDestinationConnection (int to_index) |
void | removeAuxSourceConnection (int from_index) |
![]() | |
SynthSection (const String &name) | |
Constructs a SynthSection with a given name. | |
virtual | ~SynthSection ()=default |
void | setParent (const SynthSection *parent) |
Sets the parent SynthSection. | |
float | findValue (Skin::ValueId value_id) const |
Finds a value in the skin overrides or from the parent if not found locally. | |
virtual void | paint (Graphics &g) override |
Called when the component should paint itself. | |
virtual void | paintSidewaysHeadingText (Graphics &g) |
Paints the section name heading text vertically if sideways_heading_ is true. | |
virtual void | paintHeadingText (Graphics &g) |
Paints the heading text for this section, either sideways or horizontally. | |
virtual void | setSkinValues (const Skin &skin, bool top_level) |
Sets skin values (colors, sizes) and applies them to sub-sections. | |
void | setSkinOverride (Skin::SectionOverride skin_override) |
virtual void | repaintBackground () |
Requests a repaint of the background. | |
void | showPopupBrowser (SynthSection *owner, Rectangle< int > bounds, std::vector< File > directories, String extensions, std::string passthrough_name, std::string additional_folders_name) |
Shows a file browser popup (e.g., for loading samples or wavetables). | |
void | updatePopupBrowser (SynthSection *owner) |
Updates the currently visible popup browser if any. | |
void | showPopupSelector (Component *source, Point< int > position, const PopupItems &options, std::function< void(int)> callback, std::function< void()> cancel={ }) |
Shows a popup selector with options. | |
void | showDualPopupSelector (Component *source, Point< int > position, int width, const PopupItems &options, std::function< void(int)> callback) |
Shows a dual popup selector for hierarchical selection. | |
void | showPopupDisplay (Component *source, const std::string &text, BubbleComponent::BubblePlacement placement, bool primary) |
Shows a brief popup display (like a tooltip). | |
void | hidePopupDisplay (bool primary) |
Hides the currently shown popup display. | |
virtual void | loadFile (const File &file) |
Loads a file (e.g., a sample or wavetable). Overridden by subclasses. | |
virtual File | getCurrentFile () |
Gets the currently loaded file. Overridden by subclasses. | |
virtual std::string | getFileName () |
Gets the name of the currently loaded file. Overridden by subclasses. | |
virtual std::string | getFileAuthor () |
Gets the author metadata of the currently loaded file. Overridden by subclasses. | |
virtual void | paintContainer (Graphics &g) |
Paints the container background, body, heading, etc. | |
virtual void | paintBody (Graphics &g, Rectangle< int > bounds) |
Paints the body background within given bounds. | |
virtual void | paintBorder (Graphics &g, Rectangle< int > bounds) |
Paints the border around given bounds. | |
virtual void | paintBody (Graphics &g) |
Paints the section body background using the entire component area. | |
virtual void | paintBorder (Graphics &g) |
Paints the border around the entire component. | |
int | getComponentShadowWidth () |
Gets the width of shadow around components. | |
virtual void | paintTabShadow (Graphics &g) |
Paints a tab-like shadow effect around the component. | |
void | paintTabShadow (Graphics &g, Rectangle< int > bounds) |
Paints a tab shadow effect within specified bounds. | |
virtual void | paintBackgroundShadow (Graphics &g) |
Stub for painting background shadows. Overridden by subclasses if needed. | |
virtual void | setSizeRatio (float ratio) |
Sets the size ratio for scaling UI elements. | |
void | paintKnobShadows (Graphics &g) |
Paints knob shadows for all sliders. | |
Font | getLabelFont () |
Gets a suitable font for label text. | |
void | setLabelFont (Graphics &g) |
Sets the Graphics context font and color for labels. | |
void | drawLabelConnectionForComponents (Graphics &g, Component *left, Component *right) |
Draws a rectangular connection between labels of two components. | |
void | drawLabelBackground (Graphics &g, Rectangle< int > bounds, bool text_component=false) |
Draws a background for a label area. | |
void | drawLabelBackgroundForComponent (Graphics &g, Component *component) |
Draws label background for a specific component. | |
Rectangle< int > | getDividedAreaBuffered (Rectangle< int > full_area, int num_sections, int section, int buffer) |
Divides an area into equal sections with buffering, returns the specified section. | |
Rectangle< int > | getDividedAreaUnbuffered (Rectangle< int > full_area, int num_sections, int section, int buffer) |
Divides an area into equal sections without extra buffering, returns the specified section. | |
Rectangle< int > | getLabelBackgroundBounds (Rectangle< int > bounds, bool text_component=false) |
Gets the background bounds for a label. | |
Rectangle< int > | getLabelBackgroundBounds (Component *component, bool text_component=false) |
Gets the label background bounds for a component. | |
void | drawLabel (Graphics &g, String text, Rectangle< int > component_bounds, bool text_component=false) |
Draws a label text below a component. | |
void | drawLabelForComponent (Graphics &g, String text, Component *component, bool text_component=false) |
Draws a label for a given component. | |
void | drawTextBelowComponent (Graphics &g, String text, Component *component, int space, int padding=0) |
Draws text below a component with optional padding. | |
virtual void | paintChildrenShadows (Graphics &g) |
Paints shadows for child sections. | |
void | paintChildrenBackgrounds (Graphics &g) |
Paints the backgrounds for all child sections. | |
void | paintOpenGlChildrenBackgrounds (Graphics &g) |
Paints the backgrounds for all OpenGL child components. | |
void | paintChildBackground (Graphics &g, SynthSection *child) |
Paints a child's background specifically. | |
void | paintChildShadow (Graphics &g, SynthSection *child) |
Paints a child's shadow specifically. | |
void | paintOpenGlBackground (Graphics &g, OpenGlComponent *child) |
Paints the background of an OpenGlComponent child. | |
void | drawTextComponentBackground (Graphics &g, Rectangle< int > bounds, bool extend_to_label) |
Draws a background for a text component area. | |
void | drawTempoDivider (Graphics &g, Component *sync) |
Draws a divider line for tempo-related controls. | |
virtual void | guiChanged (SynthButton *button) override |
Called when a SynthButton state changes (GUI interaction). | |
std::map< std::string, SynthSlider * > | getAllSliders () |
Gets all sliders registered in this section. | |
std::map< std::string, ToggleButton * > | getAllButtons () |
Gets all toggle buttons registered in this section. | |
std::map< std::string, ModulationButton * > | getAllModulationButtons () |
Gets all modulation buttons registered in this section. | |
virtual void | setActive (bool active) |
Sets the active state of this section and sub-sections. | |
bool | isActive () const |
Checks if the section is currently active. | |
virtual void | animate (bool animate) |
Triggers animation state change in sub-sections if needed. | |
virtual void | setAllValues (vital::control_map &controls) |
Sets values for all known parameters from a control map. | |
virtual void | setValue (const std::string &name, vital::mono_float value, NotificationType notification) |
Sets a single parameter value for a known control. | |
void | addModulationButton (ModulationButton *button, bool show=true) |
Adds a modulation button to this section. | |
void | addSubSection (SynthSection *section, bool show=true) |
Adds a subsection (another SynthSection) as a child. | |
void | removeSubSection (SynthSection *section) |
Removes a previously added subsection. | |
virtual void | setScrollWheelEnabled (bool enabled) |
Enables or disables scroll wheel support for this section and sub-sections. | |
ToggleButton * | activator () const |
Gets the activator toggle button if any. | |
void | setSkinValues (std::map< Skin::ValueId, float > values) |
Sets custom skin values for this section. | |
void | setSkinValue (Skin::ValueId id, float value) |
Sets a single skin value override. | |
float | getTitleWidth () |
float | getPadding () |
float | getPowerButtonOffset () const |
float | getKnobSectionHeight () |
float | getSliderWidth () |
float | getSliderOverlap () |
float | getSliderOverlapWithSpace () |
float | getTextComponentHeight () |
float | getStandardKnobSize () |
float | getTotalKnobHeight () |
float | getTextSectionYOffset () |
float | getModButtonWidth () |
float | getModFontSize () |
float | getWidgetMargin () |
float | getWidgetRounding () |
float | getSizeRatio () const |
int | getPopupWidth () const |
int | getDualPopupWidth () const |
![]() | |
virtual | ~ButtonListener () |
Virtual destructor. | |
![]() | |
virtual | ~Listener ()=default |
virtual void | modulationConnectionChanged () |
Called when a modulation connection is changed (e.g., added or removed). | |
![]() | |
virtual | ~Listener () |
![]() | |
virtual | ~SliderListener () |
virtual void | focusLost (SynthSlider *slider) |
virtual void | guiChanged (SynthSlider *slider) |
![]() | |
virtual | ~Listener () |
Static Public Attributes | |
static constexpr int | kIndicesPerMeter = 6 |
static constexpr float | kDragImageWidthPercent = 0.018f |
![]() | |
static constexpr int | kDefaultPowerButtonOffset = 0 |
static constexpr float | kPowerButtonPaddingPercent = 0.29f |
static constexpr float | kTransposeHeightPercent = 0.5f |
static constexpr float | kTuneHeightPercent = 0.4f |
static constexpr float | kJointModulationRadiusPercent = 0.1f |
static constexpr float | kJointModulationExtensionPercent = 0.6666f |
static constexpr float | kPitchLabelPercent = 0.33f |
static constexpr float | kJointLabelHeightPercent = 0.4f |
static constexpr double | kTransposeMouseSensitivity = 0.2 |
static constexpr float | kJointLabelBorderRatioX = 0.05f |
static constexpr int | kDefaultBodyRounding = 4 |
static constexpr int | kDefaultLabelHeight = 10 |
static constexpr int | kDefaultLabelBackgroundHeight = 16 |
static constexpr int | kDefaultLabelBackgroundWidth = 56 |
static constexpr int | kDefaultLabelBackgroundRounding = 4 |
static constexpr int | kDefaultPadding = 2 |
static constexpr int | kDefaultPopupMenuWidth = 150 |
static constexpr int | kDefaultDualPopupMenuWidth = 340 |
static constexpr int | kDefaultStandardKnobSize = 32 |
static constexpr int | kDefaultKnobThickness = 2 |
static constexpr float | kDefaultKnobModulationAmountThickness = 2.0f |
static constexpr int | kDefaultKnobModulationMeterSize = 43 |
static constexpr int | kDefaultKnobModulationMeterThickness = 4 |
static constexpr int | kDefaultModulationButtonWidth = 64 |
static constexpr int | kDefaultModFontSize = 10 |
static constexpr int | kDefaultKnobSectionHeight = 64 |
static constexpr int | kDefaultSliderWidth = 24 |
static constexpr int | kDefaultTextWidth = 80 |
static constexpr int | kDefaultTextHeight = 24 |
static constexpr int | kDefaultWidgetMargin = 6 |
static constexpr float | kDefaultWidgetFillFade = 0.3f |
static constexpr float | kDefaultWidgetLineWidth = 4.0f |
static constexpr float | kDefaultWidgetFillCenter = 0.0f |
Additional Inherited Members | |
![]() | |
void | setSliderHasHzAlternateDisplay (SynthSlider *slider) |
void | setSidewaysHeading (bool sideways) |
void | addToggleButton (ToggleButton *button, bool show) |
void | addButton (OpenGlToggleButton *button, bool show=true) |
void | addButton (OpenGlShapeButton *button, bool show=true) |
void | addSlider (SynthSlider *slider, bool show=true, bool listen=true) |
void | addOpenGlComponent (OpenGlComponent *open_gl_component, bool to_beginning=false) |
void | setActivator (SynthButton *activator) |
void | createOffOverlay () |
void | setPresetSelector (PresetSelector *preset_selector, bool half=false) |
void | paintJointControlSliderBackground (Graphics &g, int x, int y, int width, int height) |
void | paintJointControlBackground (Graphics &g, int x, int y, int width, int height) |
void | paintJointControl (Graphics &g, int x, int y, int width, int height, const std::string &name) |
void | placeJointControls (int x, int y, int width, int height, SynthSlider *left, SynthSlider *right, Component *widget=nullptr) |
void | placeTempoControls (int x, int y, int width, int height, SynthSlider *tempo, SynthSlider *sync) |
void | placeRotaryOption (Component *option, SynthSlider *rotary) |
void | placeKnobsInArea (Rectangle< int > area, std::vector< Component * > knobs) |
void | lockCriticalSection () |
void | unlockCriticalSection () |
Rectangle< int > | getPresetBrowserBounds () |
int | getTitleTextRight () |
Rectangle< int > | getPowerButtonBounds () |
Rectangle< int > | getTitleBounds () |
float | getDisplayScale () const |
virtual int | getPixelMultiple () const |
![]() | |
std::map< Skin::ValueId, float > | value_lookup_ |
std::vector< SynthSection * > | sub_sections_ |
std::vector< OpenGlComponent * > | open_gl_components_ |
std::map< std::string, SynthSlider * > | slider_lookup_ |
std::map< std::string, Button * > | button_lookup_ |
std::map< std::string, ModulationButton * > | modulation_buttons_ |
std::map< std::string, SynthSlider * > | all_sliders_ |
std::map< std::string, ToggleButton * > | all_buttons_ |
std::map< std::string, ModulationButton * > | all_modulation_buttons_ |
const SynthSection * | parent_ |
SynthButton * | activator_ |
PresetSelector * | preset_selector_ |
bool | preset_selector_half_width_ |
std::unique_ptr< OffOverlay > | off_overlay_ |
Skin::SectionOverride | skin_override_ |
float | size_ratio_ |
bool | active_ |
bool | sideways_heading_ |
A top-level section for managing all modulation connections, amounts, and related UI components.
The ModulationManager handles:
It integrates with the synthesizer model (via SynthGuiInterface) to reflect and change modulation states.
ModulationManager::ModulationManager | ( | std::map< std::string, ModulationButton * > | modulation_buttons, |
std::map< std::string, SynthSlider * > | sliders, | ||
vital::output_map | mono_modulations, | ||
vital::output_map | poly_modulations ) |
Constructs a ModulationManager.
modulation_buttons | A map of parameter names to their ModulationButton. |
sliders | A map of parameter names to their associated SynthSlider. |
mono_modulations | The monophonic modulation output map. |
poly_modulations | The polyphonic modulation output map. |
ModulationManager::~ModulationManager | ( | ) |
Destructor.
void ModulationManager::addAuxConnection | ( | int | from_index, |
int | to_index ) |
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Called when a button is clicked. Updates the synth parameter accordingly.
clicked_button | The button clicked. |
Reimplemented from SynthSection.
void ModulationManager::clearModulationSource | ( | ) |
void ModulationManager::clearTemporaryHoverModulation | ( | ) |
void ModulationManager::clearTemporaryModulation | ( | ) |
void ModulationManager::connectModulation | ( | std::string | source, |
std::string | destination ) |
Connects a modulation source to a destination parameter.
source | The modulation source name. |
destination | The parameter name of the destination. |
void ModulationManager::createModulationMeter | ( | const vital::Output * | mono_total, |
const vital::Output * | poly_total, | ||
SynthSlider * | slider, | ||
OpenGlMultiQuad * | quads, | ||
int | index ) |
Creates a modulation meter for a given slider and places it into an OpenGlMultiQuad for visualization.
mono_total | The monophonic modulation output for this parameter. |
poly_total | The polyphonic modulation output for this parameter (or nullptr if none). |
slider | The associated SynthSlider. |
quads | The OpenGlMultiQuad to draw the meter in. |
index | The index of this meter in the quad. |
void ModulationManager::createModulationSlider | ( | std::string | name, |
SynthSlider * | slider, | ||
bool | poly ) |
Creates internal structures for handling modulation of a given parameter (slider).
name | The parameter name. |
slider | The slider controlling that parameter. |
poly | True if this parameter supports polyphonic modulations. |
|
overridevirtual |
Destroys all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
Reimplemented from SynthSection.
|
overridevirtual |
Called when the modulation is disconnected.
modulation_knob | The knob that triggered the event. |
Implements ModulationAmountKnob::Listener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
void ModulationManager::drawCurrentModulator | ( | OpenGlWrapper & | open_gl | ) |
void ModulationManager::drawDraggingModulation | ( | OpenGlWrapper & | open_gl | ) |
void ModulationManager::drawModulationDestinations | ( | OpenGlWrapper & | open_gl | ) |
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Called when the user finishes dragging out modulation connections.
Reimplemented from ModulationButton::Listener.
|
inlineoverridevirtual |
Called when the expansion box loses focus.
Implements ModulationExpansionBox::Listener.
float ModulationManager::getAuxMultiplier | ( | int | index | ) |
vital::ModulationConnection * ModulationManager::getConnection | ( | const std::string & | source, |
const std::string & | dest ) |
vital::ModulationConnection * ModulationManager::getConnection | ( | int | index | ) |
vital::ModulationConnection * ModulationManager::getConnectionForModulationSlider | ( | Slider * | slider | ) |
int ModulationManager::getIndexForModulationSlider | ( | Slider * | slider | ) |
int ModulationManager::getModulationIndex | ( | std::string | source, |
std::string | destination ) |
bool ModulationManager::hasFreeConnection | ( | ) |
void ModulationManager::hideUnusedHoverModulations | ( | ) |
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
void ModulationManager::initAuxConnections | ( | ) |
|
overridevirtual |
Initializes all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
Reimplemented from SynthSection.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Called when all modulations associated with this button have been cleared.
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Called when the modulation button is clicked (mouse up) without dragging out.
source | The modulation button that was clicked. |
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Called when a modulation connection is disconnected.
connection | The disconnected modulation connection. |
last | True if this was the last modulation connection for that destination. |
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Called while modulation is being dragged out (during mouse drag).
e | The mouse event during the drag. |
Reimplemented from ModulationButton::Listener.
void ModulationManager::modulationDraggedToComponent | ( | Component * | component, |
bool | bipolar ) |
void ModulationManager::modulationDraggedToHoverSlider | ( | ModulationAmountKnob * | hover_slider | ) |
|
overridevirtual |
Called when the modulation button loses keyboard focus.
source | The modulation button that lost focus. |
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Called when this modulation button is selected.
source | The modulation button that was selected. |
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Called when the mouse wheel moves while interacting with the modulation button.
e | The mouse event. |
wheel | Wheel details such as delta. |
Reimplemented from ModulationButton::Listener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
overridevirtual |
Reimplemented from SynthSlider::SliderListener.
|
inlineoverridevirtual |
Paints the background of the section. Calls paintContainer, heading, knobs, children.
g | The Graphics context. |
Reimplemented from SynthSection.
|
override |
void ModulationManager::removeAuxDestinationConnection | ( | int | to_index | ) |
void ModulationManager::removeAuxSourceConnection | ( | int | from_index | ) |
void ModulationManager::removeModulation | ( | std::string | source, |
std::string | destination ) |
Removes a modulation connection between a source and a destination.
source | The modulation source name. |
destination | The parameter name of the destination. |
void ModulationManager::renderMeters | ( | OpenGlWrapper & | open_gl, |
bool | animate ) |
|
overridevirtual |
Renders all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
animate | True if animation is desired. |
Reimplemented from SynthSection.
void ModulationManager::renderSourceMeters | ( | OpenGlWrapper & | open_gl, |
int | index ) |
|
overridevirtual |
Resets the section and all sub-sections.
Reimplemented from SynthSection.
|
overridevirtual |
Called when the component is resized. Arranges layout of child components.
Reimplemented from SynthSection.
void ModulationManager::setModulationAmounts | ( | ) |
|
overridevirtual |
Called when modulation bipolar state changes.
modulation_knob | The knob that triggered the event. |
bipolar | True if bipolar, false otherwise. |
Implements ModulationAmountKnob::Listener.
|
overridevirtual |
Called when modulation bypass state changes.
modulation_knob | The knob that triggered the event. |
bypass | True if bypassed, false otherwise. |
Implements ModulationAmountKnob::Listener.
void ModulationManager::setModulationSettings | ( | ModulationAmountKnob * | modulation_knob | ) |
void ModulationManager::setModulationSliderBipolar | ( | int | index, |
bool | bipolar ) |
Sets the bipolar state for a given modulation index.
index | The modulation connection index. |
bipolar | True if bipolar, false otherwise. |
void ModulationManager::setModulationSliderScale | ( | int | index | ) |
Adjusts the displayed range of a modulation slider based on parameter scaling.
index | The modulation connection index. |
void ModulationManager::setModulationSliderValue | ( | int | index, |
float | value ) |
Sets the modulation value for a given modulation index.
index | The modulation connection index. |
value | The new modulation amount. |
void ModulationManager::setModulationSliderValues | ( | int | index, |
float | value ) |
Sets the modulation values and updates all connected auxiliary nodes.
index | The modulation connection index. |
value | The new modulation amount. |
|
overridevirtual |
Called when modulation stereo state changes.
modulation_knob | The knob that triggered the event. |
stereo | True if stereo, false otherwise. |
Implements ModulationAmountKnob::Listener.
void ModulationManager::setModulationValues | ( | std::string | source, |
std::string | destination, | ||
vital::mono_float | amount, | ||
bool | bipolar, | ||
bool | stereo, | ||
bool | bypass ) |
Sets multiple modulation properties at once.
source | The modulation source name. |
destination | The destination parameter name. |
amount | The modulation amount. |
bipolar | Whether modulation is bipolar. |
stereo | Whether modulation is stereo. |
bypass | Whether modulation is bypassed. |
void ModulationManager::setTemporaryModulationBipolar | ( | Component * | component, |
bool | bipolar ) |
void ModulationManager::setVisibleMeterBounds | ( | ) |
|
overridevirtual |
Called when a slider value changes. Updates the synth parameter accordingly.
moved_slider | The slider that changed. |
Reimplemented from SynthSection.
|
overridevirtual |
Called when the user begins dragging out to map the modulation (dragging out of the button).
source | The modulation button source. |
e | The mouse event triggering this action. |
Reimplemented from ModulationButton::Listener.
void ModulationManager::updateModulationMeterLocations | ( | ) |
void ModulationManager::updateSmoothModValues | ( | ) |
|
staticconstexpr |
|
staticconstexpr |