makerandom - set up a periodic random-number generator for control purposes, using a pfield-handle connect to an Instrument parameter
pfield-handle = makerandom("type", frequency, min, max[, seed])
makerandom returns a pfield-handle that will deliver data periodically from an internal RTcmix random-number generator. The period is determined by the frequency argument, and the random numbers will lie within the range set by the min and max arguments. The random-numbers will be generated according the the random-number distribution specified in the "type" string argument. These distributions are identical to the ones decribed in the maketable "random" table construction command. The optional seed argument allows the user to specify a particular seed value for the psuedorandom algorithm used by the random-number generator.
Many of the arguments for makerandom may themselves also be pfield-handles.
tight effect --------------------------------------------------------------- 0 only the min and max values appear 1 even distribution > 1 numbers cluster ever more tightly around mid 100 almost all numbers are equal to mid
pitch1 = makerandom("low", 10, 8.00, 8.11)
pitch2 = makerandom("high", 15, 8.00, 8.11)
wave = maketable("wave", 1000, 1.0, 0.2, 0.1)
WAVETABLE(0, 4.9, 15000, pitch1, 0.0, wave)
WAVETABLE(0, 4.9, 15000, pitch2, 1.0, wave)
This scorefile uses two random-number PField generators, one
operating at 10 Hz (10 values/second) and the other at
15 Hz (15 values/second) to control the pitch of two
WAVETABLE
notes, one in the left channel and one in the right. The pitch
(in octave.pitch-class notation) is coming directly
from the random-number pfield-handles, pitch1 and pitch2.
The range of these random-number generators is set to produce
values within the octave 8.00 to 8.11 (middle "C" to the "B"
above middle "C").
maketable, makeconnection, makeLFO, makefilter, makeconverter, makemonitor