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

28 lines
776 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(local-in num-channels rate)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Define and read from buses local to a SynthDef
num-channels - the number of channels of local buses.
Localin defines buses that are local to the SynthDef. These are
like the global buses, but are more convenient if you want to
implement a self contained effect that uses a feedback processing
loop. There can only be one audio rate and one control rate
Localin per SynthDef. The audio can be written to the bus using
local-out.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((a0 (mul (decay (impulse ar 0.3 0) 0.1) (mul (white-noise ar) 0.2)))
(a1 (add (local-in 2 ar) (mce2 a0 0)))
(a2 (delay-n a1 0.2 0.2)))
(audition (mrg2 (local-out (mul (mce-reverse a2) 0.8))
(out 0 a2))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00