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

[sc-users] indexing controls



Form help file:
x = SynthDef("help-node-set", {| freq = 440, out = 0 |
Out.ar(out, SinOsc.ar(freq, 0, 0.1));
});
x = x.play(s);
)
x.set(\freq, 880, \out, 1); // two pairs
x.set(0, 660, 1, 0); // freq is the first argument, so it's index is 0. out is index 1.

In this other variant:
x = {| freq = 440, out = 0 |
Out.ar(out, SinOsc.ar(freq, 0, 0.1));
}.play;


x.set(\freq, 880, \out, 1); // this works BUT
x.set(0, 660, 1, 0); // this does not


Is it normal? (Why?)

Thanks

Best

-a-

--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - DAMS
Università degli Studi di Torino
--------------------------------------------------

- La Repubblica promuove lo sviluppo della cultura e la ricerca scientifica e tecnica.
- La Repubblica detta le norme generali sull'istruzione ed istituisce scuole statali per tutti gli ordini e gradi.
(Costituzione della Repubblica Italiana, art. 9 e 33

--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - DAMS
Università degli Studi di Torino
--------------------------------------------------
" This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous." 
(Jeffrey 'The Dude' Lebowski)