Is there a way to increase the slope of an asymmetrical sine wave in SC efficiently? The best way I know of to make an asymmetrical sine wave is with SineOscFB
. I can increase the slope of a sine wave with PMOsc
using a modulator of twice the frequency as the carrier and modulation index between 0 and 0.5. But how would I increase the slope of an asymmetrical wave? Would I just have to use a wavetable?
By increasing the slope I mean something like this:
{SinOsc.ar(100, 0, [1, SinOsc.ar(100, 0).squared]) }.plot(0.05, s);
I want to have a sine wave generator where I can change the symmetry, slope, and saturation incidentally (though I used .softclip
instead of .tanh
).
hmmm your plot is SinOsc.ar(100).cubed
maybe you want to vary the exponent:
{SinOsc.ar(100) ** Line.kr(1,4,0.1)}.plot(0.1, s);
Perfect, the answer is basically both of those things! Something like:
(
SynthDef(\test, {
|out=12, freq=440, asym=0, saturation=0, slope=0|
var osc = ((LFSaw.ar(freq, 3).linlin(-1, 1, 0, 1) ** asym.linlin(0,1,1.0,0.5)) * 2pi).cos;
osc = osc ** slope.linlin(0,1,1,4);
osc = (osc * saturation.linlin(0,1,1,10)).softclip;
Out.ar(out, osc);
}).add;
)
(
Synth(\test, [\slope, 1, \asym, 1, \saturation, 1]);
s.scope(1, 12);
)