Wrap

object Wrap extends ProductReader[Wrap]

A UGen that constrains a signal to a given range, by "wrapping" values outside the range. This is similar to the wrap2 binary operator but permits both a lower range value lo and an upper range value hi .

An input value greater than or equal to hi will be wrapped back to (in - hi) % (hi - lo) + lo . An input value less than lo will be wrapped back to hi - (lo - in) % (hi - lo) .

===Examples===

// wrap pulse wave to modulate timbre
play {
 val hi = SinOsc.ar(0.1).linExp(-1, 1, 0.01, 1.0)
 Wrap.ar(Pulse.ar(300), 0, hi) * 0.2 / hi
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[Wrap]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(in: GE, lo: GE, hi: GE): Wrap
Value Params
hi

upper margin of wrapping (exclusive)

in

input signal to constrain

lo

lower margin of wrapping (inclusive)

def ir(in: GE, lo: GE, hi: GE): Wrap
Value Params
hi

upper margin of wrapping (exclusive)

in

input signal to constrain

lo

lower margin of wrapping (inclusive)

def kr(in: GE, lo: GE, hi: GE): Wrap
Value Params
hi

upper margin of wrapping (exclusive)

in

input signal to constrain

lo

lower margin of wrapping (inclusive)

def read(in: RefMapIn, key: String, arity: Int): Wrap