Packages

object LocalIn extends 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 \ 1, dly \ 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 \ 0, flt \ 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
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalIn
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. 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 .

  15. def kr: LocalIn
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped