rsc3/doc/help/ugen/noise/coin-gate.help.scrbl

28 lines
646 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(coin-gate prob in)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
When it receives a trigger, it tosses a coin, and either passes the
trigger or doesn't.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let ((f (t-rand 300 400 (Coingate 0.8 (impulse kr 10 0)))))
(audition (out 0 (mul (sin-osc ar f 0) 0.2))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((p 0.2)
(t (mul (impulse ar 20 0) (add (sin-osc kr 0.5 0) 1)))
(t* (t-exp-rand (Mce 1000 1000) 12000 t))
(i (lambda () (Coingate (+ p (rand 0 0.1)) (mul t 0.5))))
(s (lambda () (ringz (i) t* 0.01)))
(ignore (lambda (f) (lambda (_) (f)))))
(audition (out 0 (mix/fill 3 (ignore s)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00