Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

random()

Provides a pseudo random number generator. Each time this function is called, another random number will be returned.

Function Prototype

random(minimum, maximum)

Arguments

Argument Name Data Type Description
minimum Integer Number or
Real Number
The smallest number of allowed value range (including this value).
[required]
maximum Integer Number or
Real Number
The highest number of allowed value range (including this value).
[required]

Return Value

Data Type Description
Integer Number or
Real Number
Next random number within the requested value range.

Remarks

This functions accepts any standard unit and finalness for its two arguments. However the unit types of the two arguments must be identical. The return value's unit type is identical to the two passed arguments' one, and the return value's finalness is the case if at least one of the two arguments has finalness.

Examples

Document Updated:  2019-09-24  |  Author:  Christian Schoenebeck