Args for index numbers in a proxy gives me an error

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 =;

p =, clock: t);

//Create a new pathway to the folder containing the sounds...

//e is a pathway to the folder with the sounds inside

e ="/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...

	arg path;
	d = d.add(, path.fullPath))});

//The folder is now filled with the buffers...

//play a sound at a particular index...;

//This is the same thing (syntax shortcut)...



~play = {
	|index = 2|
	var sig;
	sig =, d[index], loop:1); //this is where I get the error. An index number works, but an argument causes an error
	sig =;

1 Like

hey there,

you could use like the following:

~play = {|index = 2|
	var sig, buf;
	buf =, d);
	sig =, buf, loop:1); 
	sig =;

hope this helps :slight_smile:

That works! Genius! Thanks so much.