Vital
Loading...
Searching...
No Matches
equalizer_module.h
Go to the documentation of this file.
1#pragma once
2
3#include "synth_module.h"
4
5namespace vital {
6
7 class DigitalSvf;
8
17 public:
22 virtual ~EqualizerModule() { }
23
27 void init() override;
28
32 void hardReset() override;
33
42 void enable(bool enable) override;
43
49 void setSampleRate(int sample_rate) override;
50
61 void processWithInput(const poly_float* audio_in, int num_samples) override;
62
68 Processor* clone() const override { return new EqualizerModule(*this); }
69
76
77 protected:
81
88
89 std::shared_ptr<StereoMemory> audio_memory_;
90
91 JUCE_LEAK_DETECTOR(EqualizerModule)
92 };
93} // namespace vital
A state-variable filter (SVF) implementation, supporting multiple filter types (12/24 dB,...
Definition digital_svf.h:17
A multiband equalizer module that provides low, mid, and high frequency shaping.
Definition equalizer_module.h:16
void setSampleRate(int sample_rate) override
Sets the sample rate of the equalizer and propagates it to all internal filters.
Definition equalizer_module.cpp:141
Value * low_mode_
Determines if the low band uses a shelf or a high-pass filter.
Definition equalizer_module.h:78
void init() override
Initializes the EqualizerModule by creating parameter controls and linking them to internal filters.
Definition equalizer_module.cpp:17
virtual ~EqualizerModule()
Definition equalizer_module.h:22
std::shared_ptr< StereoMemory > audio_memory_
Memory buffer for storing processed audio samples.
Definition equalizer_module.h:89
DigitalSvf * low_shelf_
Low shelf filter for low band mode.
Definition equalizer_module.h:83
EqualizerModule()
Constructs an EqualizerModule.
Definition equalizer_module.cpp:8
DigitalSvf * band_shelf_
Band shelf filter for mid band mode.
Definition equalizer_module.h:85
DigitalSvf * high_pass_
High-pass filter for low band mode.
Definition equalizer_module.h:82
Processor * clone() const override
Clones this EqualizerModule, creating a new instance with identical configuration.
Definition equalizer_module.h:68
void hardReset() override
Resets the equalizer filters to their initial states, clearing any buffer or filter history.
Definition equalizer_module.cpp:111
DigitalSvf * low_pass_
Low-pass filter for high band mode.
Definition equalizer_module.h:86
Value * band_mode_
Determines if the mid band uses a shelf or a notch filter.
Definition equalizer_module.h:79
const StereoMemory * getAudioMemory()
Retrieves the internal stereo memory used for storing audio samples.
Definition equalizer_module.h:75
DigitalSvf * notch_
Notch filter for mid band mode.
Definition equalizer_module.h:84
void enable(bool enable) override
Enables or disables the equalizer module.
Definition equalizer_module.cpp:123
void processWithInput(const poly_float *audio_in, int num_samples) override
Processes an input audio buffer through the equalizer.
Definition equalizer_module.cpp:153
DigitalSvf * high_shelf_
High shelf filter for high band mode.
Definition equalizer_module.h:87
Value * high_mode_
Determines if the high band uses a shelf or a low-pass filter.
Definition equalizer_module.h:80
Base class for all signal-processing units in Vital.
Definition processor.h:212
A specialized MemoryTemplate for two-channel (stereo) audio.
Definition memory.h:216
force_inline poly_float get(poly_float past) const
Retrieves a poly_float of samples from the stereo memory using cubic interpolation.
Definition memory.h:235
A ProcessorRouter that encapsulates a cohesive unit of functionality in the synthesizer.
Definition synth_module.h:129
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
Contains classes and functions used within the Vital synthesizer framework.
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Defines the SynthModule class which extends ProcessorRouter to form a building block of the Vital syn...