51 if (t < T{0}) t = T{0};
52 else if (t > T{1}) t = T{1};
53 return t * t * (T{3} - T{2} * t);
62 T& old_gain, T& new_gain)
noexcept {
66 constexpr T kHalfPi = T{1.57079632679489661923};
67 const T theta =
u * kHalfPi;
68 old_gain = std::cos(theta);
69 new_gain = std::sin(theta);
Definition additive_bank.hpp:218
CrossfadeGainLaw
The old→new gain split applied to a shaped progress u ∈ [0,1].
Definition crossfade.hpp:41
@ EqualPower
(cos(u·π/2), sin(u·π/2)) — power sum == 1.
Definition crossfade.hpp:43
@ EqualGain
(1−u, u) — amplitude sum == 1.
Definition crossfade.hpp:42
constexpr T crossfade_smoothstep(T t) noexcept
Smoothstep progress shaping: cubic 3u²−2u³ with zero slope at both ends, clamped to [0,...
Definition crossfade.hpp:50
@ u
Definition formant_filter_bank.hpp:20
void crossfade_gains(T u, CrossfadeGainLaw law, T &old_gain, T &new_gain) noexcept
Old/new blend gains for an ALREADY-SHAPED progress u (the caller applies any smoothstep/clamp first).
Definition crossfade.hpp:61