rsc3/doc/help/ugen/demand/drand.help.scm

19 lines
587 B
Scheme
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
;; (drand length array)
;; (dxrand length array)
;; demand rate random sequence generators.
;; length - number of values to return
;; array - array of values or other ugens
;; dxrand never plays the same value twice, whereas drand chooses any
;; value in the list.
(let ((f (lambda (u)
(let* ((a (u dinf (make-mce (list 1 3 2 7 8))))
(t (impulse kr (mouse-x kr 1 400 1 0.1) 0))
(f (mul-add (demand t 0 a) 30 340)))
(mul (sin-osc ar f 0) 0.1)))))
(audition (out 0 (mce2 (f drand)
(f dxrand)))))