UVI has very good support for scripting in Lua built into Falcon.
It allows you to do a lot (this list is copied from the UVI page):
- sequencing, arpeggiation
- performance tools to enhance and create more realistic sequences: Legato, Portamento…
- instrument-specific scripts to simulate idiomatic playing modes: chord recognition, chord voicing, string selection… etc
- Ensemble/unison simulation
- generative/algorithmic music
- effects: echo, tremolo, vibrato
- complete synthesis engine scripting and remote control.
- transformations: mirror, scale constraints…
- advanced instrument user interfaces with custom graphics
It’s quite easy to work with and allows for rather compact code.
The official documentation for lua-scripting in Falcon on the UVI website can be found here.
That page also links to learning resources for the Lua language itself.
The only thing you need to write your own scripts is a text editor, preferably one with syntax highlighting (SH) and code completion (CC) for Lua.
Here are some options:
- ZeroBrane is very lightweight and made specifically for Lua (and written in Lua too), supports SH and CC and all three major OS’. They ask for a donation, but it’s not mandatory.
- Komodo Edit is my personal favourite free text editor for JS, HTML and CSS, but unfortunately only support SH, not CC for Lua. Runs on Windows, OSX, Linux.
- Notepad ++ is very fast and lightweight, free, and supports both SH and (simple) CC. Windows only.
- SciTE is also a well known editor with support for Lua. Free for Windows and Linux, commercial for OSX. There are Lua specific scripts available here: Lua User Wiki
- Of course there are many more… 🙂
If you want your Lua scripts to show up in Falcon in the Event-Processor tab, they need to be copied to:
…Documents\UVI\Falcon\User Presets\EventProcessors\Script Processor\
If you load your Lua script into Falcon, you see it’s GUI and are offered several icons on top of that:
From left to right they are:
- The folder icon is for initially loading a script. You can also drag a .lua file directly from explorer or finder to the Falcon Events tab or drag it in from the Falcon browser.
- The lock icon allows you to password-protect your scripts. Mainly for commercial scripts, otherwise it makes more sense to leave them accessible so others can learn from them or modify them to their needs.
- Then rectangular icon opens the currently loaded script into the text editor that your system has assigned to Lua scripts.
- The harddrive icon is a toggle and when on, Falcon automatically re-loads the script if you change and save it in the external editor of your choice.
- The first icon on the right is for reloading the script manually – if you hold ALT it keeps all your current settings, otherwise it will set everything to defaults on reload (this may also be a reason for not-using the automatic refresh).
- The next icon opens the error console where all errors in your code will be shown.
- The last icon clears the console in case you got tons of errors and want only to see the new ones.
Other kinds of scripts show up differently (for instance on the Info tab if you create a custom GUI) but I recommend the UVI documentation if you want to dive deeper.