[PD] noise~ inlet?
Mathieu Bouchard
matju at artengine.ca
Sun May 30 21:01:01 CEST 2010
On Sat, 29 May 2010, Martin Peach wrote:
> Mathieu Bouchard wrote:
>> x->x_val = (init *= 1319);
> Ooops, I missed that init is declared static in noise_new(), so the same
> variable is used by every instance of [noise~].
right. and then init *= 1319 is a process that loops after pow(2,30)
iterations. int is a finite ring, the set of all values of init is a
subring of that, therefore its number of elements is a divisor of the
number of elements of int (that is, of pow(2,32)), so, another power of
two. testing repeated squaring of 1319 mod pow(2,32), you can find that
pow(1319,pow(2,30)) = 1 but any smaller power won't equal 1. therefore it
takes pow(2,30) more instanciations to get back to the first noise seed.
>> Could you please explain what could sound different when multiplying two
>> [noise~] together ?
> I doubt if it would sound any different. Subtracting two identical noise
> signals should result in zero, but since it's very difficult to make two
> identical [noise~] streams it probably doesn't matter any more.
well, another line from the pd source code says :
val = val * 435898247 + 382842987;
this thing loops after pow(2,30) iterations. you can find it like that :
int a = 435898247; int b = 382842987;
for (int i=0; i<32; i++) {
printf("i=%d a=%d b=%d\n",i,a,b);
int newa = a*a;
int newb = a*b+b;
a = newa;
b = newb;
}
then I don't recall why val=val*a+b would always loop after a power of two
iterations (I know it for b=0), but in this case, it says that pow(2,30)
iterations are like val=val, and if there were any smaller number for
that, it would be a divisor of pow(2,30), so, we would know from this list
anyway.
I don't know any tricks to expose any patterns in the noise, especially as
the lower bits are hidden (truncated when converting from int32 to
float32). I'm not an expert with that stuff...
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
More information about the Pd-list
mailing list