<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Forgive me if this was already discussed on the list before.  I am puzzled about a non-random random number.</div><div>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.</div><div>However, if the same code occurs without an STK declaration before it, the result is random.</div><div><br></div><div><br></div><div><div style="margin: 0px; font-size: 13px; font-family: Monaco; "><div style="margin: 0px; color: rgb(4, 51, 255); ">while<span style="color: #000000"> (</span>true<span style="color: #000000">)</span></div><div style="margin: 0px; ">{</div><div style="margin: 0px; ">StifKarp stu => <span style="color: #0433ff">dac</span>;</div><div style="margin: 0px; "><span style="color: #0433ff">int</span> randy;</div><div style="margin: 0px; ">Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>) => randy;</div><div style="margin: 0px; color: rgb(81, 81, 81); "><span style="color: #000000"><<<</span>"here are three random numbers"<span style="color: #000000">,</span></div><div style="margin: 0px; ">Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>), Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>),Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>),</div><div style="margin: 0px; color: rgb(81, 81, 81); ">"and NON-random Randy"<span style="color: #000000">, randy >>>;</span></div><div style="margin: 0px; min-height: 17px; "><br></div><div style="margin: 0px; ">Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>) => randy;</div><div style="margin: 0px; color: rgb(81, 81, 81); "><span style="color: #000000"><<<</span>"here are three more random numbers"<span style="color: #000000">,</span></div><div style="margin: 0px; ">Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>), Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>),Std.rand2(<span style="color: #de9210">0</span>,<span style="color: #de9210">10</span>),</div><div style="margin: 0px; color: rgb(81, 81, 81); ">"and random Randy"<span style="color: #000000">, randy >>>;</span></div><div style="margin: 0px; "><span style="color: #de9210">1000</span>::<span style="color: #0433ff">ms</span> => <span style="color: #0433ff">now</span>;</div><div style="margin: 0px; ">}</div></div></div><div><span style="color: #000000"><br></span></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>david</div><div><br class="khtml-block-placeholder"></div><div>David Loberg Code</div><div>School of Music</div><div>Western Michigan University</div><div>1903 W Michigan Ave</div><div>Kalamazoo, MI 49008-5434</div><div><a href="mailto:code@wmich.edu">code@wmich.edu</a></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span><br class="Apple-interchange-newline">
</div>
<br></body></html>