Page 2 of 4
Re: rnd optimization
Posted: Wed Jun 12, 2013 11:57 am
by tester
Hmm...
Re: rnd optimization
Posted: Wed Jun 12, 2013 11:58 am
by MyCo
tester wrote:What is the output range in your design? I see values going beyond 1 (I guess the upper range is 3?), but I don't know what is the min value here.
Well, there was a bug in the code. I reuploaded the schematic in my post above. The range is 0 to 1.
tester wrote:What is the purpose of setting the seed in (0.2,0.7) range? (or it does not matter for whitenoise-like distribution?).
It's the initial starting point for the random numbers. The random number calculation is similar to the one you posted. The "rand" function fills all for SSE channels with different values.
Re: rnd optimization
Posted: Wed Jun 12, 2013 12:07 pm
by tester
Maybe it will sound stupid, but... what is the practical meaning of differences between these two distributions (over time)?
Re: rnd optimization
Posted: Wed Jun 12, 2013 12:13 pm
by MyCo
It shows that your version is wrong. I found the reason for that already:
You set the time interval to 9.9999997e-005 seconds witch is ~100 micro seconds... lets calculate how long each random step is in samples:
Code: Select all
Samplerate = 44100
Steplength = Samplerate * Interval
--> 4
You use hop(128) everywhere, so instead of updating the random number every 4 Samples, you only update every 128 Sample. Connect the stream ouputs to the Audio Output, and you'll hear the difference.
Re: rnd optimization
Posted: Wed Jun 12, 2013 12:15 pm
by tester
Ah I see, I just realized too that my part works just slower, thanks!
Re: rnd optimization
Posted: Wed Jun 12, 2013 12:25 pm
by tester
...but I noticed one more thing. Each time when I start the schematic - the random series starts from the same position (it calculates the same irregular patttern of numbers each time). How to put there external seed correctly?
Re: rnd optimization
Posted: Wed Jun 12, 2013 1:31 pm
by MyCo
That's actually how all random number generators work in FlowStone.
Re: rnd optimization
Posted: Wed Jun 12, 2013 4:12 pm
by tester
Yes I know, but I have seed generator on start (time based; thus - it produces new results). That why I asked how to connect correctly and efficiently external seeding.
Re: rnd optimization
Posted: Wed Jun 12, 2013 6:59 pm
by MyCo
your schematic always starts with the same values... as I said, the default random generator in FS works that way. You can use Ruby or set the seed input of the primitive explicitly to the current time.
Re: rnd optimization
Posted: Wed Jun 12, 2013 7:38 pm
by tester
MyCo - just tested again. Always different values.
For some reason - first value is sometimes the same, but not always (I think it was more vriated in SM, or in larger design or under greater load, don't remember now). Values are different each start. Screenshot is made of 2 startups (no changes, just starting the schematic and external printscreen; to not make biliv's choices - plus video).
For green randomizer - it is a matter of seeding with time AND retriggering on start (I received this explanation from Malc some time ago).
But this similarity of seeds guides me to the question. If this FS randomnes = just irregularity (i.e. always the same pattern per seed), then maybe the random generator itself (before "latch") should be running in the background (I don't know - few per second? tkc rate?), to produce greter variation? (connected to interaction generated by user?). //edit: this one is just a thought; I don't know what difference (size) between seeds produces signifficant differences in output (as you see this is click-by-click related, not audio noise).