rsc3/doc/help/ugen/envelopes/free-self-when-done.help.scrbl

25 lines
479 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(free-self-when-done src)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
free the synth when the 'done' flag of the unit at `src' is set.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((x (mouse-x kr -1 1 0 0.1))
(e (linen x 1 0.1 1 remove-synth)))
(audition (out 0 (mul (sin-osc ar 440 0) e))))
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* ((x (mouse-x kr -1 1 0 0.1))
(e (linen x 2 0.1 2 do-nothing)))
(audition (mrg2 (free-self-when-done e)
(out 0 (mul (sin-osc ar 440 0) e)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00