[sc-users] args as integers: outputproxy
James Harkins
jamshark70 at gmail.com
Thu Aug 10 09:06:11 PDT 2006
OK, I see. The real problem is that random seeding is a client-side
operation, but you're basing it on a synthdef argument which only has
a value on the server. So the confusion is that you're writing client
operations into the synthdef, which makes it harder to read (it isn't
obvious from looking at the code which is client and which is server)
and it becomes easier to make conceptual errors (like setting a
client-side status based on a server value).
Consider what you want to do... do you want the random numbers to
regenerate when you do Synth(\Bell, [\myBellNumber, 1])? They won't
if you do it that way, because thisThread.randSeed is client-only but
you want the numbers to be generated on the server. You'll get the
same set of random numbers every time.
See the helpfile for RandSeed for the server-side equivalent, and use
the server's Rand() UGen instead of the client's rrand(). Also reread
the client vs server helpfile.
My mistake, it wasn't the same answer :) Hope that helps--
hjh
On Aug 10, 2006, at 4:11 AM, Paul vickers wrote:
>
> Thanks James
>
> Weird - I was using the email interface and neither my own posts
> nor replies
> were being picked up. I thought the first post hadn't got through
> which was
> why I resent. It was only when I discovered the web forum this
> morning that
> I see my two posts and your replies are there. Wonder why I'm not
> getting
> them via the email list!
>
> Anyway, here's what I tried:
>
> thisThread.randSeed = Select.kr(myBellNumber, seeds);
>
>
> where myBellNumber is declared as
> arg myBellNumber = 0 ;
> and seeds is an array:
> seeds = [
> Date.seed, // Random bell
> 1155524954, // Nice low bell
> 1155442766, // Nice clunky bell
> 1155294420, // really low bell
> 1154676704, // High bell
> 1155146026 // Mid range
> ] ;
>
> And I get this error:
> ERROR: Primitive '_Thread_RandSeed' failed.
> Wrong type.
>
> I've tried Select.ar as well - same result.
>
> What obvious thing am I missing????
>
>
> Yours puzzled
>
> Paul
>
>
> --
> View this message in context: http://www.nabble.com/args-as-integers
> %3A-outputproxy-tf2081404.html#a5740156
> Sent from the Supercollider - User forum at Nabble.com.
>
> _______________________________________________
> sc-users mailing list
> sc-users at create.ucsb.edu
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
: H. James Harkins
: jamshark70 at dewdrop-world.net
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.create.ucsb.edu/pipermail/sc-users/attachments/20060810/dd95e01c/attachment-0001.htm
More information about the sc-users
mailing list