64 |
*/ |
*/ |
65 |
inline void update(const uint16_t& ExtControlValue) { |
inline void update(const uint16_t& ExtControlValue) { |
66 |
const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... |
const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... |
67 |
const float max = InternalDepth + ExtControlValue * ExtControlDepthCoeff; |
const float max = this->InternalDepth + ExtControlValue * this->ExtControlDepthCoeff; |
68 |
if (RANGE == range_unsigned) { |
if (RANGE == range_unsigned) { |
69 |
normalizer = max / (float) intLimit; |
normalizer = max / (float) intLimit; |
70 |
} else { // signed range |
} else { // signed range |
88 |
* audio output signal |
* audio output signal |
89 |
*/ |
*/ |
90 |
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) { |
91 |
this->InternalDepth = (InternalDepth / 1200.0f) * Max; |
this->InternalDepth = (InternalDepth / 1200.0f) * this->Max; |
92 |
this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * Max; |
this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * this->Max; |
93 |
if (RANGE == range_unsigned) { |
if (RANGE == range_unsigned) { |
94 |
this->InternalDepth *= 2.0f; |
this->InternalDepth *= 2.0f; |
95 |
this->ExtControlDepthCoeff *= 2.0f; |
this->ExtControlDepthCoeff *= 2.0f; |