All of those instruments contain noise. Likely a Noise object. Wonder if Noise itself does a seed? I'll check. Sent from my iPhone On Oct 9, 2013, at 3:37 PM, chuck-users-request@lists.cs.princeton.edu wrote:
Send chuck-users mailing list submissions to chuck-users@lists.cs.princeton.edu
To subscribe or unsubscribe via the World Wide Web, visit https://lists.cs.princeton.edu/mailman/listinfo/chuck-users or, via email, send a message with subject or body 'help' to chuck-users-request@lists.cs.princeton.edu
You can reach the person managing the list at chuck-users-owner@lists.cs.princeton.edu
When replying, please edit your Subject line so it is more specific than "Re: Contents of chuck-users digest..."
Today's Topics:
1. Non-random random number (David Loberg Code) 2. Re: Non-random random number (David Code) 3. Re: Non-random random number (Jeffrey Albert) 4. Re: Non-random random number (David Code)
----------------------------------------------------------------------
Message: 1 Date: Wed, 09 Oct 2013 12:59:51 -0400 From: David Loberg Code
To: chuck-users@lists.cs.princeton.edu Subject: [chuck-users] Non-random random number Message-ID: <6A36C46C-A7CE-465A-8A61-7203AC280266@wmich.edu> Content-Type: text/plain; charset="us-ascii" Forgive me if this was already discussed on the list before. I am puzzled about a non-random random number. When the random number is calculated right after an STK instrument is declared, the result is not random. It is the same number every time. However, if the same code occurs without an STK declaration before it, the result is random.
while (true) { StifKarp stu => dac; int randy; Std.rand2(0,10) => randy; <<<"here are three random numbers", Std.rand2(0,10), Std.rand2(0,10),Std.rand2(0,10), "and NON-random Randy", randy >>>;
Std.rand2(0,10) => randy; <<<"here are three more random numbers", Std.rand2(0,10), Std.rand2(0,10),Std.rand2(0,10), "and random Randy", randy >>>; 1000::ms => now; }
david
David Loberg Code School of Music Western Michigan University 1903 W Michigan Ave Kalamazoo, MI 49008-5434 code@wmich.edu
participants (1)
-
Perry Cook