de.sciss.synth.ugen

LocalIn

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

ControlDur

InFeedback

LocalOut

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
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. 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 .

  7. def ar: LocalIn

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. 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 .

  17. def kr: LocalIn

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped