Re: [LAD] random curiosity

From: Arnold Krille <arnold@email-addr-hidden>
Date: Tue Jan 26 2010 - 10:12:21 EET

On Tuesday 26 January 2010 00:01:50 Gabriel M. Beddingfield wrote:
> On Tue, 26 Jan 2010, cal wrote:
> >> That is to say, if you need a reproduceable string of "random" numbers
> >> on each thread (e.g. for unit testing), then random_r() is your man.
> >> Otherwise, it sounds like more trouble than it's worth.
> >
> > As I understand it, zyn wants a reproducible sequence for mainstream,
> > plus a reproducible per note sequence seeded according to the current
> > point in the mainstream sequence. Interrupting and resuming the
> > mainstream sequence was the issue I was looking to simplify. If you step
> > over srandom_r(), it's really not any great trouble.
>
> Kind of like where the random number generator is part of
> the envelope, huh? That makes sense... in which case
> random_r() would be a good use for that.

I don't (yet) get the reason for doing this. If the global seed is initiated
with time() it is the same as if each notes seed is initiated with time(), the
numbers are still random beginning from that seed. The only problems I can see
is when the random numbers are correlated resulting with per-note correlation
of for example always the a of the adsr being to short. A problem that is
easily solved when multiple notes get their numbers from the same seed
effectively randomizing the access to that seed and thus overcoming the
correlation...

Arnold

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Received on Tue Jan 26 12:15:01 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 26 2010 - 12:15:01 EET