RandID

object RandID extends ProductReader[RandID]

A UGen that determines which random number generator is used for the enclosing synth. All synths that use the same generator reproduce the same sequence of numbers when the same seed is set again.

===Examples===

// button alternatingly resets left and right seed
0 to 1 map { i =>
 play {
   RandID.ir(i)
   val x     = Impulse.kr(4)
   val pch   = TIRand.kr(40, 100, x)
   val b     = MouseButton.kr(lag = 0)
   val tr    = PulseDivider.kr(b, 2, i)
   pch.poll(x, if (i == 0) "left " else "right")
   RandSeed.kr(tr + Impulse.kr(0), 234)
   Out.ar(i, SinOsc.ar(pch.midiCps) * 0.2)
 }
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[RandID]
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 ir: RandID
def ir(id: GE): RandID
Value Params
id

the random number generator identifier from zero until the maximum number of generators specified with the server switch -r (default: 64)

def kr: RandID
def kr(id: GE): RandID
Value Params
id

the random number generator identifier from zero until the maximum number of generators specified with the server switch -r (default: 64)

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