Well, after that little escapade I have a far clearer understanding of the
prngs. Note plural. There are potentially a lot of them, all independent!
At first startup there are two. One is a sort of general purpose one that's
used for parameter setup randomisation. That gets reseeded at startup and
whenever there is a major reset, patchset load etc.
The other is for part 1, addsynth, voice 1. This gets reseeded at every note on
based on an internal 'endless' running counter that's used for various
If you enable another voice, there is another prng for that, and each part will
have the same setup. Oh, and then you need to potentially multiply that by 16
if you're in kit mode.
Going to the extreme that's 64 parts * 16 kit items * 8 voices.
In order to ensure each voice has a unique starting point, reseeding includes
the voice number, however this doesn't allow for the same numbered voice in a
different kit item - I haven't worked out how to do that yet!
It would be nice if we could use a common one, but the calls are all in-lined
for speed, so that's not really an option. However, I did try a run with
reseeding completely disabled, and all my instruments that use randomisation
heavily sound fine over several minutes of playing, so at some point I might see
if I can find a way of reseeding these outside the note-on event in one of the
low priority threads.
Will J Godfrey
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx