Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
Loading...
Searching...
No Matches
ts::EqPresets Struct Reference

The four-band EQ block's coefficient tables — two bands, two corner frequencies each. More...

#include <tabulasonora/effect_presets.hpp>

Public Member Functions

const EqBandlow_band (int frequency, int gain) const noexcept
 The band for a SysEx frequency and gain pair, clamped the way the engine clamps them.
const EqBandhigh_band (int frequency, int gain) const noexcept

Public Attributes

std::array< std::array< EqBand, gain_count >, 2 > low {}
 [frequency][gain byte − 0x34].
std::array< std::array< EqBand, gain_count >, 2 > high {}

Static Public Attributes

static constexpr int gain_count = 25
 Gain settings per band: 40 02 01 and 40 02 03 accept 0x34–0x4C, which is −12…+12 dB.
static constexpr int gain_base = 0x34
 The lowest gain byte, subtracted to index the tables.
static constexpr std::array< int, 2 > low_frequencies {200, 400}
 Corner frequencies each band can be switched between, in Hz, for reporting only — the coefficients carry the real thing.
static constexpr std::array< int, 2 > high_frequencies {3000, 6000}

Detailed Description

The four-band EQ block's coefficient tables — two bands, two corner frequencies each.

The engine computes nothing here: every gain setting is a stored row, and the SysEx values index straight into them. The corner is not a parameter but a choice of table, which is why 40 02 00 and 40 02 02 take 0 or 1 and nothing else.

Member Function Documentation

◆ low_band()

const EqBand & ts::EqPresets::low_band ( int frequency,
int gain ) const
nodiscardnoexcept

The band for a SysEx frequency and gain pair, clamped the way the engine clamps them.

◆ high_band()

const EqBand & ts::EqPresets::high_band ( int frequency,
int gain ) const
nodiscardnoexcept

Member Data Documentation

◆ gain_count

int ts::EqPresets::gain_count = 25
staticconstexpr

Gain settings per band: 40 02 01 and 40 02 03 accept 0x34–0x4C, which is −12…+12 dB.

◆ gain_base

int ts::EqPresets::gain_base = 0x34
staticconstexpr

The lowest gain byte, subtracted to index the tables.

◆ low_frequencies

std::array<int, 2> ts::EqPresets::low_frequencies {200, 400}
staticconstexpr

Corner frequencies each band can be switched between, in Hz, for reporting only — the coefficients carry the real thing.

◆ high_frequencies

std::array<int, 2> ts::EqPresets::high_frequencies {3000, 6000}
staticconstexpr

◆ low

std::array<std::array<EqBand, gain_count>, 2> ts::EqPresets::low {}

[frequency][gain byte − 0x34].

◆ high

std::array<std::array<EqBand, gain_count>, 2> ts::EqPresets::high {}

The documentation for this struct was generated from the following file: