rsc3/doc/help/ugen/triggers/running-min.help.scrbl

29 lines
662 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(running-min in trig)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Track minimum level. outputs the minimum value received at the
input. When triggered, the minimum output value is reset to the
current value.
in - input signal
trig - reset the output value to the current input value
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((t (impulse ar 2.0 0))
(f (mul-add (running-min (sub 1 (dust ar 20)) t) 500 200)))
(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* ((t (impulse kr (mouse-x kr 0.5 4 1 0.1) 0))
(f (mul-add (running-min (sub 2 (sin-osc kr 2 0)) t) 500 200)))
(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