Packages

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

LocalOut

InFeedback

ControlDur

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalIn
  2. Serializable
  3. ProductReader
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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 .

  5. def ar: LocalIn
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. 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 .

  14. def kr: LocalIn
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def read(in: RefMapIn, key: String, arity: Int): LocalIn
    Definition Classes
    LocalInProductReader
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from ProductReader[LocalIn]

Inherited from AnyRef

Inherited from Any

Ungrouped