108 float unselected_x1,
float unselected_y1,
109 float unselected_x2,
float unselected_y2);
189 unselected_points_.setBounds(getLocalBounds());
190 selected_point_.setBounds(getLocalBounds());
191 dragging_point_.setBounds(getLocalBounds());
205 void mouseWheelMove(
const MouseEvent& e,
const MouseWheelDetails& wheel)
override;
211 void mouseDown(
const MouseEvent& e)
override;
217 void mouseDrag(
const MouseEvent& e)
override;
223 void mouseUp(
const MouseEvent& e)
override;
229 void mouseExit(
const MouseEvent& e)
override;
295 bool draw_frequency_lines_;
298 float db_buffer_ratio_;
337 std::unique_ptr<float[]> line_data_;
338 OpenGLShaderProgram* shader_;
339 std::unique_ptr<OpenGLShaderProgram::Attribute> position_attribute_;
341 std::unique_ptr<OpenGLShaderProgram::Uniform> midi_cutoff_uniform_;
342 std::unique_ptr<OpenGLShaderProgram::Uniform> resonance_uniform_;
343 std::unique_ptr<OpenGLShaderProgram::Uniform> low_amount_uniform_;
344 std::unique_ptr<OpenGLShaderProgram::Uniform> band_amount_uniform_;
345 std::unique_ptr<OpenGLShaderProgram::Uniform> high_amount_uniform_;
347 GLuint vertex_array_object_;
349 GLuint response_buffer_;
350 std::vector<Listener*> listeners_;
Interface for objects that want to be notified when a band is selected.
Definition equalizer_response.h:36
virtual void lowBandSelected()=0
Called when the low band is selected by the user.
virtual void midBandSelected()=0
Called when the mid band is selected by the user.
virtual ~Listener()=default
virtual void highBandSelected()=0
Called when the high band is selected by the user.
A visualization component for an equalizer or filter response curve.
Definition equalizer_response.h:18
void drawControlPoints(OpenGlWrapper &open_gl)
Draws the control points (markers) for the EQ bands.
Definition equalizer_response.cpp:253
void moveFilterSettings(Point< float > position)
Moves the currently selected filter's cutoff and gain based on a mouse drag position.
Definition equalizer_response.cpp:473
void setHighSliders(SynthSlider *cutoff, SynthSlider *resonance, SynthSlider *gain)
Assigns the sliders for the high band.
Definition equalizer_response.cpp:522
void mouseUp(const MouseEvent &e) override
Handles mouse up events, finalizing any changes made during drag.
Definition equalizer_response.cpp:360
void setControlPointBounds(float selected_x, float selected_y, float unselected_x1, float unselected_y1, float unselected_x2, float unselected_y2)
Sets the bounds for the control points (selected and unselected) in normalized coordinates.
Definition equalizer_response.cpp:227
void setActive(bool active)
Sets the active state of the EQ visualization.
Definition equalizer_response.cpp:539
void setDrawFrequencyLines(bool draw_lines)
Sets whether to draw frequency grid lines in the background.
Definition equalizer_response.h:272
virtual void destroy(OpenGlWrapper &open_gl) override
Destroys OpenGL resources.
Definition equalizer_response.cpp:206
void mouseExit(const MouseEvent &e) override
Handles mouse exit events to hide popups or reset state.
Definition equalizer_response.cpp:371
void resized() override
Called when the component is resized.
Definition equalizer_response.h:186
static constexpr float kDefaultDbBufferRatio
Ratio of dB range used as a buffer around min/max gain values.
Definition equalizer_response.h:27
void setNotch(bool notch)
Configures the mid band as a notch filter (or a shelf).
Definition equalizer_response.cpp:549
void mouseDown(const MouseEvent &e) override
Handles mouse down events to select a band.
Definition equalizer_response.cpp:330
void setHighPass(bool high_pass)
Configures the low band as a high-pass filter (or a shelf).
Definition equalizer_response.cpp:544
void mouseDrag(const MouseEvent &e) override
Handles mouse drag events to adjust filter settings.
Definition equalizer_response.cpp:355
void initEq(const vital::output_map &mono_modulations)
Initializes the Equalizer response for a standard 3-band EQ using the provided outputs.
Definition equalizer_response.cpp:72
~EqualizerResponse()
Destructor.
EqualizerResponse()
Constructs an EqualizerResponse component.
Definition equalizer_response.cpp:7
void setLowPass(bool low_pass)
Configures the high band as a low-pass filter (or a shelf).
Definition equalizer_response.cpp:554
void paintBackground(Graphics &g) override
Paints the background and optionally draws frequency lines.
Definition equalizer_response.cpp:288
int getHoveredBand(const MouseEvent &e)
Determines which band is currently hovered by the mouse.
Definition equalizer_response.cpp:379
static constexpr float kMouseMultiplier
Mouse drag multiplier for gain/cutoff adjustments.
Definition equalizer_response.h:30
void mouseWheelMove(const MouseEvent &e, const MouseWheelDetails &wheel) override
Handles mouse wheel movements for adjusting resonance if hovering over a band.
Definition equalizer_response.cpp:317
static constexpr int kResolution
Number of points used for resolution in the frequency response display.
Definition equalizer_response.h:21
void setLowSliders(SynthSlider *cutoff, SynthSlider *resonance, SynthSlider *gain)
Assigns the sliders for the low band.
Definition equalizer_response.cpp:495
static constexpr int kViewSampleRate
A high view sample rate for accurate visualization (not actual audio processing).
Definition equalizer_response.h:24
void addListener(Listener *listener)
Adds a listener to be notified of band selections.
Definition equalizer_response.h:278
void initReverb(const vital::output_map &mono_modulations)
Initializes the Equalizer response for a reverb's shelving EQ.
Definition equalizer_response.cpp:84
void setDbBufferRatio(float ratio)
Sets the ratio of the dB range used as buffer.
Definition equalizer_response.h:266
virtual void init(OpenGlWrapper &open_gl) override
Initializes OpenGL resources.
Definition equalizer_response.cpp:91
void setBandSliders(SynthSlider *cutoff, SynthSlider *resonance, SynthSlider *gain)
Assigns the sliders for the mid (band) band.
Definition equalizer_response.cpp:510
void setSelectedBand(int selected_band)
Sets the currently selected band.
Definition equalizer_response.cpp:534
void computeFilterCoefficients()
Computes the filter coefficients based on current slider values and states.
Definition equalizer_response.cpp:434
virtual void render(OpenGlWrapper &open_gl, bool animate) override
Renders the EQ response and control points.
Definition equalizer_response.cpp:189
Point< float > getLowPosition()
Returns the current low band control point position in component coordinates.
Definition equalizer_response.cpp:401
void drawResponse(OpenGlWrapper &open_gl, int index)
Draws the response of the filters.
Definition equalizer_response.cpp:122
Point< float > getHighPosition()
Returns the current high band control point position in component coordinates.
Definition equalizer_response.cpp:424
Point< float > getBandPosition()
Returns the current mid (band) control point position in component coordinates.
Definition equalizer_response.cpp:411
virtual void resized() override
Called when the component is resized.
Definition open_gl_component.cpp:121
A component for rendering lines with optional filling and boost effects using OpenGL.
Definition open_gl_line_renderer.h:16
A component for rendering multiple quads using OpenGL, with customizable colors, rounding,...
Definition open_gl_multi_quad.h:16
A convenience class for a single quad rendered via OpenGL.
Definition open_gl_multi_quad.h:447
Listener interface for receiving slider events such as mouse interactions, modulation changes,...
Definition synth_slider.h:347
A specialized slider with extended functionality for modulation, parameter control,...
Definition synth_slider.h:314
A state-variable filter (SVF) implementation, supporting multiple filter types (12/24 dB,...
Definition digital_svf.h:17
Holds the parameters necessary to configure a SynthFilter at runtime.
Definition synth_filter.h:92
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
Holds and manages a buffer of samples (poly_float) for a Processor's output.
Definition processor.h:35
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Declares the SynthSlider and related classes, providing various slider styles and functionality in th...