Speaking of Lua and randoms, I had read somewhere (I think on the website) that on some platforms, their random generators will always produce the same FIRST number, but everything else after that is "random". I tested this out on the Mac OS X, and yes, every FIRST number is the same, but everything else beyond that isn't. The "workaround" for this is to just drop the first random value you get. I don't know why this happens, but is it possible that the same things happens in PD? I have not tested this out.

Mike


On Thu, Sep 4, 2008 at 2:56 PM, Frank Barknecht <fbar@footils.org> wrote:
Hallo,
IOhannes m zm?lnig hat gesagt: // IOhannes m zm?lnig wrote:

> Martin Peach wrote:
>
> > Or have a single random generator inside pd that feeds all the random
> > objects.
>
> yes of course, this would be the most straight forward solution.

Only to this one problem, but it would lead to many others: Being able
to seed [random] objects separately is a very important feature. For
example a lot of the algorithmic composition in the game "Spore" is
relying on seeding random generators separately with known seeds
(according to the talk once posted here).

In Lua there is only one seed for all math.random() calls, and it's even
globally affecting all pd_lua objects. That's very annoying, but thank
god, there's a random.so "external" Lua module which fixes this.

Ciao
--
Frank Barknecht

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



--
Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician