You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scd/clipping_with_amnt.scd

15 lines
442 B
Plaintext

{
var drive = 2; // change this to see effect
var x = Line.kr(-1, 1, 0.01); // simulate signal range
tanh(x * drive) / tanh(drive)
}.play;
(
{
var drive = 20; // Try values like 1, 5, 10, etc.
var sig = SinOsc.ar(220); // Your basic oscillator
var shaped = tanh(sig * drive) / tanh(drive); // Dividing normalizes it for some reason I don't understand
shaped * 0.1 // scale output to prevent clipping
}.plot;
)