final case class ChannelProxy(elem: GE, index: Int) extends GE.Lazy with Product with Serializable
A helper graph element that selects a particular output channel of
another element. The index is an Integer
and thus cannot be
determined at graph expansion time. If this is desired, the
Select
UGen can be used.
Usually the graph element operator \
(backlash) can be used
instead of explicitly writing ChannelProxy
. Thus
elem \ index
is equivalent to ChannelProxy(elem, index)
.
UGens with a fixed number of outputs often have auxiliary methods
to access the channels in meaningful way, e.g. Pitch
has
method freq
and hasFreq
, which are equivalent to
pitch \ 0
and pitch \ 1
.
Because ScalaCollider allows late-expanding graph elements, we have no direct way to get some array of a UGen's outputs.
Examples
// frequency of a pitch estimator play { val sin = SinOsc.ar(MouseX.kr(10, 10000, warp = 1)) val pch = Pitch.kr(sin) val freq = pch \ 0 // same as pch.freq freq.poll(label = "freq") () }
- elem
a multi-channel element from which to select a channel.
- index
channel index starting at zero. It automatically wraps around the actual number of channels the input
elem
expands to.
- See also
- Alphabetic
- By Inheritance
- ChannelProxy
- Serializable
- Lazy
- GE
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
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
- 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()
- val elem: GE
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val index: Int
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeUGens: UGenInLike
Abstract method which must be implemented by creating the actual
UGen
s during expansion.Abstract method which must be implemented by creating the actual
UGen
s during expansion. This method is at most called once during graph expansion- returns
the expanded object (depending on the type parameter
U
)
- Attributes
- protected
- Definition Classes
- ChannelProxy → Expander
- 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 productElementNames: Iterator[String]
- Definition Classes
- Product
- def rate: MaybeRate
- Definition Classes
- ChannelProxy → GE
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- ChannelProxy → 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