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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user