The Script Processor module provides custom event processing capabilities, using the Lua-based scripting language UVIScript.
The Script Processor module has two primary sets of controls: the standard controls for interacting with the script itself, and the controls defined by the loaded script (knobs, buttons, menus, and so on).
- Let’s load the Nylon Guitar Model program from the Falcon Factory soundbank. Then go to the Main > Events tab, add the Script Processor module, then load the Performance > Strum preset.
- This script has one parameter, Lag, with a value range of 1 to 200 ms. Adjust Lag and play a chord, and you’ll hear the notes played in succession as if strummed rather than triggered all at once.
Falcon includes numerous factory preset scripts for a variety of purposes, such as automatic harmonization, unison voice generation, MIDI CC filtering, and more. You can also write your own scripts to further customize Falcon. - Let’s start with a simple script that prints some information about each note to the Script Processor console. Enter the following code into a text editor and save the file as “printer.lua”:
printer = OnOffButton(“Print”, true)
function onNote(e)
if printer.value == true then end print(“On : “, e)
postEvent(e)
end
function onRelease(e)
if printer.value == true then end print(“Off: “, e)
end
postEvent(e)
end - In the Script Processor module, press the Load Script button on the left and choose the “printer. lua” file.
- Then enable the Show Console Output option, which is generally used for displaying debug messages, and play a few notes – you will see that as each note is triggered and released, a line of information about the note is printed to the console so long as the script’s Print button is enabled.
If you disable the Print button, the messages no longer print to the console.