The easiest way I've found to generate random numbers for seeding
an animation is with the Javascript patch:
if ( outputs[0] == null )
outputs[0] = Math.random();
This works in QC, but doesn't when the qtz is running as a screen
saver: Javascript in a screen saver always returns the same
sequence every time. I've tried to get around this by patching
System Time into Javascript for a seed value, but there's another
difference in the screen saver environment here: it works in QC,
but it looks like any number derived from System Time always comes
up as NaN in Javascript.
This actually makes sense, as each time the screen saver runs, it's
like a new process and the JavaScript internals probably don't set
the random seed with the current date / time but to a fixed constant.
I guess you could observe the same thing if you were to quit /
restart Quartz Composer to play your composition.
Anyone seen this before? Does someone have another method for
generating random initial values for screen savers?
I don't think there's anyway to can change the original sequence of
random numbers, however, you could post-process it with some
mathematical operations that use the current date / time like
multiply, modulo... this will ensure the final random sequence will
never be the same.