If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
rnd optimization
31 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: rnd optimization
Hmm...
- Attachments
-
- distribution-related.fsm
- (10.82 KiB) Downloaded 869 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: rnd optimization
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.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: rnd optimization
Maybe it will sound stupid, but... what is the practical meaning of differences between these two distributions (over time)?
- Attachments
-
- distribution-related-1.fsm
- updated
- (10.78 KiB) Downloaded 887 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: rnd optimization
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:
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.
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.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: rnd optimization
Ah I see, I just realized too that my part works just slower, thanks!
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: rnd optimization
...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?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: rnd optimization
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.
- Attachments
-
- seed-gen.fsm
- (575 Bytes) Downloaded 877 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: rnd optimization
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.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: rnd optimization
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).
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).
- Attachments
-
- diff_x264.zip
- different
- (466.48 KiB) Downloaded 880 times
-
- diff.png (17.04 KiB) Viewed 15919 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
31 posts
• Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 99 guests