Contents

class

SushiDSP::GraphicEqualizer

A bank of fixed-centre peaking bands, each ±maximum_gain_db, in series.

Declared in
include/SushiDSP/circuits/GraphicEqualizer.hpp

Static public attributes

static constexpr std::size_t kMaximumBands = 8

Public member functions

GraphicEqualizer(double sample_rate, std::initializer_list< float > centre_frequencies_hz, float band_q, float maximum_gain_db)

Builds the bank with one peaking Q for every band.

Parameters

sample_rate

The rate the bank runs at, in hertz.

centre_frequencies_hz

Band centres, ascending; at most kMaximumBands, extras are ignored.

band_q

Peaking Q shared by every band.

maximum_gain_db

Gain at slider ±1.

GraphicEqualizer(double sample_rate, std::initializer_list< float > centre_frequencies_hz, std::initializer_list< float > band_q, float maximum_gain_db)

Builds the bank with a Q of its own for each band.

Parameters

sample_rate

The rate the bank runs at, in hertz.

centre_frequencies_hz

Band centres, ascending; at most kMaximumBands, extras are ignored.

band_q

One Q per band, same order as the centres; extras are ignored.

maximum_gain_db

Gain at slider ±1.

void set_band(std::size_t band, float position)

Sets one slider.

Parameters

band

Band index; out-of-range indices are ignored.

position

In [-1, 1]; 0 is flat. Values outside are clamped.

float process_sample(float input)

Processes one sample through every band in series. Audio-thread safe.

void reset()

Clears every band's state.

std::size_t band_count() const

Returns the number of active bands.