mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 23:35:44 +00:00
e770656a74
Linear gain sum dipped in the middle and did not feel like a crossfade even with adequate overlap; legacy main equal-power sin/cos transitions sounded clearly better on hard loud↔loud pairs (stabs, abrupt endings). Engine: replace linear lerp with equal-power power-lerp g(p) = sqrt(start²·(1−p) + end²·p) on both incoming (LinearGainEnvelopeIn) and outgoing (TriggeredFadeOut edge-mix branch). Symmetric 0↔1 matches sin/cos; non-zero endpoints keep scenario A/B. Planner: classify edges as hard/ramp/silent; when both sides are hard, raise transition_dur to at least STANDARD_BLEND_SEC (2 s), capped by sustainable content — ported from main planCrossfadeTransition. Regression tests for stabs at track end and edge kind classification.