XML Feeds

.

[maxmsp] Random between +/- 128.0??

Emmanuel Jourdan c74-mailinglists at e--j.com
Wed Aug 1 17:22:21 MDT 2007


On 2 août 07, at 01:13, UCDMSRA wrote:

> I think maybe I didn't sleep very well these days so when I need to  
> create a random number between +128.0 and -128.0, my brain suddenly  
> stopped and feels like empty.....
>
> I know "random" can only make 0+ numbers. I also think of the  
> possibilities by put "-" after random to make the number below  
> 0....however, I still want to make "real" random number between  
> +/-128.0 and it is must be float number, so the result will be  
> something like "9.5, -4.8, 25.4, 46.7, 53.6, -42,1...."

random 2570
|
/ 10.
|
- 128.

should do it, or something like "expr random(-12800 \, 129000) *  
0.001". You could also use "jstrigger (Math.random()*257 - 128)".

ej





More information about the maxmsp mailing list