Vital
Loading...
Searching...
No Matches
OscillatorSection Class Reference

A UI section representing an oscillator in the synthesizer. More...

#include <oscillator_section.h>

Inheritance diagram for OscillatorSection:
SynthSection PresetSelector::Listener Wavetable3d::Listener TransposeQuantizeButton::Listener SynthButton::ButtonListener

Classes

class  Listener
 Listener interface for receiving oscillator section changes. More...
 

Public Member Functions

 OscillatorSection (Authentication *auth, int index, const vital::output_map &mono_modulations, const vital::output_map &poly_modulations)
 Constructs a new OscillatorSection.
 
virtual ~OscillatorSection ()
 Destructor.
 
void setSkinValues (const Skin &skin, bool top_level) override
 Sets visual skin values.
 
void paintBackground (Graphics &g) override
 Paints the background of this section.
 
void paintBackgroundShadow (Graphics &g) override
 Paints the background shadow if active.
 
void resized () override
 Called when the component is resized. Handles layout.
 
void reset () override
 Resets the oscillator section and marks the wavetable as dirty.
 
void buttonClicked (Button *clicked_button) override
 Handles button clicks.
 
void setAllValues (vital::control_map &controls) override
 Sets all control values from a given control map.
 
void textEditorReturnKeyPressed (TextEditor &text_editor) override
 Handles the return key press in the text editor.
 
void textEditorFocusLost (TextEditor &text_editor) override
 Handles focus loss in the text editor.
 
void timerCallback () override
 Timer callback for handling transient states (e.g. error messages).
 
void setActive (bool active) override
 Sets the active state of the oscillator section.
 
void setName (String name)
 Sets the display name of the oscillator section.
 
void resetOscillatorModulationDistortionType ()
 Resets the oscillator modulation distortion type to default.
 
void addListener (Listener *listener)
 Adds a listener for oscillator section events.
 
std::string loadWavetableFromText (const String &text)
 Loads a wavetable from text input (TTWT - text to wavetable).
 
Slider * getWaveFrameSlider ()
 Gets the wave frame slider.
 
void setDistortionSelected (int selection)
 Sets the currently selected distortion type.
 
int getDistortion () const
 Gets the current distortion type.
 
void setSpectralMorphSelected (int selection)
 Sets the currently selected spectral morph type.
 
void setDestinationSelected (int selection)
 Sets the currently selected destination routing.
 
void toggleFilterInput (int filter_index, bool on)
 Toggles filter input on or off.
 
void loadBrowserState ()
 Loads the browser state for wavetable preset selection.
 
void setIndexSelected ()
 Sets the language index for the text-to-wavetable functionality.
 
void setLanguage (int index)
 Sets the language for text-to-wavetable processing.
 
void languageSelectCancelled ()
 Cancels the language selection for TTWT.
 
void prevClicked () override
 Loads the previous wavetable in the browser.
 
void nextClicked () override
 Loads the next wavetable in the browser.
 
void textMouseDown (const MouseEvent &e) override
 Handles mouse-down events on textual components.
 
void quantizeUpdated () override
 Called when transpose quantization is updated.
 
bool loadAudioAsWavetable (String name, InputStream *audio_stream, WavetableCreator::AudioFileLoadStyle style) override
 Loads audio data as a wavetable.
 
void loadWavetable (json &wavetable_data) override
 Loads a wavetable from JSON data.
 
void loadDefaultWavetable () override
 Loads the default (init) wavetable.
 
void resynthesizeToWavetable () override
 Resynthesizes the current source to a wavetable.
 
void textToWavetable () override
 Converts entered text to a wavetable (TTWT).
 
void saveWavetable () override
 Saves the current wavetable to disk.
 
void loadFile (const File &wavetable_file) override
 Loads a wavetable file from disk.
 
File getCurrentFile () override
 Gets the current wavetable file.
 
std::string getFileName () override
 Gets the name of the loaded wavetable file.
 
std::string getFileAuthor () override
 Gets the author of the loaded wavetable file.
 
int index () const
 Gets the oscillator index.
 
SynthSlidergetVoicesSlider () const
 Gets the unison voices slider.
 
const SynthSlidergetWaveFrameSlider () const
 Gets the wave frame slider.
 
const SynthSlidergetSpectralMorphSlider () const
 Gets the spectral morph slider.
 
const SynthSlidergetDistortionSlider () const
 Gets the distortion slider.
 
Rectangle< float > getWavetableRelativeBounds ()
 Gets the relative bounds of the wavetable display area.
 
- Public Member Functions inherited from SynthSection
 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.
 
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 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 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 initOpenGlComponents (OpenGlWrapper &open_gl)
 Initializes all OpenGL components in this section and sub-sections.
 
virtual void renderOpenGlComponents (OpenGlWrapper &open_gl, bool animate)
 Renders all OpenGL components in this section and sub-sections.
 
virtual void destroyOpenGlComponents (OpenGlWrapper &open_gl)
 Destroys all OpenGL components in this section and sub-sections.
 
virtual void sliderValueChanged (Slider *moved_slider) override
 Called when a slider value changes. Updates the synth parameter accordingly.
 
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.
 
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 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
 
- Public Member Functions inherited from SynthButton::ButtonListener
virtual ~ButtonListener ()
 Virtual destructor.
 
- Public Member Functions inherited from PresetSelector::Listener
virtual ~Listener ()
 Virtual destructor for proper cleanup.
 
virtual void textMouseUp (const MouseEvent &e)
 
- Public Member Functions inherited from Wavetable3d::Listener
virtual ~Listener ()
 
- Public Member Functions inherited from TransposeQuantizeButton::Listener
virtual ~Listener ()
 Virtual destructor.
 

Static Public Attributes

static constexpr float kSectionWidthRatio = 0.19f
 Relative width ratio of the oscillator section.
 
- Static Public Attributes inherited from SynthSection
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

- Protected Member Functions inherited from SynthSection
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
 
- Protected Attributes inherited from SynthSection
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 SynthSectionparent_
 
SynthButtonactivator_
 
PresetSelectorpreset_selector_
 
bool preset_selector_half_width_
 
std::unique_ptr< OffOverlayoff_overlay_
 
Skin::SectionOverride skin_override_
 
float size_ratio_
 
bool active_
 
bool sideways_heading_
 

Detailed Description

A UI section representing an oscillator in the synthesizer.

This class manages the visual and interactive components of a single oscillator, including wavetable display, parameter controls (spectral morph, distortion, destination routing, unison parameters), pitch quantization, and preset selection. It integrates with the Vital backend via modulations and can load and manipulate wavetables.

Constructor & Destructor Documentation

◆ OscillatorSection()

OscillatorSection::OscillatorSection ( Authentication * auth,
int index,
const vital::output_map & mono_modulations,
const vital::output_map & poly_modulations )

Constructs a new OscillatorSection.

Parameters
authPointer to the Authentication object.
indexIndex of the oscillator (0-based).
mono_modulationsMap of mono modulation outputs.
poly_modulationsMap of polyphonic modulation outputs.

◆ ~OscillatorSection()

OscillatorSection::~OscillatorSection ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addListener()

void OscillatorSection::addListener ( Listener * listener)
inline

Adds a listener for oscillator section events.

Parameters
listenerPointer to the listener object.

◆ buttonClicked()

void OscillatorSection::buttonClicked ( Button * clicked_button)
overridevirtual

Handles button clicks.

Parameters
clicked_buttonThe button that was clicked.

Reimplemented from SynthSection.

◆ getCurrentFile()

File OscillatorSection::getCurrentFile ( )
inlineoverridevirtual

Gets the current wavetable file.

Returns
The current File object.

Reimplemented from SynthSection.

◆ getDistortion()

int OscillatorSection::getDistortion ( ) const
inline

Gets the current distortion type.

Returns
The current distortion type index.

◆ getDistortionSlider()

const SynthSlider * OscillatorSection::getDistortionSlider ( ) const
inline

Gets the distortion slider.

Returns
Pointer to the distortion amount slider.

◆ getFileAuthor()

std::string OscillatorSection::getFileAuthor ( )
inlineoverridevirtual

Gets the author of the loaded wavetable file.

Returns
The author's name as a string.

Reimplemented from SynthSection.

◆ getFileName()

std::string OscillatorSection::getFileName ( )
inlineoverridevirtual

Gets the name of the loaded wavetable file.

Returns
The file name as a string.

Reimplemented from SynthSection.

◆ getSpectralMorphSlider()

const SynthSlider * OscillatorSection::getSpectralMorphSlider ( ) const
inline

Gets the spectral morph slider.

Returns
Pointer to the spectral morph slider.

◆ getVoicesSlider()

SynthSlider * OscillatorSection::getVoicesSlider ( ) const
inline

Gets the unison voices slider.

Returns
Pointer to the unison voices slider.

◆ getWaveFrameSlider() [1/2]

Slider * OscillatorSection::getWaveFrameSlider ( )

Gets the wave frame slider.

Returns
Pointer to the wave frame slider.

◆ getWaveFrameSlider() [2/2]

const SynthSlider * OscillatorSection::getWaveFrameSlider ( ) const
inline

Gets the wave frame slider.

Returns
Pointer to the wave frame slider (const version).

◆ getWavetableRelativeBounds()

Rectangle< float > OscillatorSection::getWavetableRelativeBounds ( )

Gets the relative bounds of the wavetable display area.

Returns
A rectangle defining the wavetable display in relative coordinates.

◆ index()

int OscillatorSection::index ( ) const
inline

Gets the oscillator index.

Returns
The 0-based oscillator index.

◆ languageSelectCancelled()

void OscillatorSection::languageSelectCancelled ( )

Cancels the language selection for TTWT.

◆ loadAudioAsWavetable()

bool OscillatorSection::loadAudioAsWavetable ( String name,
InputStream * audio_stream,
WavetableCreator::AudioFileLoadStyle style )
overridevirtual

Loads audio data as a wavetable.

Parameters
nameThe name of the wavetable.
audio_streamInput audio data stream.
styleThe load style (e.g. for TTWT, splice).
Returns
True if successful, false otherwise.

Implements Wavetable3d::Listener.

◆ loadBrowserState()

void OscillatorSection::loadBrowserState ( )

Loads the browser state for wavetable preset selection.

◆ loadDefaultWavetable()

void OscillatorSection::loadDefaultWavetable ( )
overridevirtual

Loads the default (init) wavetable.

Implements Wavetable3d::Listener.

◆ loadFile()

void OscillatorSection::loadFile ( const File & wavetable_file)
overridevirtual

Loads a wavetable file from disk.

Parameters
wavetable_fileThe file to load.

Reimplemented from SynthSection.

◆ loadWavetable()

void OscillatorSection::loadWavetable ( json & wavetable_data)
overridevirtual

Loads a wavetable from JSON data.

Parameters
wavetable_dataJSON object with wavetable data.

Implements Wavetable3d::Listener.

◆ loadWavetableFromText()

std::string OscillatorSection::loadWavetableFromText ( const String & text)

Loads a wavetable from text input (TTWT - text to wavetable).

Parameters
textThe user input text.
Returns
Error message if any, otherwise an empty string.

◆ nextClicked()

void OscillatorSection::nextClicked ( )
overridevirtual

Loads the next wavetable in the browser.

Implements PresetSelector::Listener.

◆ paintBackground()

void OscillatorSection::paintBackground ( Graphics & g)
overridevirtual

Paints the background of this section.

Parameters
gThe Graphics context.

Reimplemented from SynthSection.

◆ paintBackgroundShadow()

void OscillatorSection::paintBackgroundShadow ( Graphics & g)
inlineoverridevirtual

Paints the background shadow if active.

Parameters
gThe Graphics context.

Reimplemented from SynthSection.

◆ prevClicked()

void OscillatorSection::prevClicked ( )
overridevirtual

Loads the previous wavetable in the browser.

Implements PresetSelector::Listener.

◆ quantizeUpdated()

void OscillatorSection::quantizeUpdated ( )
overridevirtual

Called when transpose quantization is updated.

