|
Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
|
What one source contributes, once its depths have been scaled by its current amount. More...
#include <tabulasonora/control_matrix.hpp>
Public Member Functions | |
| constexpr int | at (Destination destination) const noexcept |
| One field, chosen by destination. | |
| constexpr Modulation & | operator+= (const Modulation &other) noexcept |
| Accumulates another source's contribution. | |
Public Attributes | |
| int | pitch = 0 |
| added to the voice's pitch | |
| int | tvf_cutoff = 0 |
| added to the cutoff sum | |
| int | amplitude = 0 |
| scales the voice's level | |
| int | lfo1_rate = 0 |
| int | lfo1_pitch = 0 |
| int | lfo1_tvf = 0 |
| int | lfo1_tva = 0 |
| int | lfo2_rate = 0 |
| int | lfo2_pitch = 0 |
| int | lfo2_tvf = 0 |
| int | lfo2_tva = 0 |
What one source contributes, once its depths have been scaled by its current amount.
Named fields rather than an array, deliberately. The engine's own output is eleven shorts in an order that is neither the SysEx order nor the storage order — within each LFO group it runs TVA, TVF, pitch, the reverse of how the messages arrive. Handing consumers an index would hand them that permutation to get wrong; handing them names retires it here.
|
inlinenodiscardconstexprnoexcept |
One field, chosen by destination.
Keyed by the enum rather than by an integer, which is the whole of what makes it safe: the permutation the fields exist to retire is a numeric one, and a caller who cannot supply a number cannot reintroduce it. Summing eleven destinations in a loop needs this; reaching for a single one should still use the field.
|
inlineconstexprnoexcept |
Accumulates another source's contribution.
The engine keeps one running sum a destination and every source adds into it before anything is clamped, so the sources have to be summed raw — adding scaled results instead would clamp each source separately and let the total escape the rail.
| int ts::ControlMatrix::Modulation::pitch = 0 |
added to the voice's pitch
| int ts::ControlMatrix::Modulation::tvf_cutoff = 0 |
added to the cutoff sum
| int ts::ControlMatrix::Modulation::amplitude = 0 |
scales the voice's level
| int ts::ControlMatrix::Modulation::lfo1_rate = 0 |
| int ts::ControlMatrix::Modulation::lfo1_pitch = 0 |
| int ts::ControlMatrix::Modulation::lfo1_tvf = 0 |
| int ts::ControlMatrix::Modulation::lfo1_tva = 0 |
| int ts::ControlMatrix::Modulation::lfo2_rate = 0 |
| int ts::ControlMatrix::Modulation::lfo2_pitch = 0 |
| int ts::ControlMatrix::Modulation::lfo2_tvf = 0 |
| int ts::ControlMatrix::Modulation::lfo2_tva = 0 |