Environment
- SuperCollider version: sclang 3.13.0 (Built from tag ‘Version-3.13.0’ [3188503])
- Operating system: Arch / macOS Sonoma
Steps to reproduce, including expected behavior
(
SynthDescLib(\test, s);
SynthDef("huh", {arg out = 0, amp = 0.1, sinfreq = 440;
var env = Env.perc(0.1, 0.2, amp).kr(doneAction: 2);
var snd = SinOsc.ar(freq: sinfreq, mul: env);
Out.ar(out, snd);
}).add('test');
SynthDef("whaaaaat", {arg out = 0, amp = 0.1, sinfreq = 440;
var env = Env.perc(0.1, 0.2, amp).kr(doneAction: 2);
var snd = SinOsc.ar(freq: sinfreq, mul: env);
Out.ar(out, snd);
}).add;
SynthDef("okay", {arg out = 0, amp = 0.1, sinfreq = 440;
var env = Env.perc(0.1, 0.2, amp).kr(doneAction: 2);
var snd = SinOsc.ar(freq: sinfreq, mul: env);
Out.ar(out, snd);
}).add('test').writeDefFile;
)
// sinfreq is changing the freq of our SinOsc (expected behavior)
Synth(SynthDescLib.all.at(\test).synthDescs['huh'].name, [amp: 0.3, sinfreq: rrand(400,800)])
// Pattern / Event
( // using SynthDescLib -- behavior is not expected: sinfreq is never changed
Pdef('', Pbind(*[
instrument: SynthDescLib.all.at(\test).synthDescs['huh'].name,
sinfreq: Pseg([80,900], 5, \exp, inf),
dur: Pfunc{|env| cos(env.sinfreq * 2pi / 900).linlin(-1, 1, 0.05, 0.5)},
amp: 0.3
])).play(quant: 0);
)
( // synthdef without using SynthDescLib - behavior is expected
Pdef('', Pbind(*[
instrument: 'whaaaaat',
sinfreq: Pseg([80,900], 5, \exp, inf),
dur: Pfunc{|env| cos(env.sinfreq * 2pi / 900).linlin(-1, 1, 0.05, 0.5)},
amp: 0.3
])).play(quant: 0);
)
( // using SynthDescLib with writeDefFile, behavior is expected
Pdef('', Pbind(*[
instrument: SynthDescLib.all.at(\test).synthDescs['okay'].name,
sinfreq: Pseg([80,900], 5, \exp, inf),
dur: Pfunc{|env| cos(env.sinfreq * 2pi / 900).linlin(-1, 1, 0.05, 0.5)},
amp: 0.3
])).play(quant: 0);
)
maybe not related but observed with the SynthDef used with SynthDescLib add.(key)
Posting FAILURE IN SERVER /n_set Node 5088 not found
at certain dur values. Something iffy with timing bestween doneAction and free in this kind of broken Event param communication. It seems.