Object/Class

de.sciss.synth.ugen

InFeedback

Related Docs: class InFeedback | package ugen

Permalink

object InFeedback extends Serializable

A UGen which reads a signal from an audio bus with a current or one cycle old timestamp.

Audio buses adhere to the concept of a cycle timestamp, which increases for each audio block calculated. When the various output ugens ( Out , OffsetOut , XOut ) write data to a bus, they mix it with any data from the current cycle, but overwrite any data from the previous cycle. ( ReplaceOut overwrites all data regardless.) Thus depending on node order and what synths are writing to the bus, the data on a given bus may be from the current cycle or be one cycle old at the time of reading.

In.ar checks the timestamp of any data it reads in and zeros any data from the previous cycle (for use within that node; the data remains on the bus). This is fine for audio data, as it avoids feedback, but for control data it is useful to be able to read data from any place in the node order. For this reason In.kr also reads data that is older than the current cycle.

In some cases one might also want to read audio from a node later in the current node order. This can be achieved with InFeedback . It reads from the previous cycle, and hence introduces a delay of one block size, which by default is 64 sample frames (equal to about 1.45 ms at 44.1 kHz sample rate).

Note that no delay occurs when the bus contains a signal which has been written already in the current cycle. The delay is only introduced when no present signal exists.

Examples
// feedback frequency modulation
play {
  val in = InFeedback.ar(0) // read output
  SinOsc.ar(in * 1300 + 300) * 0.4
}
// resonator
val bus = Bus.audio(s) // internal feedback bus

val x = play {
  val imp  = Impulse.ar(1)
  val in   = InFeedback.ar(bus.index)
  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)
  Out.ar(bus.index, 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))
}

x.free(); bus.free()  // do not forget to free the bus eventually
See also

ControlDur

LocalIn

In

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InFeedback
  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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ar(bus: GE, numChannels: Int = 1): InFeedback

    Permalink

    bus

    the index of the audio bus to read in from.

    numChannels

    the number of channels (i.e. adjacent buses) to read in. Since this is a constant, a change in number of channels of the underlying bus must be reflected by creating different SynthDefs.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped