O'Reilly logo

Mapping and Visualization with SuperCollider by Marinos Koutsomichalis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Waveshaping

Waveshaping stands for transforming a waveform with respect to some transfer function. Basic waveshaping can be performed using Clip, Fold, Wrap UGens, or their equivalent convenient methods (clip, fold and wrap, respectively):

// convenient waveshaping
{SinOsc.ar(300).clip(-0.5,0.5)}.scope;  // clipping output to +-0.5
{SinOsc.ar(300).fold(-0.5,0.5)}.scope;  // folding output to +-0.5
{SinOsc.ar(300).wrap(-0.5,0.5)}.scope;  // wrapping output to +-0.5

In the following figure, we can see how the original waveform is transformed in each case:

Waveshaping

Only the part of the input waveform that lies outside the given bounds (± 0.5 herein) will be affected. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required