rsc3/doc/help/ugen/triggers/toggle-ff.help.scrbl

19 lines
342 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(toggle-ff trig)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Toggle flip flop. Toggles between zero and one upon receiving a trigger.
trig - trigger input
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((t (dust ar (x-line kr 1 1000 60 do-nothing)))
(s (sin-osc ar (mul-add (toggle-ff t) 400 800) 0)))
(audition (out 0 (mul s 0.1))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00