I found this quote interesting from the Dreamworld Plus One challenge topic:
So this is harmless in this context.
But some modules repeatedly seed with the same value in an effort to get consistent “random” sequences. So does this mean such modules could be at risk of giving inconsistent behavior when switching platforms?
My Venom Rhythm Explorer uses rack::random::Xoroshiro128Plus. Hopefully this gives consistent results across all platforms.
It isn’t a question of how the RNG is seeded, but rather whether a given seed value produces the exact same pseudo random sequence regardless of platform. Paul reports that the RNG he is using can give different results depending on the platform or library or …
I am thinking/hoping that the RNG I am using always gives the same result for a given seed regardless of platform etc.
Yes, but that is used to seed the RNG. I give the user the option to provide their own seed, making the method that VCV establishes a default seed moot.
xorshifts are relatively simple to implement, in principle and Rack’s doesn’t do anything fancy: as long as the seed is constant, the results should be as well…
I see your module keeps its own local state, so, results should be consistent, at least from the rng.
Searching for their names you should be able to locate multiple RNG’s. I’ve mostly used KISS which combines MWC and 2 others (SHR3 and CONG). But would say that’s overkill for VCV
EDIT: To seed the MWC simply set _z and _w. I simply used their “default values” (362436069 and 521288629) which I salted with a time based seed:
public RandomMWC()
{
int timeSeed = GetDateTimeBasedSeedValue();
_z = 362436069 ^ timeSeed;
_w = 521288629 ^ timeSeed;
}