69 |
* @param ExtControlValue - new external controller value |
* @param ExtControlValue - new external controller value |
70 |
*/ |
*/ |
71 |
inline void update(const uint16_t& ExtControlValue) { |
inline void update(const uint16_t& ExtControlValue) { |
72 |
const float max = InternalDepth + ExtControlValue * ExtControlDepthCoeff; |
const float max = this->InternalDepth + ExtControlValue * this->ExtControlDepthCoeff; |
73 |
if (RANGE == range_unsigned) |
if (RANGE == range_unsigned) |
74 |
normalizer = max * 0.5f; |
normalizer = max * 0.5f; |
75 |
else /* signed range */ |
else /* signed range */ |
90 |
* audio output signal |
* audio output signal |
91 |
*/ |
*/ |
92 |
void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) { |
void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) { |
93 |
this->InternalDepth = (InternalDepth / 1200.0f) * Max; |
this->InternalDepth = (InternalDepth / 1200.0f) * this->Max; |
94 |
this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * Max; |
this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * this->Max; |
95 |
|
|
96 |
c1 = 2.0f * M_PI * Frequency / (float) SampleRate; |
c1 = 2.0f * M_PI * Frequency / (float) SampleRate; |
97 |
c2 = 2.0f * M_PI * Frequency / (float) SampleRate * 3.0f; |
c2 = 2.0f * M_PI * Frequency / (float) SampleRate * 3.0f; |