|
Gin
|
Multi-band graphic equalizer with configurable band count and per-channel control. More...
#include <gin_graphiceq.h>
Public Types | |
| enum | NumBands { Bands5 = 5 , Bands7 = 7 , Bands10 = 10 , Bands15 = 15 , Bands31 = 31 } |
| Number of bands configuration. More... | |
Public Member Functions | |
| GraphicEQ (NumBands bands=Bands31) | |
| Creates a graphic equalizer with the specified number of bands. | |
| void | setSampleRate (double sr) |
| Sets the sample rate for processing. | |
| void | setBlockSize (int blockSize) |
| Sets the maximum block size for processing. | |
| void | setNumChannels (int ch) |
| Sets the number of audio channels. | |
| int | getNumBands () const |
| Gets the number of bands. | |
| int | getNumChannels () const |
| Gets the number of channels. | |
| void | reset () |
| Resets the filter state for all bands and channels. | |
| void | setBandGain (int channel, int band, float gainDb) |
| Sets the gain for a specific band on a specific channel. | |
| float | getBandGain (int channel, int band) const |
| Gets the gain for a specific band on a specific channel. | |
| float | getBandFrequency (int band) const |
| Gets the center frequency for a specific band. | |
| void | setAllBandGains (int channel, const float *gains) |
| Sets the gain for all bands on a specific channel. | |
| void | flatten (int channel) |
| Sets all bands on a specific channel to 0 dB (flat response). | |
| void | flattenAll () |
| Sets all bands on all channels to 0 dB (flat response). | |
| float | getFrequencyResponse (int channel, float frequency) const |
| Gets the frequency response magnitude for a specific channel at a given frequency. | |
| float | getFrequencyResponseDb (int channel, float frequency) const |
| Gets the frequency response in dB for a specific channel at a given frequency. | |
| void | process (juce::AudioSampleBuffer &buffer) |
| Processes an audio buffer through the equalizer. | |
Multi-band graphic equalizer with configurable band count and per-channel control.
GraphicEQ provides a professional graphic equalizer with selectable band counts (5, 7, 10, 15, or 31 bands) using ISO standard center frequencies. Each channel can have independent gain settings, and frequency response can be queried per channel.
Key Features:
Band Configurations:
Usage:
Creates a graphic equalizer with the specified number of bands.
| bands | Number of bands (5, 7, 10, 15, or 31) |
Sets the sample rate for processing.
| sampleRate | Sample rate in Hz |
Sets the maximum block size for processing.
Call this before processing to allocate working buffers.
| blockSize | Maximum number of samples per block |
Sets the number of audio channels.
| ch | Number of channels |
References Filter::bandpass, and Filter::db12.
| int GraphicEQ::getNumBands | ( | ) | const |
Gets the number of bands.
| int GraphicEQ::getNumChannels | ( | ) | const |
Gets the number of channels.
| void GraphicEQ::reset | ( | ) |
Resets the filter state for all bands and channels.
Sets the gain for a specific band on a specific channel.
| channel | Channel index |
| band | Band index |
| gainDb | Gain in decibels (positive = boost, negative = cut) |
Gets the gain for a specific band on a specific channel.
| channel | Channel index |
| band | Band index |
Gets the center frequency for a specific band.
| band | Band index |
Sets the gain for all bands on a specific channel.
| channel | Channel index |
| gains | Array of gain values in dB (must have numBands elements) |
Sets all bands on a specific channel to 0 dB (flat response).
| channel | Channel index |
Referenced by flattenAll().
| void GraphicEQ::flattenAll | ( | ) |
Sets all bands on all channels to 0 dB (flat response).
References flatten().
Gets the frequency response magnitude for a specific channel at a given frequency.
| channel | Channel index |
| frequency | Frequency in Hz |
Referenced by getFrequencyResponseDb().
Gets the frequency response in dB for a specific channel at a given frequency.
| channel | Channel index |
| frequency | Frequency in Hz |
References getFrequencyResponse().
| void GraphicEQ::process | ( | juce::AudioSampleBuffer & | buffer | ) |
Processes an audio buffer through the equalizer.
| buffer | Audio buffer to process in-place |