object InFeedback extends ProductReader[InFeedback] with 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
- Alphabetic
- By Inheritance
- InFeedback
- 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(bus: GE, numChannels: Int = 1): InFeedback
- 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.
- 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
- 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): InFeedback
- Definition Classes
- InFeedback → 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