aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.md
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-01-04 18:39:04 +0100
committercbdev <cb@cbcdn.com>2020-01-04 18:39:04 +0100
commit871bc1568f94ee4026fd64df062572b91d45d462 (patch)
tree76f5e675bcfa0f087c8aa5f247f6c6099dbad3af /backends/lua.md
parent3098484d9d8ab3becd6d82297c13963f359460f4 (diff)
downloadmidimonster-871bc1568f94ee4026fd64df062572b91d45d462.tar.gz
midimonster-871bc1568f94ee4026fd64df062572b91d45d462.tar.bz2
midimonster-871bc1568f94ee4026fd64df062572b91d45d462.zip
Add input_channel call to Lua backend
Diffstat (limited to 'backends/lua.md')
-rw-r--r--backends/lua.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/lua.md b/backends/lua.md
index f38e189..650fdb9 100644
--- a/backends/lua.md
+++ b/backends/lua.md
@@ -16,7 +16,7 @@ The following functions are provided within the Lua interpreter for interaction
| `interval(function, number)` | `interval(update, 100)` | Register a function to be called periodically. Intervals are milliseconds (rounded to the nearest 10 ms) |
| `input_value(string)` | `input_value("foo")` | Get the last input value on a channel |
| `output_value(string)` | `output_value("bar")` | Get the last output value on a channel |
-
+| `input_channel()` | `print(input_channel())` | Returns the name of the input channel whose handler function is currently running or `nil` if in an `interval`'ed function (or the initial parse step) |
Example script:
```
@@ -58,8 +58,8 @@ lua1.foo > lua2.bar
#### Known bugs / problems
-Using any of the interface functions (`output`, `interval`, `input_value`, `output_value`) as an
-input channel name to a Lua instance will not call any handler functions.
+Using any of the interface functions (`output`, `interval`, `input_value`, `output_value`, `input_channel`)
+as an input channel name to a Lua instance will not call any handler functions.
Using these names as arguments to the output and value interface functions works as intended.
Output values will not trigger corresponding input event handlers unless the channel is mapped