Fix delay ping-pong: real stereo bounce + rename LED label to PINGPONG

This commit is contained in:
Armin 2026-08-13 04:15:42 +02:00
commit 0af34cd89d
2 changed files with 9 additions and 5 deletions

View file

@ -36,10 +36,14 @@ public:
float outR = bufferR[i0] * (1.0f - frac) + bufferR[i1] * frac;
if (pingPong) {
// Classic ping-pong: each channel's echo bounces to the opposite
// channel on the next repeat, so the taps alternate L/R.
bufferL[writePos] = left + outR * feedback;
bufferR[writePos] = right + outL * feedback;
// Classic ping-pong: the (summed) input enters one line and each
// echo is bounced to the opposite channel on the next repeat, so the
// taps alternate L/R. Only the cross-coupled echo is fed into the
// opposite line (never the dry input) so the bounce is audible even
// for a mono source where L == R.
float in = 0.5f * (left + right);
bufferL[writePos] = in + outR * feedback;
bufferR[writePos] = outL * feedback;
} else {
bufferL[writePos] = left + outL * feedback;
bufferR[writePos] = right + outR * feedback;