aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.md
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-18 22:36:35 +0100
committercbdev <cb@cbcdn.com>2020-03-18 22:36:35 +0100
commit9718e10c7f4151cea895f515c785c14e0021d967 (patch)
treee6f4b069b91d627e8a46c6b31bcf93197102aa2b /backends/lua.md
parentdaf9ac5b883cf981a163654d58932bfbdce619d9 (diff)
downloadmidimonster-9718e10c7f4151cea895f515c785c14e0021d967.tar.gz
midimonster-9718e10c7f4151cea895f515c785c14e0021d967.tar.bz2
midimonster-9718e10c7f4151cea895f515c785c14e0021d967.zip
Implement default channel handlers for Lua/Python
Diffstat (limited to 'backends/lua.md')
-rw-r--r--backends/lua.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/backends/lua.md b/backends/lua.md
index db4cf39..96e53c8 100644
--- a/backends/lua.md
+++ b/backends/lua.md
@@ -6,7 +6,8 @@ and manipulate events using the Lua scripting language.
Every instance has its own interpreter state which can be loaded with custom handler scripts.
To process incoming channel events, the MIDIMonster calls corresponding Lua functions (if they exist)
-with the value (as a Lua `number` type) as parameter.
+with the value (as a Lua `number` type) as parameter. Alternatively, a designated default channel handler
+may be supplied in the configuration.
The following functions are provided within the Lua interpreter for interaction with the MIDIMonster
@@ -42,9 +43,10 @@ The `lua` backend does not take any global configuration.
#### Instance configuration
-| Option | Example value | Default value | Description |
-|---------------|-----------------------|-----------------------|-----------------------|
-| `script` | `script.lua` | none | Lua source file (relative to configuration file)|
+| Option | Example value | Default value | Description |
+|-----------------------|-----------------------|-----------------------|-----------------------|
+| `script` | `script.lua` | none | Lua source file (relative to configuration file) |
+| `default-handler` | `handler` | none | Name of a function to be called as handler for all incoming channels (instead of the per-channel handlers) |
A single instance may have multiple `script` options specified, which will all be read cumulatively.