rsc3/doc/help/ugen/controls/decay2.help.scrbl
2022-08-28 12:27:01 +02:00

34 lines
697 B
Racket

#lang scribble/manual
@(require (for-label racket))
@title{(decay2 in attackTime decayTime)}
Exponential decay. decay has a very sharp attack and can produce
clicks. decay2 rounds off the attack by subtracting one decay from
another.
(decay2 in a d) is equivalent to (sub (decay in d) (Decay in a)).
Used as an envelope
@racketblock[
(audition
(out 0 (mul (decay2 (impulse ar (x-line kr 1 50 20 remove-synth) 0.25)
0.01
0.2)
(mul (f-sin-osc ar 600 0) 0.25))))
]
Compare the above with decay used as the envelope.
@racketblock[
(audition
(out 0 (mul (decay (impulse ar (x-line kr 1 50 20 remove-synth) 0.25)
0.01)
(mul (f-sin-osc ar 600 0) 0.25))))
]