I am sure there is a really easy answer to this.
I am trying to replace an index number with an argument in a node proxy so that I can update the index number with .xset. But it keeps giving me an error. What am I doing wrong? Thanks for any help
t = TempoClock.new(120/60);
t.permanent_(true);
(
p = ProxySpace.new(s, clock: t);
p.push;
)
t.beats;
//Create a new pathway to the folder containing the sounds...
//e is a pathway to the folder with the sounds inside
e = PathName.new("/Users/mls1/Documents/Research 2019/Rethinking the Musical Instrument/SuperCollider Environment/guitar_samps/");
//For all the files in the path, add them to our empty array...
(
e.entries.do({
arg path;
d = d.add(Buffer.read(s, path.fullPath))});
)
//The folder is now filled with the buffers...
d;
//play a sound at a particular index...
d.at(2).play;
//This is the same thing (syntax shortcut)...
d[2].play;
~play;
~play.fadeTime_(4);
~play.play;
(
~play = {
|index = 2|
var sig;
sig = PlayBuf.ar(1, d[index], loop:1); //this is where I get the error. An index number works, but an argument causes an error
sig = Splay.ar(sig);
}
);
~play.release;
~play.send;