rsc3/doc/help/ugen/noise/n-rand.help.scrbl
2022-08-28 12:27:01 +02:00

22 lines
492 B
Racket

#lang scribble/manual
@(require (for-label racket))
@title{(n-rand lo hi n)}
Generates a single random float value in a sum of `n' uniform
distributions from `lo' to `hi'.
n = 1 : uniform distribution - same as rand
n = 2 : triangular distribution
n = 3 : smooth hump
as n increases, distribution converges towards gaussian
@racketblock[
(let ((f (mul (n-rand 1200 4000 2) (mce2 2 5)))
(a (line kr 0.2 0 0.01 remove-synth)))
(audition (out 0 (mul (f-sin-osc ar f 0) a))))
]