Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference


Sorts the values in the given array. Since this function modifies the passed array, you must not pass a const or read-only array variable.

Function Prototype

sort(array, [descending])


Argument Name Data Type Description
array Integer Array Variable The integer array variable to be sorted.
descending Integer Number Defines in which order the array shall be sorted.
0: The values are sorted in ascending order.
1: The values are sorted in descending order.
[optional, default: 0]

Return Value



None yet.

See also

search(), array_equal()


Since LinuxSampler 2.0.0.svn52.

Dynamic, optional arguments are only supported by NKSP. If you want to retain compatibility to KSP, then you should always pass a parameter for the 2nd argument of this function.

Document Updated:  2017-05-28  |  Author:  Christian Schoenebeck