fold is like bouncing off the edge in pong." (crucial, 2001)

red: input values
blue: minimum and maximum value
green: resulting values
s = Signal.sineFill(512, [0.5, 0.6]).plot; s.collect({ arg item; item.fold(-0.3, 0.5) }).plot; s.collect({ arg item; item.fold(0, 0.9) }).plot;
note
for UGens, use fold2(val), which will fold betwen -val and val:
scope({ SinOsc.ar(200).fold2(MouseX.kr(0, 1)) * 0.2 });
[pong]