1s.quit 2s.boot 3 4// Compare various simple nonlinear functions (clip, wrap..) and 5// their oversampled versions. 6// Sweep the input sinewave with the mouse and listen for the aliasing 7 8{ Clipper4.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 9{ Clipper8.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 10{ SinOsc.ar(MouseX.kr(200, 5000), 0, 2).clip2(0.2) }.play 11 12{ OSWrap4.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 13{ OSWrap8.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 14{ SinOsc.ar(MouseX.kr(200, 5000), 0, 2).wrap2(0.2) }.play 15 16{ OSFold4.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 17{ OSFold8.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), -0.2, 0.2) }.play 18{ SinOsc.ar(MouseX.kr(200, 5000), 0, 2).fold2(0.2) }.play 19 20{ OSTrunc4.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), 0.2) }.play 21{ OSTrunc8.ar(SinOsc.ar(MouseX.kr(200, 5000), 0, 2), 0.2) }.play 22{ SinOsc.ar(MouseX.kr(200, 5000)).trunc(0.2) }.play