rsc3/doc/help/ugen/controls/k2a.help.scrbl

39 lines
699 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(k2a in)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Control rate to audio rate converter.
To be able to play a control rate UGen into an audio rate UGen,
sometimes the rate must be converted. k2a converts via linear
interpolation.
in - input signal
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (k2a (mul (white-noise kr) 0.3))))
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
(audition
(out 0 (mce2 (k2a (mul (white-noise kr) 0.3))
(mul (white-noise ar) 0.3))))
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[
(let* ((block-size 64) ;; no ugen for this?
2022-08-24 13:53:18 +00:00
(freq (mul (fdiv (mouse-x kr 0.1 40 1 0.1) block-size) sample-rate)))
(audition
(out 0 (mul (mce2 (k2a (lf-noise0 kr freq))
(lf-noise0 ar freq))
0.3))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00