Implements TransposeQuantizeButton::Listener.

◆ reset()

void OscillatorSection::reset ( )
inlineoverridevirtual

Resets the oscillator section and marks the wavetable as dirty.

Reimplemented from SynthSection.

◆ resetOscillatorModulationDistortionType()

void OscillatorSection::resetOscillatorModulationDistortionType ( )

Resets the oscillator modulation distortion type to default.

◆ resized()

void OscillatorSection::resized ( )
overridevirtual

Called when the component is resized. Handles layout.

Reimplemented from SynthSection.

◆ resynthesizeToWavetable()

void OscillatorSection::resynthesizeToWavetable ( )
overridevirtual

Resynthesizes the current source to a wavetable.

Implements Wavetable3d::Listener.

◆ saveWavetable()

void OscillatorSection::saveWavetable ( )
overridevirtual

Saves the current wavetable to disk.

Implements Wavetable3d::Listener.

◆ setActive()

void OscillatorSection::setActive ( bool active)
overridevirtual

Sets the active state of the oscillator section.

Parameters
activeTrue if active, false otherwise.

Reimplemented from SynthSection.

◆ setAllValues()

void OscillatorSection::setAllValues ( vital::control_map & controls)
overridevirtual

Sets all control values from a given control map.

Parameters
controlsThe control map with parameter values.

Reimplemented from SynthSection.

◆ setDestinationSelected()

void OscillatorSection::setDestinationSelected ( int selection)

Sets the currently selected destination routing.

Parameters
selectionThe index of the destination option.

◆ setDistortionSelected()

void OscillatorSection::setDistortionSelected ( int selection)

Sets the currently selected distortion type.

Parameters
selectionThe index of the distortion type.

◆ setIndexSelected()

void OscillatorSection::setIndexSelected ( )

Sets the language index for the text-to-wavetable functionality.

◆ setLanguage()

void OscillatorSection::setLanguage ( int index)

Sets the language for text-to-wavetable processing.

Parameters
indexIndex of the selected language.

◆ setName()

void OscillatorSection::setName ( String name)

Sets the display name of the oscillator section.

Parameters
nameThe name to display (e.g. a preset name).

◆ setSkinValues()

void OscillatorSection::setSkinValues ( const Skin & skin,
bool top_level )
overridevirtual

Sets visual skin values.

Parameters
skinThe Skin object with UI styling parameters.
top_levelWhether this is the top-level call.

Reimplemented from SynthSection.

◆ setSpectralMorphSelected()

void OscillatorSection::setSpectralMorphSelected ( int selection)

Sets the currently selected spectral morph type.

Parameters
selectionThe index of the spectral morph type.

◆ textEditorFocusLost()

void OscillatorSection::textEditorFocusLost ( TextEditor & text_editor)
override

Handles focus loss in the text editor.

Parameters
text_editorReference to the TextEditor.

◆ textEditorReturnKeyPressed()

void OscillatorSection::textEditorReturnKeyPressed ( TextEditor & text_editor)
override

Handles the return key press in the text editor.

Parameters
text_editorReference to the TextEditor.

◆ textMouseDown()

void OscillatorSection::textMouseDown ( const MouseEvent & e)
overridevirtual

Handles mouse-down events on textual components.

Parameters
eThe MouseEvent.

Reimplemented from PresetSelector::Listener.

◆ textToWavetable()

void OscillatorSection::textToWavetable ( )
overridevirtual

Converts entered text to a wavetable (TTWT).

Implements Wavetable3d::Listener.

◆ timerCallback()

void OscillatorSection::timerCallback ( )
override

Timer callback for handling transient states (e.g. error messages).

◆ toggleFilterInput()

void OscillatorSection::toggleFilterInput ( int filter_index,
bool on )

Toggles filter input on or off.

Parameters
filter_indexIndex of the filter to toggle.
onTrue to turn on, false to turn off.

Member Data Documentation

◆ kSectionWidthRatio

float OscillatorSection::kSectionWidthRatio = 0.19f
staticconstexpr

Relative width ratio of the oscillator section.


The documentation for this class was generated from the following files: