<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Federico,<br>
<br>
If you want to use pos function of SndBuf object. You should use
SndBuf object directly.<br>
To do this, use a SndBuf array instead of a string array in your
while loop.<br>
<br>
Happy ChucKing,<br>
Julien<br>
<br>
<br>
<br>
On 07/07/2014 01:13, Federico Lopez wrote:<br>
</div>
<blockquote
cite="mid:CAGRUFnDsTZ3DJUUk3JzVEpe3--96Jmqr24LZvOUKvugYAzR+ag@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi, <br>
</div>
I have an array of strings (p1) that contains the same
names of SndBuff instances (kk sn), I would like to pass
the strings of the array to trigger samples and I don't
know how to do it.<br>
<br>
</div>
Here is some test code:<br>
<br>
SndBuf kk => dac;<br>
SndBuf sn => dac;<br>
<br>
me.dir() + "/audio/kick_01.wav" => kk.read;<br>
me.dir() + "/audio/snare_01.wav" => sn.read;<br>
<br>
kk.samples() => kk.pos;<br>
sn.samples() => sn.pos;<br>
<br>
while( true )<br>
{<br>
["kk", "sn"] @=> string p1[];<br>
<br>
for( 0 => int i; i < p1.cap(); i++)<br>
{<br>
0 => p1[i].pos; // not working <br>
0.25::second => now;<br>
}<br>
}<br>
<br>
</div>
Thanks, <br>
<br>
</div>
Federico López<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
chuck-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
</blockquote>
<br>
</body>
</html>