object LocalIn extends ProductReader[LocalIn] with Serializable
A UGen that reads buses that are local to the enclosing synth. These buses
should be written using a LocalOut
ugen. They behave like regular buses, but
are more convenient for the implementation of a self contained effect that uses
a feedback processing loop.
In a synth, there can be only each one control-rate and audio-rate LocalIn
/
LocalOut
pair. The signal written to a LocalOut
will not be read by the
LocalIn
until the next control block cycle, introducing a delay of
ControlDur
.
Warning: The argument has been changed numChannels: Int
in version
1.15.3 to init: GE
in version 1.16.0. The previous version was incompatible
with SuperCollider 3.6.x. A previous usage such as LocalIn.ar(2)
to create two
channels must now be expressed as LocalIn.ar(Seq(0, 0))
!
Examples
// ping-pong delay with feedback play { val src = Decay.ar(Impulse.ar(0.3), 0.1) * WhiteNoise.ar(0.2) val in = LocalIn.ar(Seq(0, 0)) + Seq[GE](src, 0) // read feedback, add source to left chan val dly = DelayN.ar(in, 0.2, 0.2) // delay sound val att = dly * 0.8 // apply decay factor // reverse channels to give ping pong effect LocalOut.ar(Seq(att.out(1), dly.out(0))) dly }
// tank play { val tones = Mix.fill(12) { Pan2.ar( Decay2.ar(Dust.ar(0.05), 0.1, 0.5) * 0.1 * FSinOsc.ar(IRand(36,84).midiCps).cubed.max(0), Rand(-1,1)) } val gen = tones + Pan2.ar(Decay2.ar(Dust.ar(0.03), 0.04, 0.3) * BrownNoise.ar, 0) val verb = Mix.fold(gen, 4) { z => AllpassN.ar(z, 0.03, Seq.fill(2)(Rand(0.005,0.02)), 1) } val in = LocalIn.ar(Seq(0, 0)) * 0.98 val flt = OnePole.ar(in, 0.5) val pan = Rotate2.ar(flt.out(0), flt.out(1), 0.23) val v1 = AllpassN.ar(pan, 0.05, Seq.fill(2)(Rand(0.01,0.05)), 2) val v2 = DelayN.ar(v1, 0.3, Seq(0.19,0.26)) val v3 = AllpassN.ar(v2 , 0.05, Seq.fill(2)(Rand(0.03,0.15)), 2) val out = LeakDC.ar(v3) val sig = gen + out LocalOut.ar(sig) sig }
// resonator play { val imp = Impulse.ar val in = LocalIn.ar val feed = imp + in * 0.995 // must subtract block-size for correct tuning // (try removing the ControlDur to here the pitch change) val time = 440.reciprocal - ControlDur.ir val dly = DelayC.ar(feed, time, time) LocalOut.ar(dly) // alternate between feedback and reference pitch val comp = Seq(dly, SinOsc.ar(440) * 0.2): GE comp * LFPulse.kr(1, Seq(0.0, 0.5)) }
- See also
- Alphabetic
- By Inheritance
- LocalIn
- Serializable
- ProductReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ar(init: GE = 0): LocalIn
- init
the initial state of the UGen. The number of channels of this signal should match with the number of channels written via
LocalOut
.
- def ar: LocalIn
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def kr(init: GE = 0): LocalIn
- init
the initial state of the UGen. The number of channels of this signal should match with the number of channels written via
LocalOut
.
- def kr: LocalIn
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def read(in: RefMapIn, key: String, arity: Int): LocalIn
- Definition Classes
- LocalIn → ProductReader
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated