juce-MultiStepEnvelopeGenerator
juce-MultiStepEnvelopeGenerator copied to clipboard
Incorrect interpolation in FunctionTable
Hey there,
thanks for providing this great example of a multi stage envelope! I noticed you made a small mistake in your interpolation function, it came up by using small table sizes. The scaled x value to acquire the lower and upper bound read index should be calculated by:
float readIndex = phase * (nTableSize - 1); and by this eliminating the upper bound check if (rj >= nTableSize) rj = nTableSize - 1;.
Thanks again!
Well spotted, thank you!