A demand-rate UGen which outputs random elements from a sequence. Dxrand
forbid repetitions, whereas Drand
allows duplicate elements to appear.
===Examples===
// sequence of constants
play {
val in = Dxrand(Seq(3, 5, 7, 8, 11), inf)
val tr = Impulse.kr(5)
val v = Demand.kr(tr, in)
v.poll(tr)
val f = (v + 62).midiCps
SinOsc.ar(f) * 0.1
}
- See also
- Companion
- class