Inject a shaped bump. Multiple triggers per frame accumulate additively.
53 {
54 if (
width <= 0.0f || amplitude == 0.0f ||
mSize == 0) {
55 return;
56 }
57 const float halfWidth =
width * 0.5f;
60 static_cast<int>(
fl::ceilf(center + halfWidth)));
61 for (int i = iStart; i <= iEnd; ++i) {
62 float t = (
static_cast<float>(i) - (center - halfWidth)) /
width;
64 float shaped = 0.0f;
65 switch (shape) {
68 break;
70 float u = (
t - 0.5f) / 0.2f;
72 break;
73 }
74 }
76 }
77 }
fl::vector< float > mPending
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
float expf(float value) FL_NOEXCEPT
float floorf(float value) FL_NOEXCEPT
float sinf(float value) FL_NOEXCEPT
float ceilf(float value) FL_NOEXCEPT
@ HalfSine
sin(pi * t), smooth bell, zero at edges
@ Gaussian
exp(-0.5 * ((t-0.5)/sigma)^2), tighter peak
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT