Kyma Forum
  Kyma Support
  nextRandomWithSeed - hot seed?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   nextRandomWithSeed - hot seed?
cristian_vogel
Member
posted 03 October 2008 09:55         Edit/Delete Message   Reply w/Quote
Can we have (1 bpm: 120) nextRandomWithSeed: !VCSseed

IP: Logged

cristian_vogel
Member
posted 03 October 2008 10:26         Edit/Delete Message   Reply w/Quote
in fact, having tried all sorts of approaches, I can't seem to set a seed in the VCS - I'm trying to make repeatable random pattern generators..

i tried

code:
|  r|
r := Random newForKymaWithSeed: !Value.
r next.

but get a 'Hot variables can't perform asFloat ..

[This message has been edited by cristian_vogel (edited 03 October 2008).]

IP: Logged

cristian_vogel
Member
posted 05 October 2008 16:38         Edit/Delete Message   Reply w/Quote
any feedback on this? For building the rest of the program I want to design, I need some way of choosing random seeds dynamically I think...

IP: Logged

SSC
Administrator
posted 05 October 2008 16:58         Edit/Delete Message   Reply w/Quote
The idea of the seed is to make the random sequence repeatable. If you would like it to be different each time, you could simply leave off the seed argument. Then it will use a different seed each time you compile it. For example

r := Random new.

The seed is the initial starting point for the random stream generator, so it is set at the time you create the stream generator (that's why it cannot be a hot value that changes while the Sound is playing).

[This message has been edited by SSC (edited 05 October 2008).]

IP: Logged

cristian_vogel
Member
posted 06 October 2008 05:43         Edit/Delete Message   Reply w/Quote
Ah thats what I suspected. I want to make random pattern generators that are selectable from the VCS. So I thought one way to do it would be to use a HotValue seed, so you could dialup millions of patterns by using a different random stream each change, but if there was a pattern you liked, store it in a VCS preset.

This morning , I imagined another solution, an Analog Sequencer with a huge array of pitch values, and an 8 step index window moving around the array. I'm gonna try this later...

Nevertheless, I suggest implenting a way of restarting a random number stream during realtime - the chaotic generator can do this in some way, with its reset: message.

IP: Logged

SSC
Administrator
posted 06 October 2008 08:45         Edit/Delete Message   Reply w/Quote
I recommend using the CapyTalk random generators instead of the Smalltalk Random stream (which is evaluated only when you compile the Sound and not while the Sound is playing). For example:

1 s random

!BPM bpm s random

etc

IP: Logged

cristian_vogel
Member
posted 06 October 2008 13:20         Edit/Delete Message   Reply w/Quote
I posted [presetrandompatternsequencer.kym] over at the Twiki ! It works pretty well, but if I try and read more than 256 from the stream, it runs out of static ram which is weird... anyway, change the seeds in the script by hand, and you'll get a whole new pallette of patterns


IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c