|
Shouldn’t sweep trigger the phase? The freq of SineOsc should still be freqSweep and not 0 (?) ( SynthDef.new(\k1mono, { | freqA=800, freqB=50, freqC=40, freqDur1=0.02, freqDur2=0.5, freqC1=(-1), freqC2=(-1), atk=0.001, rel=1, c1=1, c2=(-12), amp=1, pan=0, out=0, ts=1 | var sig, freqSweep, env, trigger= \trig.tr(1); env = EnvGen.ar(Env([0, 0, 1, 0], [0, atk, rel], [c1, c1, c2], 2), trigger, timeScale:ts); freqSweep = EnvGen.ar(Env([freqA, freqA, freqB, freqC],[0,freqDur1,freqDur2],[freqC1,freqC1,freqC2], 1),trigger,timeScale: ts); sig = SinOsc.ar(freqSweep, Sweep.ar(trigger,freqSweep).linlin(freqA,freqC,0,1)); sig = sig * env; sig = Pan2.ar(sig, pan, amp); Out.ar(out, sig); }).add; ) Skickades från E-post för Windows 10 Från: nilswallgren@xxxxxxxxxxx Thanks very much! I like the sound of the sweep even if there is less attack. I guess I have to experiment some more in order to
Have more control over how sweep behaves in order to get that attack. Thanks a lot! Skickades från
E-post för Windows 10 Från: borisklompus@xxxxxxxxxxxxxx Yeah that's true, and your original code was technically correct, but because you aren't resetting the sine wave at the same time as your envelope, you're getting clicks when it's not at a zero crossing.
But for your timbre, what I'm hearing is that you're using the freqA to 'announce' the attack stage of the kick, more than the actual ramp to 1. And your amplitude envelope is doing transient shaping, but otherwise is
effectively at 1. // triggers 2/sec ( // if Trig's dur is set to 0.5 it misses retrigger... { var atk=0.001, rel=1, c1=1, c2=(-12); EnvGen.kr(Env([0, 1, 0], [atk, rel], [c1, c2], 1), Trig.kr(Impulse.kr(2), 0.49)); }.plot(2); ) ( { var atk=0.001, rel=1, c1=1, c2=(-12); EnvGen.kr(Env([0, 1, 0], [atk, rel], [c1, c2], 1), Trig.kr(Impulse.kr(2), 0.499)); }.plot(2); ) ( { var atk=0.001, rel=1, c1=1, c2=(-12); EnvGen.kr(Env([0, 1, 0], [atk, rel], [c1, c2], 1), Trig.kr(Impulse.kr(2), 0.5)); }.plot(2); ) ( { var atk=0.001, rel=1, c1=1, c2=(-12); EnvGen.kr(Env([0, 0, 1, 0], [0, atk, rel], [c1, c1, c2], 2), Trig.kr(Impulse.kr(2), 0.49)); }.plot(2); ) Hmm, and this changes the timbre completely, but syncing the sine osc with the trigger does get rid of the click... I'm using Sweep to control the phase of the sine wave, which gets reset with each trigger. I think technically it should have the linlin(0, 1, 0, 2pi) message appended to it, since Sweep is 0 to 1 and phase is 0 to 2pi,
but I tried that and it lost all sense of kick drum to me. Using range(0, 2pi) is wrong I think, but sounds a bit better to my ears, but I prefer it completely without any scaling.
Again, it's all quite different sounding than yours - sorry - just might be interesting as a different point of approach? ( SynthDef.new(\k1mono, { | freqA=800, freqB=50, freqC=40, freqDur1=0.02, freqDur2=0.5, freqC1=(-1), freqC2=(-1), atk=0.001, rel=1, c1=1, c2=(-12), amp=1, pan=0, out=0, ts=1 | var sig, freqSweep, env, trigger= \trig.tr(1); env = EnvGen.ar(Env([0, 0, 1, 0], [0, atk, rel], [c1, c1, c2], 2), trigger, timeScale:ts); freqSweep = EnvGen.ar(Env([freqA, freqA, freqB, freqC],[0,freqDur1,freqDur2],[freqC1,freqC1,freqC2], 2),trigger,timeScale: ts); sig = SinOsc.ar(0, Sweep.ar(trigger, freqSweep)); sig = sig * env; sig = Pan2.ar(sig, pan, amp); Out.ar(out, sig); }).add; ) ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Saturday, June 19th, 2021 at 11:10 AM, <nilswallgren@xxxxxxxxxxx> wrote:
|