final case class MulAdd(in: GE, mul: GE, add: GE) extends SingleOut with Product with Serializable
A UGen that multiplies an input with another signal and then adds a third signal. This can be used to translate an element into a different value range.
Usually the graph element operator mulAdd
is used
instead of explicitly writing MulAdd
.
MulAdd(in, mul, add) == in.mulAdd(mul, add) == in * mul + add
Examples
// scale value range play { // input range -1 to +1, // output range ((-1 * 100) + 300) = 200 // to ((+1 * 100) + 300) = 400 val freq = SinOsc.kr(1).mulAdd(100, 300) // or MulAdd(..., 100, 300) freq.poll(label = "freq") SinOsc.ar(freq) * 0.1 }
- in
the input signal to scale and offset
- mul
the scaling factor, applied first to the input
- add
the offset, added after applying the multiplication
- See also
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- MulAdd
- Serializable
- SingleOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- 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
- val add: GE
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- lazy val hashCode: Int
- Definition Classes
- UGenSource → AnyRef → Any
- val in: GE
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeUGen(args: Vec[UGenIn]): UGenInLike
- Attributes
- protected
- Definition Classes
- MulAdd → UGenSource
- def makeUGens: UGenInLike
Abstract method which must be implemented by creating the actual
UGen
s during expansion. - val mul: GE
- final def name: String
- Definition Classes
- UGenSource
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- MulAdd → 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