[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] more on synthdef variants



On Dec 26, 2004, at 12:35 AM, James McCartney wrote:

the purpose of a variant is to provide defaults for things that are not normally in an event. they are the preset. presets in synths don't usually include the note.

the problem i'm having is actually with \bufnum -- i was just using the \freq example for simplicity. but anyway i'll find another way to do what i'm trying to do.

one other thing that seems kind of weird:

(
x = SynthDef("vartest", {
	|dur=1, freq=200, legato=0.8|
	var envgen;
	envgen = EnvGen.kr(Env.linen(0, 1, 0), 1, 0.1, 0, dur * legato, 2);
	Out.ar(0, SinOsc.ar(freq) * envgen);
}).variants = (alpha: [\freq, 400]);
x.store;
)

Pbind(\instrument, "vartest", \legato, 0.1).play; // legato works

Pbind(\instrument, "vartest.alpha", \legato, 0.1).play; // legato doesn't work