Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference


Performs a type cast from real number to integer number, which means it converts the passed real-number to an integer number and returns the latter as result value.

Any fractional value behind the decimal point of real-number is ignored by this conversion. So e.g. real_to_int(3.999) would return 3. If that's not what you want, then you might consider using e.g. round() or ceil() before doing the actual type conversion with this function.

Function Prototype



Argument Name Data Type Description
real-number Real Number The real number to be converted.

Return Value

Data Type Description
Integer Number Truncated Integer Number representation of the passed Real Number.


This functions accepts any standard unit and finalness for its argument real-number. The return value's standard unit and finalness is identical to the passed real-number's one.


None yet.

See also

int(), int_to_real(), round(), ceil()


Since LinuxSampler 2.1.1.svn6.

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