docs: move custom module, start remote editing docs
This commit is contained in:
parent
165fa8f4da
commit
8db60cd01d
2 changed files with 13 additions and 0 deletions
42
resources/docs/user-guide/cutom-module.md
Normal file
42
resources/docs/user-guide/cutom-module.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Custom module
|
||||
|
||||
Using the `-c / --custom-module` command-line switch, users can load a javascript file to tune the way Open Stage Control behaves regarding osc.
|
||||
|
||||
It must be of the following form:
|
||||
|
||||
```js
|
||||
(function(){
|
||||
|
||||
// Do whatever you want, initialize some variables, declare some functions, ...
|
||||
|
||||
return {
|
||||
oscInFilter:function(data){
|
||||
// Filter incomming osc messages
|
||||
|
||||
var {address, args, host, port} = data
|
||||
|
||||
// do what you want
|
||||
|
||||
// return data if you want the message to be processed
|
||||
return data
|
||||
|
||||
},
|
||||
oscOutFilter:function(data){
|
||||
// Filter outgoing osc messages
|
||||
|
||||
// same as oscInFilter
|
||||
|
||||
// return data if you want the message to be and sent
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
```
|
||||
|
||||
The module is executed in a restricted context, only a few globals are available :
|
||||
|
||||
- `console`: `object`
|
||||
- `sendOsc`: `function({address, args, host, port})`
|
||||
- `receiveOsc`: `function({address, args, host, port})`
|
||||
13
resources/docs/user-guide/remote-editing.md
Normal file
13
resources/docs/user-guide/remote-editing.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Remote editing
|
||||
|
||||
The interface can be remotely edited by sending the appropriate osc messages (`-o` / `--osc-port` must be set).
|
||||
|
||||
## supported commands
|
||||
|
||||
### `/EDIT id options`
|
||||
|
||||
Apply a set of options to an existing widget
|
||||
|
||||
- `id`: `string`, widget's `id`
|
||||
- `option`: `string`, JSON object defining the new properties to merge
|
||||
- example: `{"label":"New Label", "color":"red"}`
|
||||
Loading…
Add table
Add a link
Reference in a new issue