You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following part from the Env documentation does not work as expected:
(
SynthDef(\help_Env_newClear, { |out = 0|
var env, envctl;
// make an empty 4 segment envelope
env = Env.newClear(4);
// create a control argument array
envctl = \env.kr(env.asArray);
Out.ar(out, SinOsc.ar(EnvGen.kr(envctl, \gate.tr), 0, 0.3)); // the gate control is a trigger
}).add;
)
// reset then play again:
Synth(\help_Env_newClear, [\gate, 1, \env, Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)]);
// the same written as an event:
(instrument: \help_Env_newClear, gate: 1, env: Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)).play;
the Synth() example works, but the Event example does not ...
The text was updated successfully, but these errors were encountered:
I see why. By default, a SynthDesc doesn't include \gate from the event in the arguments sent to the synth. If the gate control's default is 0, as in this example, the gate is not opened and the envelope doesn't start... or end, leaving a zombie node.
The easiest fix is to add a nonzero default for \gate.tr (and while we're at it, replace the "magic" syntax with explicit invocations of NamedControl -- I'm coming to feel more and more that the docs should avoid syntax sugar, unless the sugar itself is what's being documented, certainly not the case here).
the following part from the Env documentation does not work as expected:
the
Synth()
example works, but theEvent
example does not ...The text was updated successfully, but these errors were encountered: