Thank you very much! And now my question is: How did you get to know that that object (or command line, I don't know) - I'm referring to younameit - has got that use?<div><br></div><div>Danke Schon<br><br><div class="gmail_quote">
On Mon, Sep 24, 2012 at 7:18 PM, forrest curo <span dir="ltr"><<a href="mailto:treegestalt@gmail.com" target="_blank">treegestalt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div class="im">On Mon, Sep 24, 2012 at 9:47 AM, Alberto Alassio <span dir="ltr"><<a href="mailto:alberto.alassio@gmail.com" target="_blank">alberto.alassio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://chuck.cs.princeton.edu/doc/examples/basic/foo.ck" target="_blank">http://chuck.cs.princeton.edu/doc/examples/basic/foo.ck</a> <div>That's what I'm talking about.  Here you can find "hi" and "hi.cap" .</div>


<div>Thank you for your answer!<br></div></blockquote></div><div> <div><pre>"// an array
[ 0, 2, 4, 7, 9, 11 ] @=> int hi[];

while( true )
{
    Std.mtof( 45 + Math.random2(0,3) * 12 +
        hi[Math.random2(0,hi.cap()-1)] ) => s.freq;" ?<br><br>Yeah, Math.random2() is one of the built-in functions and "you-name-it.cap" <br>would be the number of elements in "you-name-it[]" <br>

so you'd be picking a random element of the array "hi", getting the frequency of that as a midi note,<br>putting it into the oscillator ("s") you started a few lines back.<br></pre></div></div></div>

<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div>