y = x * gain + offset, with gain allowed to go negative. More...
#include <mod_tools.hpp>
Public Member Functions | |
| void | set_gain (SampleType g) |
| void | set_offset (SampleType o) |
| SampleType | process (SampleType x) const |
| SampleType | gain () const |
| SampleType | offset () const |
Static Public Attributes | |
| static constexpr SampleType | kMaxGain = SampleType{2} |
| Beyond unity in both directions so one routing can also amplify — a 0..1 envelope driving a +/-2 octave pitch sweep is a single slot. | |
y = x * gain + offset, with gain allowed to go negative.
RT contract: stateless apart from its two settings; everything is audio-thread safe.
USE: this is the depth control for every routing in a patch, and the negative half of its range is the point — inverting an envelope turns a swell into a duck, and inverting an LFO makes a second destination move against the first. offset re-centers: a unipolar envelope becomes bipolar with gain 2, offset -1, and a bipolar LFO becomes unipolar with gain 0.5, offset 0.5.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
Beyond unity in both directions so one routing can also amplify — a 0..1 envelope driving a +/-2 octave pitch sweep is a single slot.