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 madd
is used
instead of explicitly writing MulAdd
.
MulAdd(in, mul, add) == in.madd(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).madd(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
- Alphabetic
- By Inheritance
- MulAdd
- Serializable
- Serializable
- SingleOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def rate: MaybeRate
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- MulAdd → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )