Am 03.06.21 um 03:35 schrieb Ichthyostega:
What is immediately clear from diffing these traces: we are drawing some
values from some harmonic PRNG instances prior to re-seeding them with a
reproducible value from the main-PRNG. And -- depending on the timings prior
to starting the test, these values are thus nondeterministic.
After investigating the call graphs in detail, I should add to the above
statement that this in itself is not a problem or "incorrect" in any way.
Because, we have two PRNGs in each OscilGen, and the base-PRNG is only reseeded
when a new instrument is loaded (or on parameter changes). While the second
one, the harmonicPRNG, is reseeded on each note again, but from one fixed
value, which is also only drawn on some events only (parameter change, new
instrument, rebuilding wavetable etc).
At that point, it would be possible to argue that it is "unfortunate"
that the base prng happens to be reseeded on parameter changes /after/ drawing
a new value for the harmonicPRNG. However, I am a bit hesitant to change
anything in this area, since it is so damn hard to understand all ramifications.
Another, far less risky solution IMHO would be to make our new reseed()
operation way more complete. It should not only reseed the main PRNG,
but also loop over all loaded instruments / kit items and over all
OscilGen instances embedded into these, and then reseed both of
those slave prngs, and, most importantly, do this in the right order.
The latter obviously requires some more coding work to be done properly,
but it seems less risky and more focussed to what we want to achieve
right now. So that's what I'll try next
-- Hermann
PS: on Friday I am also not at home most of the day,
so I'll probably be able to look into that on Saturday.
_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel