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

14 lines
412 B
Racket

#lang scribble/manual
@(require (for-label racket))
@title{(rand lo hi)}
Generates a single random value in uniform distribution from lo to
hi. It generates this when the SynthDef first starts playing, and
remains fixed for the duration of the synth's existence.
(let* ((a (line kr 0.2 0 0.1 2))
(p (rand -1 1))
(s (mul (f-sin-osc ar (rand 200 1200) 0) a)))
(audition (out 0 (pan2 s p 1))))