|
Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
|
The engine's pan law: an exact 128-entry table, not a computed curve. More...
#include <tabulasonora/interpolator.hpp>
Public Member Functions | |
| PanLaw (const TableSet &tables) | |
| Creates the pan law over a loaded table set, which must outlive it. | |
| std::pair< double, double > | gains (int pan) const noexcept |
| The left and right gains for a pan position, 0 to 127, with 64 centred. | |
Static Public Attributes | |
| static constexpr int | centre = 64 |
| Pan value that sounds centred. | |
The engine's pan law: an exact 128-entry table, not a computed curve.
Left reads T[127 - p] and right reads T[p - 1], so both land on index 63 at the centre and pan 64 is exactly symmetric at 75/127 ≈ 0.5906 — neither the 0.707 of a constant-power law nor the 0.5 of a linear one. Recovered by sweeping the controller through the engine and reading per-channel RMS, and it reproduces that sweep to within 0.00037.
|
inlineexplicit |
Creates the pan law over a loaded table set, which must outlive it.
|
nodiscardnoexcept |
The left and right gains for a pan position, 0 to 127, with 64 centred.
Pan 0 is fully left: the right channel is silent, not merely attenuated.
|
staticconstexpr |
Pan value that sounds centred.