urandomSignal Generators:Random (Noise) Generatorsurandomurandom
truly random opcodes with controllable range.
DescriptionPlugin opcode in urandom.
Truly random opcodes with controllable range. These
units are for Unix-like systems only and use /dev/urandom to construct
Csound random values
Syntaxax urandom [imin, imax]ix urandom [imin, imax]kx urandom [imin, imax]Initializationix -- i-rate output value.
imin -- minimum value of range; defaults to -1.
imax -- maximum value of range; defaults to +1.
Notes
The algorithm produces 2^64 different possible values which
are scaled to fit the range requested. The randomness comes
form the usual Linux/OSX /dev/urandom method, and there is no
guarantee that it will be truly random, but there is a good
chance. It does not show any cycles.
Performanceax -- a-rate output value.
kx -- k-rate output value.
Examples
Here is an example of the urandom opcode at a-rate. It uses the file urandom.csd.
An example of the urandom opcode at a-rate.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is an example of the urandom opcode at k-rate. It uses the file urandom_krate.csd.
An example of the urandom opcode at k-rate.
Its output should include lines like this:
k1=0.229850
k1=-0.077047
k1=-0.199339
k1=-0.620577
k1=-0.119447
k1=-0.596258
k1=0.525800
k1=-0.171583
k1=-0.017196
k1=-0.974613
k1=-0.036276
See alsoRandom (Noise) GeneratorsCreditsAuthor: &namejohn;New in version 5.13