Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

message()

Prints the provided text to the sampler's terminal. This function is merely for script development and debugging purposes.

The message() function is not appropriate for being used with your final production sounds, since it can lead to audio dropouts. You should only use the message() function to try out things, and to spot and debug problems with your scripts. Same applies to all text string variables in general. Don't use any string variables in your final production sounds. You may use preprocessor statements to handle this effectively.

Since it is a common requirement to switch a script between a development version and a production version, with either debug messages turned on or off, there is a dedicated built-in preprocessor condition to handle this conveniently for all message() calls: By simply adding SET_CONDITION(NKSP_NO_MESSAGE) to your script, all subsequent message() calls will be filtered out by the parser on preprocessor level. You can also revert that behavior at a subsequent section in your script by adding RESET_CONDITION(NKSP_NO_MESSAGE), so all subsequent calls to message() will be processed again. This way you can easily also just disable message() calls in certain sections of your script.

Function Prototype

message(text)

Arguments

Argument Name Data Type Description
text String The text to be printed to the terminal.
[required]

Return Value

None.

Remarks

This functions supports printing numbers (i.e. variables or literals) with standard units.

Examples

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