message()
Prints the provided text to the sampler's terminal. This function is merely for script development and debugging purposes.
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
- on note
- message("Note " & $EVENT_NOTE & " was triggered with velocity " & $EVENT_VELOCITY)
- end on
- on release
- message("Note " & $EVENT_NOTE & " was released with release velocity " & $EVENT_VELOCITY)
- end on
- on controller
- message("MIDI Controller " & $CC_NUM " changed its value to " & %CC[$CC_NUM])
- end on