The information if a function can be called in the controller, the processor or in both threads, can be found on the Reference pages below the description of each function.
It looks like this:
Available in: Controller, Processor.
Script Error - Wrong Thread
If you call a function in the wrong thread, the script module will output an error message.
Example
--[[ Example for a script error when calling a function in the wrong thread. Functions that add or remove elements can only be called in the controller thread. The onNote callback runs in the processor thread. Therefore, removeMidiModule cannot be called in onNote. The script produces a script error, when playing a note. --]] function onNote(event) this.parent:removeMidiModule(this) end
The output message for the script error of the above example looks like this:
Processor Functions