rsc3/doc/help/ugen/io/in.help.scrbl

47 lines
718 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(in num-channels rate bus)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Read signal from an audio or control bus.
Patching input to output.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition (out 0 (in 2 ar num-output-buses)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Patching input to output, with summed delay.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let ((i (in 2 ar num-input-buses)))
(audition (out 0 (add i (delay-n i 0.5 0.5)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Write noise to bus 10, then read it out. The Mrg is ordered.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition (mrg2 (out 0 (in 1 ar 10))
(out 10 (mul (pink-noise ar) 0.3))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Reading a control bus.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(with-sc3
(lambda (fd)
(send fd (c-set1 0 (random 200 5000)))))
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 (mul (sin-osc ar (in 1 kr 0) 0) 0.1)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00