Vital
Loading...
Searching...
No Matches
phaser_section.cpp
Go to the documentation of this file.
1#include "phaser_section.h"
2
3#include "skin.h"
4#include "shaders.h"
5#include "fonts.h"
6#include "synth_strings.h"
7#include "synth_button.h"
9#include "synth_slider.h"
10#include "tempo_selector.h"
11#include "text_look_and_feel.h"
12
14 OpenGlLineRenderer(kResolution), phaser_filter_(false) {
15 parent_ = nullptr;
16 active_ = true;
17 mix_ = 1.0f;
18
19 setFill(true);
20 setFillCenter(-1.0f);
21
22 cutoff_slider_ = nullptr;
23 resonance_slider_ = nullptr;
24 blend_slider_ = nullptr;
25 mix_slider_ = nullptr;
26
27 line_data_ = std::make_unique<float[]>(2 * kResolution);
28 line_buffer_ = 0;
29 response_buffer_ = 0;
30 vertex_array_object_ = 0;
31
32 for (int i = 0; i < kResolution; ++i) {
33 float t = i / (kResolution - 1.0f);
34 line_data_[2 * i] = 2.0f * t - 1.0f;
35 line_data_[2 * i + 1] = 0.0f;
36 }
37
38 filter_mix_output_ = mono_modulations.at("phaser_dry_wet");
39 resonance_output_ = mono_modulations.at("phaser_feedback");
40 blend_output_ = mono_modulations.at("phaser_blend");
41
42 blend_setting_ = 1.0f;
43
45}
46
48
50 if (parent_ == nullptr)
51 parent_ = findParentComponentOfClass<SynthGuiInterface>();
52
53 if (parent_)
54 phaser_cutoff_ = parent_->getSynth()->getStatusOutput("phaser_cutoff");
55
57
58 const GLchar* varyings[] = { "response_out" };
59 open_gl.context.extensions.glGenVertexArrays(1, &vertex_array_object_);
60 open_gl.context.extensions.glBindVertexArray(vertex_array_object_);
61
62 GLsizeiptr data_size = static_cast<GLsizeiptr>(kResolution * sizeof(float));
63 open_gl.context.extensions.glGenBuffers(1, &line_buffer_);
64 open_gl.context.extensions.glBindBuffer(GL_ARRAY_BUFFER, line_buffer_);
65 open_gl.context.extensions.glBufferData(GL_ARRAY_BUFFER, 2 * data_size, line_data_.get(), GL_STATIC_DRAW);
66
67 open_gl.context.extensions.glGenBuffers(1, &response_buffer_);
68 open_gl.context.extensions.glBindBuffer(GL_ARRAY_BUFFER, response_buffer_);
69 open_gl.context.extensions.glBufferData(GL_ARRAY_BUFFER, data_size, nullptr, GL_STATIC_READ);
70
71 OpenGLShaderProgram* shader = open_gl.shaders->getShaderProgram(Shaders::kPhaserFilterResponseVertex,
72 Shaders::kColorFragment, varyings);
73 response_shader_.shader = shader;
74
75 shader->use();
76 response_shader_.position = getAttribute(open_gl, *shader, "position");
77
78 response_shader_.mix = getUniform(open_gl, *shader, "mix");
79 response_shader_.midi_cutoff = getUniform(open_gl, *shader, "midi_cutoff");
80 response_shader_.resonance = getUniform(open_gl, *shader, "resonance");
81 response_shader_.db24 = getUniform(open_gl, *shader, "db24");
82
83 for (int s = 0; s < FilterResponseShader::kMaxStages; ++s) {
84 String stage = String("stage") + String(s);
85 response_shader_.stages[s] = getUniform(open_gl, *shader, stage.toRawUTF8());
86 }
87}
88
89void PhaserResponse::render(OpenGlWrapper& open_gl, bool animate) {
90 drawFilterResponse(open_gl, animate);
91 renderCorners(open_gl, animate);
92}
93
96
97 open_gl.context.extensions.glDeleteBuffers(1, &line_buffer_);
98 open_gl.context.extensions.glDeleteBuffers(1, &response_buffer_);
99
100 vertex_array_object_ = 0;
101 line_buffer_ = 0;
102 response_buffer_ = 0;
103
104 response_shader_.shader = nullptr;
105 response_shader_.position = nullptr;
106
107 response_shader_.mix = nullptr;
108 response_shader_.midi_cutoff = nullptr;
109 response_shader_.resonance = nullptr;
110 response_shader_.db24 = nullptr;
111
112 for (int s = 0; s < FilterResponseShader::kMaxStages; ++s)
113 response_shader_.stages[s] = nullptr;
114}
115
116vital::poly_float PhaserResponse::getOutputTotal(const vital::Output* output, vital::poly_float default_value) {
117 if (output && output->owner->enabled())
118 return output->trigger_value;
119 return default_value;
120}
121
122void PhaserResponse::setupFilterState() {
123 filter_state_.midi_cutoff = phaser_cutoff_->value();
124 mix_ = getOutputTotal(filter_mix_output_, mix_slider_->getValue());
125 filter_state_.resonance_percent = getOutputTotal(resonance_output_, resonance_slider_->getValue());
126 filter_state_.pass_blend = getOutputTotal(blend_output_, blend_slider_->getValue());
127}
128
129void PhaserResponse::loadShader(int index) {
130 phaser_filter_.setupFilter(filter_state_);
131 response_shader_.shader->use();
132 response_shader_.midi_cutoff->set(filter_state_.midi_cutoff[index]);
133 response_shader_.resonance->set(phaser_filter_.getResonance()[index]);
134 response_shader_.db24->set(filter_state_.style != vital::SynthFilter::k12Db ? 1.0f : 0.0f);
135
136 response_shader_.stages[0]->set(phaser_filter_.getPeak1Amount()[index]);
137 response_shader_.stages[1]->set(phaser_filter_.getPeak3Amount()[index]);
138 response_shader_.stages[2]->set(phaser_filter_.getPeak5Amount()[index]);
139 response_shader_.mix->set(mix_[index]);
140}
141
142void PhaserResponse::bind(OpenGLContext& open_gl_context) {
143 open_gl_context.extensions.glBindVertexArray(vertex_array_object_);
144 open_gl_context.extensions.glBindBuffer(GL_ARRAY_BUFFER, line_buffer_);
145
146 OpenGLShaderProgram::Attribute* position = response_shader_.position.get();
147 open_gl_context.extensions.glVertexAttribPointer(position->attributeID, 2, GL_FLOAT,
148 GL_FALSE, 2 * sizeof(float), nullptr);
149 open_gl_context.extensions.glEnableVertexAttribArray(position->attributeID);
150
151 open_gl_context.extensions.glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, response_buffer_);
152}
153
154void PhaserResponse::unbind(OpenGLContext& open_gl_context) {
155 OpenGLShaderProgram::Attribute* position = response_shader_.position.get();
156 open_gl_context.extensions.glDisableVertexAttribArray(position->attributeID);
157 open_gl_context.extensions.glBindBuffer(GL_ARRAY_BUFFER, 0);
158 open_gl_context.extensions.glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, 0);
159}
160
161void PhaserResponse::renderLineResponse(OpenGlWrapper& open_gl) {
162 open_gl.context.extensions.glBeginTransformFeedback(GL_POINTS);
163 glDrawArrays(GL_POINTS, 0, kResolution);
164 open_gl.context.extensions.glEndTransformFeedback();
165
166 void* buffer = open_gl.context.extensions.glMapBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
167 kResolution * sizeof(float), GL_MAP_READ_BIT);
168
169 float* response_data = (float*)buffer;
170 float x_adjust = getWidth();
171 float y_adjust = getHeight() / 2.0f;
172 for (int i = 0; i < kResolution; ++i) {
173 setXAt(i, x_adjust * i / (kResolution - 1.0f));
174 setYAt(i, y_adjust * (1.0 - response_data[i]));
175 }
176
177 open_gl.context.extensions.glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER);
178}
179
180void PhaserResponse::drawFilterResponse(OpenGlWrapper& open_gl, bool animate) {
181 setupFilterState();
182 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
183 glEnable(GL_BLEND);
184 setViewPort(open_gl);
185
186 Colour color_line = findColour(Skin::kWidgetPrimary2, true);
187 Colour color_fill_to = findColour(Skin::kWidgetSecondary2, true);
188 float fill_fade = findValue(Skin::kWidgetFillFade);
189 Colour color_fill_from = color_fill_to.withMultipliedAlpha(1.0f - fill_fade);
190
193
194 if (active_) {
195 bind(open_gl.context);
196 loadShader(1);
197 renderLineResponse(open_gl);
198
199 setFillColors(color_fill_from, color_fill_to);
200 setColor(color_line);
201 OpenGlLineRenderer::render(open_gl, animate);
202 }
203 glEnable(GL_BLEND);
204
205 color_line = findColour(Skin::kWidgetPrimary1, true);
206 color_fill_to = findColour(Skin::kWidgetSecondary1, true);
207 if (!active_) {
208 color_line = findColour(Skin::kWidgetPrimaryDisabled, true);
209 color_fill_to = findColour(Skin::kWidgetSecondaryDisabled, true);
210 }
211 color_fill_from = color_fill_to.withMultipliedAlpha(1.0f - fill_fade);
212
213 bind(open_gl.context);
214 loadShader(0);
215 renderLineResponse(open_gl);
216
217 setFillColors(color_fill_from, color_fill_to);
218 setColor(color_line);
219 OpenGlLineRenderer::render(open_gl, animate);
220
221 unbind(open_gl.context);
222 glDisable(GL_BLEND);
223 checkGlError();
224}
225
226PhaserSection::PhaserSection(String name, const vital::output_map& mono_modulations) : SynthSection(name) {
227 static const double TEMPO_DRAG_SENSITIVITY = 0.3;
228
229 phase_offset_ = std::make_unique<SynthSlider>("phaser_phase_offset");
230 addSlider(phase_offset_.get());
231 phase_offset_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
232
233 mod_depth_ = std::make_unique<SynthSlider>("phaser_mod_depth");
234 addSlider(mod_depth_.get());
235 mod_depth_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
236
237 center_ = std::make_unique<SynthSlider>("phaser_center");
238 addSlider(center_.get());
239 center_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
240 setSliderHasHzAlternateDisplay(center_.get());
241
242 frequency_ = std::make_unique<SynthSlider>("phaser_frequency");
243 addSlider(frequency_.get());
244 frequency_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
245 frequency_->setLookAndFeel(TextLookAndFeel::instance());
246
247 tempo_ = std::make_unique<SynthSlider>("phaser_tempo");
248 addSlider(tempo_.get());
249 tempo_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
250 tempo_->setLookAndFeel(TextLookAndFeel::instance());
251 tempo_->setSensitivity(TEMPO_DRAG_SENSITIVITY);
252
253 sync_ = std::make_unique<TempoSelector>("phaser_sync");
254 addSlider(sync_.get());
255 sync_->setSliderStyle(Slider::LinearBar);
256 sync_->setTempoSlider(tempo_.get());
257 sync_->setFreeSlider(frequency_.get());
258
259 feedback_ = std::make_unique<SynthSlider>("phaser_feedback");
260 addSlider(feedback_.get());
261 feedback_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
262
263 blend_ = std::make_unique<SynthSlider>("phaser_blend");
264 addSlider(blend_.get());
265 blend_->setSliderStyle(Slider::LinearBar);
266 blend_->snapToValue(true, 1.0);
267 blend_->setBipolar();
268 blend_->setPopupPlacement(BubbleComponent::above);
269
270 dry_wet_ = std::make_unique<SynthSlider>("phaser_dry_wet");
271 addSlider(dry_wet_.get());
272 dry_wet_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
273
274 phaser_response_ = std::make_unique<PhaserResponse>(mono_modulations);
275 phaser_response_->setCutoffSlider(center_.get());
276 phaser_response_->setResonanceSlider(feedback_.get());
277 phaser_response_->setBlendSlider(blend_.get());
278 phaser_response_->setMixSlider(dry_wet_.get());
279 addOpenGlComponent(phaser_response_.get());
280
281 on_ = std::make_unique<SynthButton>("phaser_on");
282 addButton(on_.get());
283 setActivator(on_.get());
285}
286
288
291
292 Rectangle<int> frequency_bounds(tempo_->getX(), tempo_->getY(),
293 sync_->getRight() - tempo_->getX(), tempo_->getHeight());
294 drawTextComponentBackground(g, frequency_bounds, true);
295 drawTempoDivider(g, sync_.get());
296
297 setLabelFont(g);
298 drawLabel(g, TRANS("FREQUENCY"), frequency_bounds, true);
299 drawLabelForComponent(g, TRANS("FEEDBACK"), feedback_.get());
300 drawLabelForComponent(g, TRANS("MIX"), dry_wet_.get());
301 drawLabelForComponent(g, TRANS("CENTER"), center_.get());
302 drawLabelForComponent(g, TRANS("DEPTH"), mod_depth_.get());
303 drawLabelForComponent(g, TRANS("OFFSET"), phase_offset_.get());
304}
305
307 int title_width = getTitleWidth();
308 int widget_margin = findValue(Skin::kWidgetMargin);
309 Rectangle<int> bounds = getLocalBounds().withLeft(title_width);
310 Rectangle<int> knobs_area = getDividedAreaBuffered(bounds, 3, 2, widget_margin);
311 Rectangle<int> tempo_area = getDividedAreaUnbuffered(bounds, 4, 0, widget_margin);
312
313 int section_height = getKnobSectionHeight();
314
315 int knobs_x = knobs_area.getX();
316 int knob_y2 = section_height - widget_margin;
317 int tempo_x = tempo_area.getX();
318 int tempo_width = tempo_area.getWidth();
319
320 int widget_x = tempo_x + tempo_width + widget_margin;
321 int widget_width = knobs_x - widget_x;
322
323 placeTempoControls(tempo_x, widget_margin, tempo_width, section_height - 2 * widget_margin,
324 frequency_.get(), sync_.get());
325 tempo_->setBounds(frequency_->getBounds());
326 tempo_->setModulationArea(frequency_->getModulationArea());
327
328 phase_offset_->setBounds(title_width + widget_margin, knob_y2, tempo_width, section_height - widget_margin);
329
330 blend_->setBounds(widget_x - widget_margin, widget_margin - getSliderOverlap(),
331 widget_width + 2 * widget_margin, getSliderWidth());
332 int widget_y = blend_->getBottom() - getSliderOverlapWithSpace();
333 phaser_response_->setBounds(widget_x, widget_y, widget_width, getHeight() - widget_y - widget_margin);
334
335 placeKnobsInArea(Rectangle<int>(knobs_x, 0, knobs_area.getWidth(), section_height),
336 { feedback_.get(), dry_wet_.get() });
337
338 placeKnobsInArea(Rectangle<int>(knobs_x, knob_y2, knobs_area.getWidth(), section_height),
339 { center_.get(), mod_depth_.get() });
340
342}
343
344void PhaserSection::setActive(bool active) {
346 phaser_response_->setActive(active);
347}
static bool setViewPort(Component *component, Rectangle< int > bounds, OpenGlWrapper &open_gl)
Sets the OpenGL viewport to match a specified rectangle within a component.
Definition open_gl_component.cpp:42
static std::unique_ptr< OpenGLShaderProgram::Attribute > getAttribute(const OpenGlWrapper &open_gl, const OpenGLShaderProgram &program, const char *name)
Retrieves an attribute from the shader program if it exists.
Definition open_gl_component.h:79
void renderCorners(OpenGlWrapper &open_gl, bool animate, Colour color, float rounding)
Renders the corner shapes using the given color and rounding amount.
Definition open_gl_component.cpp:153
force_inline void checkGlError()
Checks for and asserts that there are no OpenGL errors.
Definition open_gl_component.h:231
float findValue(Skin::ValueId value_id)
Finds a float value from the skin associated with this component's parent.
Definition open_gl_component.cpp:173
static std::unique_ptr< OpenGLShaderProgram::Uniform > getUniform(const OpenGlWrapper &open_gl, const OpenGLShaderProgram &program, const char *name)
Retrieves a uniform from the shader program if it exists.
Definition open_gl_component.h:64
A component for rendering lines with optional filling and boost effects using OpenGL.
Definition open_gl_line_renderer.h:16
virtual void init(OpenGlWrapper &open_gl) override
Initializes OpenGL resources for rendering the line.
Definition open_gl_line_renderer.cpp:78
virtual void destroy(OpenGlWrapper &open_gl) override
Destroys OpenGL resources allocated by this line renderer.
Definition open_gl_line_renderer.cpp:468
force_inline void setFillCenter(float fill_center)
Sets the vertical center for the fill area.
Definition open_gl_line_renderer.h:138
virtual void render(OpenGlWrapper &open_gl, bool animate) override
Renders the line using OpenGL.
Definition open_gl_line_renderer.cpp:464
force_inline void setYAt(int index, float val)
Sets the y-coordinate of a point, marking data as dirty.
Definition open_gl_line_renderer.h:98
force_inline void setFill(bool fill)
Enables or disables filling below the line.
Definition open_gl_line_renderer.h:124
force_inline void setXAt(int index, float val)
Sets the x-coordinate of a point, marking data as dirty.
Definition open_gl_line_renderer.h:105
force_inline void setFillColors(Colour fill_color_from, Colour fill_color_to)
Sets a gradient fill from one color to another.
Definition open_gl_line_renderer.h:132
force_inline void setLineWidth(float width)
Sets the line width in pixels.
Definition open_gl_line_renderer.h:66
force_inline void setColor(Colour color)
Sets the line color.
Definition open_gl_line_renderer.h:63
void init(OpenGlWrapper &open_gl) override
Initializes the OpenGL context and shaders for rendering the phaser response.
Definition phaser_section.cpp:49
virtual ~PhaserResponse()
Destructor.
Definition phaser_section.cpp:47
PhaserResponse(const vital::output_map &mono_modulations)
Constructs a PhaserResponse object.
Definition phaser_section.cpp:13
void destroy(OpenGlWrapper &open_gl) override
Cleans up the OpenGL resources used by this class.
Definition phaser_section.cpp:94
static constexpr int kDefaultVisualSampleRate
The default visual sample rate used for filter calculations.
Definition phaser_section.h:27
static constexpr int kResolution
The resolution of the frequency response drawing.
Definition phaser_section.h:25
void render(OpenGlWrapper &open_gl, bool animate) override
Renders the phaser response curve.
Definition phaser_section.cpp:89
void resized() override
Called when the component is resized.
Definition phaser_section.cpp:306
PhaserSection(String name, const vital::output_map &mono_modulations)
Constructs a PhaserSection.
Definition phaser_section.cpp:226
virtual ~PhaserSection()
Destructor.
Definition phaser_section.cpp:287
void setActive(bool active) override
Sets the active state of the phaser section.
Definition phaser_section.cpp:344
void paintBackground(Graphics &g) override
Paints the background of the phaser section, including labels and backgrounds.
Definition phaser_section.cpp:289
@ kPhaserFilterResponseVertex
Definition shaders.h:43
@ kColorFragment
Definition shaders.h:63
OpenGLShaderProgram * getShaderProgram(VertexShader vertex_shader, FragmentShader fragment_shader, const GLchar **varyings=nullptr)
Retrieves or creates an OpenGLShaderProgram from a given vertex and fragment shader pair.
Definition shaders.cpp:953
@ kWidgetMargin
Definition skin.h:103
@ kWidgetLineWidth
Definition skin.h:105
@ kWidgetFillCenter
Definition skin.h:107
@ kWidgetFillFade
Definition skin.h:108
@ kWidgetPrimaryDisabled
Definition skin.h:167
@ kWidgetPrimary2
Definition skin.h:166
@ kWidgetPrimary1
Definition skin.h:165
@ kWidgetSecondary1
Definition skin.h:168
@ kWidgetSecondaryDisabled
Definition skin.h:170
@ kWidgetSecondary2
Definition skin.h:169
@ kPhaser
Definition skin.h:53
const vital::StatusOutput * getStatusOutput(const std::string &name)
Retrieves a status output by name.
Definition synth_base.cpp:262
SynthBase * getSynth()
Returns the SynthBase instance this interface is managing.
Definition synth_gui_interface.h:85
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
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.
Definition synth_section.cpp:776
void drawTextComponentBackground(Graphics &g, Rectangle< int > bounds, bool extend_to_label)
Draws a background for a text component area.
Definition synth_section.cpp:319
float getSliderWidth()
Definition synth_section.cpp:637
void placeKnobsInArea(Rectangle< int > area, std::vector< Component * > knobs)
Definition synth_section.cpp:601
void addSlider(SynthSlider *slider, bool show=true, bool listen=true)
Definition synth_section.cpp:445
void drawLabel(Graphics &g, String text, Rectangle< int > component_bounds, bool text_component=false)
Draws a label text below a component.
Definition synth_section.cpp:789
void drawTempoDivider(Graphics &g, Component *sync)
Draws a divider line for tempo-related controls.
Definition synth_section.cpp:339
virtual void resized() override
Called when the component is resized. Arranges layout of child components.
Definition synth_section.cpp:35
void placeTempoControls(int x, int y, int width, int height, SynthSlider *tempo, SynthSlider *sync)
Definition synth_section.cpp:584
virtual void setActive(bool active)
Sets the active state of this section and sub-sections.
Definition synth_section.cpp:806
void drawLabelForComponent(Graphics &g, String text, Component *component, bool text_component=false)
Draws a label for a given component.
Definition synth_section.h:548
void setLabelFont(Graphics &g)
Sets the Graphics context font and color for labels.
Definition synth_section.cpp:740
float getSliderOverlap()
Definition synth_section.cpp:641
void addButton(OpenGlToggleButton *button, bool show=true)
Definition synth_section.cpp:428
float findValue(Skin::ValueId value_id) const
Finds a value in the skin overrides or from the parent if not found locally.
Definition synth_section.cpp:18
virtual void paintBackground(Graphics &g)
Paints the background of the section. Calls paintContainer, heading, knobs, children.
Definition synth_section.cpp:77
float getKnobSectionHeight()
Definition synth_section.cpp:633
void setActivator(SynthButton *activator)
Definition synth_section.cpp:504
void addOpenGlComponent(OpenGlComponent *open_gl_component, bool to_beginning=false)
Definition synth_section.cpp:489
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.
Definition synth_section.cpp:768
float getSliderOverlapWithSpace()
Definition synth_section.cpp:648
void setSliderHasHzAlternateDisplay(SynthSlider *slider)
Definition synth_section.cpp:410
float getTitleWidth()
Definition synth_section.cpp:629
void setSkinOverride(Skin::SectionOverride skin_override)
Definition synth_section.h:303
static TextLookAndFeel * instance()
Singleton instance access.
Definition text_look_and_feel.h:106
poly_float getPeak1Amount()
Gets the current peak1 (lowest peak cluster) mix amount.
Definition phaser_filter.h:120
poly_float getResonance()
Gets the current resonance value.
Definition phaser_filter.h:108
poly_float getPeak3Amount()
Gets the current peak3 (second peak cluster) mix amount.
Definition phaser_filter.h:126
poly_float getPeak5Amount()
Gets the current peak5 (highest peak cluster) mix amount.
Definition phaser_filter.h:132
void setupFilter(const FilterState &filter_state) override
Sets up the filter parameters (resonance, drive, peaks) based on the FilterState.
Definition phaser_filter.cpp:71
force_inline bool enabled() const
Checks if this Processor is enabled.
Definition processor.h:310
virtual void setSampleRate(int sample_rate)
Updates the sample rate of this Processor (scaled by oversampling).
Definition processor.h:285
force_inline poly_float value() const
Returns the current status value.
Definition synth_module.h:49
poly_float pass_blend
Blend parameter in [0..2], controlling pass type.
Definition synth_filter.h:117
int style
Filter style enum (e.g., k12Db, k24Db)
Definition synth_filter.h:116
poly_float midi_cutoff
MIDI note-based cutoff value.
Definition synth_filter.h:110
poly_float resonance_percent
Resonance parameter in [0..1].
Definition synth_filter.h:112
@ k12Db
Definition synth_filter.h:75
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
OpenGLContext & context
The OpenGLContext for current rendering.
Definition shaders.h:181
Shaders * shaders
Pointer to the Shaders instance providing compiled shaders.
Definition shaders.h:182
Holds and manages a buffer of samples (poly_float) for a Processor's output.
Definition processor.h:35
Processor * owner
Owning processor.
Definition processor.h:112
poly_float trigger_value
Trigger values for voices.
Definition processor.h:116
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Declares classes for OpenGL-based buttons used in the Vital synth UI.
Declares the SynthSlider and related classes, providing various slider styles and functionality in th...
Declares the TempoSelector class, a specialized slider for selecting tempo-related modes.