So, I’m trying to add to my random sequencer a way to optionally fix the random seed via CV.
I also looked at how Frozen-Wasteland’s Seeds of Change does it - it has its own PRNG, way too complex for me to follow.
I gave a try using
std::mt19937 in a test module and it seems to work. I tried seeding it a fixed seed and flipping a coin every sample to see what happens, the CPU cost is obviously very high, but doing it only 1000x per second the cpu cost is negligible, and in practice I’ll call it 10 times per second at most.
I guess I have two questions:
- Am I missing a simple way to force Rack’s PRNG seed?
- Any non-obvious drawback to using the standard library’s in my case? I don’t need the random distribution to pick numbers more than a few times per second, or the randomness to be of high quality, but I need it to be deterministic when used on the same machine.