Playing with synths that accept args whee
This commit is contained in:
parent
f6498b0a16
commit
3dc68aef05
@ -194,6 +194,44 @@
|
||||
z = Synth("tutorial-Rand");
|
||||
)
|
||||
|
||||
(
|
||||
SynthDef(
|
||||
"tutorial-args",
|
||||
{
|
||||
|freq = 440, out = 0|
|
||||
Out.ar(out, SinOsc.ar(freq, 0, 0.2))
|
||||
}
|
||||
).add;
|
||||
Task({
|
||||
x = Synth("tutorial-args");
|
||||
1.wait;
|
||||
y = Synth("tutorial-args", ["freq", 660]);
|
||||
1.wait;
|
||||
z = Synth("tutorial-args", ["freq", 880, "out", 1]);
|
||||
1.wait;
|
||||
x.free; y.free; z.free;
|
||||
}).play;
|
||||
)
|
||||
|
||||
(
|
||||
SynthDef.new(
|
||||
\tutorialargs,
|
||||
{
|
||||
|freq = 440, out = 0|
|
||||
Out.ar(out, SinOsc.ar(freq, 0, 0.2));
|
||||
}
|
||||
).add;
|
||||
Task({
|
||||
x = Synth(\tutorialargs);
|
||||
1.wait;
|
||||
x.set(\freq, 660);
|
||||
1.wait;
|
||||
x.set(\freq, 880, \out, 1);
|
||||
1.wait;
|
||||
x.free;
|
||||
}).play;
|
||||
)
|
||||
|
||||
(
|
||||
s.scope;
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user