Hi list,
I'd like my patch to create a different random each time it's loaded.
I'm using [urn] so I tried feeding a [random 500] -> [seed $1( into the [urn], but every time it's the same result. According to the documentation "if you don't give it a seed then each instance of random gets its own seed" but every time I initiate the patch the result is the same.
Is there an object that will give me the current date and/or time, so that I can use that as a seed to the random and urn objects???
11010001001001011 Ed
Metastudio 4 for Pure Data - coming soon! Metastudio 3 still available at http://sharktracks.co.uk/puredata
On Tue, 25 Jan 2011, Ed Kelly wrote:
Is there an object that will give me the current date and/or time, so that I can use that as a seed to the random and urn objects???
http://gridflow.ca/help/unix_time-help.html
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On Tue, 25 Jan 2011, Ed Kelly wrote:
I'm using [urn] so I tried feeding a [random 500] -> [seed $1( into the [urn], but every time it's the same result. According to the documentation "if you don't give it a seed then each instance of random gets its own seed" but every time I initiate the patch the result is the same.
BTW there is also [# rand] which uses libc's random() (actually random()%n), and also, merely loading gridflow will call srandom() to seed it with the system time.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-01-25 01:58, Ed Kelly wrote:
Hi list,
I'd like my patch to create a different random each time it's loaded.
I'm using [urn] so I tried feeding a [random 500] -> [seed $1( into the [urn], but every time it's the same result. According to the documentation "if you don't give it a seed then each instance of random gets its own seed" but every time I initiate the patch the result is the same.
Is there an object that will give me the current date and/or time, so that I can use that as a seed to the random and urn objects???
zexy's [time] and [date]
fgmasdr IOhannes
On Tue, Jan 25, 2011 at 12:58:19AM +0000, Ed Kelly wrote:
I'd like my patch to create a different random each time it's loaded.
I'm using [urn] so I tried feeding a [random 500] -> [seed $1( into the [urn], but every time it's the same result. According to the documentation "if you don't give it a seed then each instance of random gets its own seed" but every time I initiate the patch the result is the same.
Is there an object that will give me the current date and/or time, so that I can use that as a seed to the random and urn objects???
Apart from the solutions based on current time, I also had success with using the adc~ as a seed on RjDj/iPthing. Of course it needs audio input, but if you have that, just [snapshot~] and scale accordingly to get a sufficiently random seed.
Frank Barknecht Do You RjDj.me? _ ______footils.org__
On Tue, Jan 25, 2011 at 10:00:15AM +0100, Frank Barknecht wrote:
On Tue, Jan 25, 2011 at 12:58:19AM +0000, Ed Kelly wrote:
I'd like my patch to create a different random each time it's loaded.
I'm using [urn] so I tried feeding a [random 500] -> [seed $1( into the [urn], but every time it's the same result. According to the documentation "if you don't give it a seed then each instance of random gets its own seed" but every time I initiate the patch the result is the same.
Is there an object that will give me the current date and/or time, so that I can use that as a seed to the random and urn objects???
Apart from the solutions based on current time, I also had success with using the adc~ as a seed on RjDj/iPthing. Of course it needs audio input, but if you have that, just [snapshot~] and scale accordingly to get a sufficiently random seed.
One other thing you can do is wait for some user input (knob twiddle, touch screen, press key etc.) and then seed based on [timer].
Cheers,
Chris.