## modifying the noise signal generator

Feb 25, 2006 at 12:15pm

# modifying the noise signal generator

hi,

I’m very fresh to java and not very clever in maths either – still I want to modify the mxj~ noise object to be able to change the random number equation from the outside of the object using attributes. Hopefully being able to use May’s bifurcation equation.

where my knowledge stops is on

1: what the range of the random number generator inside ‘mxj~ noise’ is

2: what or where the result of the equation is, before it is sent out of the outlet

I’ll post the java code if anyone wants to help who hasn’t got the mxj~ objects..

Also it seems like someone should have done this before, but searching for it I haven’t found anything, except from the litter package, which doesn’t get near to being able to control the actual equation from the outside of the object.

anyone want to help or join in to try and make one?

kind regards
martin aa

#24611
Feb 25, 2006 at 4:56pm

On around Feb 25, 2006, at 13:15, martin aa said something like:
>
> 1: what the range of the random number generator inside ‘mxj~ noise’ is

MSP objects typically have the range [-1 .. 1]

> 2: what or where the result of the equation is, before it is sent out
> of the outlet

idum = 1664525L * idum + 1013904223L;

is the RNG. It’s the standard, 1948-state-of-the-art Linear Congruence
algorithm. It’s range is [-(2^31) .. (2^31) - 1]. It is being converted
to a float in the range [-1 .. 1] by the very funky

itemp = jflone | (jflmsk & idum );
o[i] = ((Float.intBitsToFloat((int)itemp)) *
(float)2.0 ) – (float)3.0;

which looks strikingly similar to some code James McCartney posted to
the music-dsp list many years ago. This is basically a hardcore
C-programmer’s approach to converting int to float with the ranges
given, attempting to avoid the overhead of the more pedestrian
typecast-and-multiply. If you want to understand what you’re doing, I
would suggest

o[i] = ((float) idum) * (1.0 / (float) 0x7fffffff);

which is, in my experience, every bit as fast as the bit munging. Note
that an expression is used that should convince the compiler to do
division at compile-time, not at run-time.

> anyone want to help or join in to try and make one?

Have you looked at lp.poppy~ ?-

Best,
Peter

————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html

#71467
Feb 25, 2006 at 5:27pm

On around Feb 25, 2006, at 17:56, undersigned said something like:
> o[i] = ((float) idum) * (1.0 / (float) 0x7fffffff);

which is slightly wrong.

Better:

o[i] = ((float) idum) * (1.0 / 2147483648.0);

or even

o[i] = ((float) idum) * 4.6566128731e-10;

Not that anyone’s gonna hear the difference…

– P.

>
————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html

#71468
Feb 28, 2006 at 4:37pm

Thanks for showing me your lp.poppy~.

In my mind it didn’t seem necesarry at first to have a fundamental frequency, but yes.. it does, to represent the attractor.

What I am wondering about though is why you chose to have such a narrow range (/bandwith) of values when it reaches a state of “chaos” after a growth value of around 3.? Would it be possible to extend that to the whole frequency range?

Sorry if the question seems obvious to you as I am fairly fresh in programming.

//martin

#71469

You must be logged in to reply to this topic.