Am 04.06.21 um 23:16 schrieb Kristian Amlie:
May I suggest a different method: In RandomGen.h there is a NorandomPRNG class which can be switched with the real random generator (see the bottom).
Now, that class is overly stupid, it's just returns a constant. But we could
consider following a similar idea, just a bit closer to reality. For example,
what about using the real generator, but with a compile option we make it
reseed to the same value, always, regardless of what you actually pass it?

Obviously, when using the method, test results would only be valid when compiling with this option.


Hi Kristian,
Hi Will,

indeed I was also pondering the use of such a rigged PRNG, and in fact
I use a variant that just strictly increments its value, so I can see
in the debugger easily when yet another call happened.

However, it is always a bit clumsy when the test setup needs a specifically
rigged binary, and so I'm inclined to try way harder first to get the regular
Yoshimi to behave the way it should behave in theory.


And at least I have some partial success now.
With a more elaborate reseed()-function I can now 100% reproduce all
generated random numbers during an invocation of the new test sound generation.


However, the funny or disturbing thing is, the generated sound is still not
the same for some more elaborate sounds (like Overdrive). The differences
are way smaller now, and visually the waveform looks basically the same,
but the generated sound does not cancel out completely when subtracting
the results of two invocations, as it should.

So this means either my test setup is still broken somehow, or the
sound calculation might be tainted by some hidden state carried on
from before reseeding the engine and launching the test. Anyhow,
using the debugger it must be possible to narrow that down further,
and thus I am far from giving up on that story.

-- Hermann





_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to