loop: fix the crossfade seam's residual discontinuity, plus six review minors

Normalizes crossfadeWeight over crossfade-1 so the last rendered frame lands at exactly the incoming tap instead of a residual step; corrects the CLAUDE.md invariant and seam test to match. Shares lerpSource/crossfadedSource/maxCrossfade, fixes stale docs/constants, and clears crossfade on the loop-OFF gesture.
This commit is contained in:
2026-07-31 17:59:58 -04:00
parent 0fe4166d7d
commit 3cb22e984d
12 changed files with 172 additions and 83 deletions
+4 -1
View File
@@ -225,7 +225,10 @@ void ReaSamplerEditor::applyMarkers(const SetupMarkers& m) {
loop.start = m.loopStart;
loop.end = m.loopEnd;
params_.loopOverride = loop;
params_.loopCrossfadeFrames = m.crossfade;
// OFF parks the crossfade at 0 too — loadSelection's own clear (a fresh capture has no
// loop to fade) is the same rule; leaving a stale length here would silently re-apply it
// (clamped) the next time a loop is dragged back in.
params_.loopCrossfadeFrames = loop.hasLoop ? m.crossfade : 0;
params_.startPoint = m.start;
}