Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference


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

Function Prototype

random(minimum, maximum)


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

Return Value

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


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.


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