rsc3/doc/help/ugen/noise/n-rand.help.scrbl

23 lines
492 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(n-rand lo hi n)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
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
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(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))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00