docs: new material theme, reorganize (wip)
This commit is contained in:
parent
02d4bd5b17
commit
a9b0a8725e
29 changed files with 498 additions and 503 deletions
61
resources/docs/extras/custom-module.md
Normal file
61
resources/docs/extras/custom-module.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# 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 {
|
||||
init: function(){
|
||||
// this will be executed once when the osc server starts
|
||||
},
|
||||
oscInFilter:function(data){
|
||||
// Filter incomming osc messages
|
||||
|
||||
var {address, args, host, port} = data
|
||||
|
||||
// do what you want
|
||||
|
||||
// address = string
|
||||
// args = array of {value, type} objects
|
||||
// host = string
|
||||
// port = integer
|
||||
|
||||
// return data if you want the message to be processed
|
||||
return {address, args, host, port}
|
||||
|
||||
},
|
||||
oscOutFilter:function(data){
|
||||
// Filter outgoing osc messages
|
||||
|
||||
var {address, args, host, port} = data
|
||||
|
||||
// same as oscInFilter
|
||||
|
||||
// return data if you want the message to be and sent
|
||||
return {address, args, host, port}
|
||||
}
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
```
|
||||
|
||||
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})`
|
||||
- `setTimeout`: `function(function, delay)`
|
||||
|
||||
|
||||
`sendOsc` and `receiveOsc` expect arguments formatted as follow:
|
||||
|
||||
- `address`: `string`
|
||||
- `args`: `array` of `{type:"OSC_TYPE_LETTER", value:VALUE}` `objects`
|
||||
- `host`: `string` ip address, valid hostname or `midi`
|
||||
- `port`: `integer` port number or `string` midi device name
|
||||
56
resources/docs/extras/midi.md
Normal file
56
resources/docs/extras/midi.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Sending / Receiving MIDI
|
||||
|
||||
Open Stage Control can send and receive midi messages using pyo / portmidi.
|
||||
|
||||
## Requirements
|
||||
|
||||
MIDI support requires additionnal softwares to be installed on the server's system:
|
||||
|
||||
- `python 2.7`
|
||||
- [`pyo`](http://ajaxsoundstudio.com/software/pyo/) >= 0.8.3
|
||||
|
||||
**Why an additionnal dependency ?**
|
||||
|
||||
Providing cross-platform midi support is not trivial, as it requires os-specific compilations that cannot be automated within Open Stage Control's current packaging workflow. Using a python addon seems the best compromise so far : the core app remains easy to build, and the extra dependency is easy to install.
|
||||
|
||||
Note: `pyo` doesn't support Windows 64bit.
|
||||
|
||||
## Setup
|
||||
|
||||
When running the app, the `-m / -midi` switch must be set; it accepts the following arguments (separated by spaces):
|
||||
|
||||
- `list`: prints the available midi inputs / outputs
|
||||
- `device_name:input,output`, where:
|
||||
- `device_name`
|
||||
- `input` is the midi input number (midi message sent to open-stage-control)
|
||||
- `output` is the midi output number (midi message sent from open-stage-control)
|
||||
|
||||
**Linux only**
|
||||
|
||||
- `device_name:virtual`: (requires [`mididings`](http://das.nasophon.de/mididings/) to be installed) creates a virtual midi device called 'Open Stage Control' with the following ports :
|
||||
- `_virtual_loopback_x`: used internally, don't connect anything to it.
|
||||
- `device_name_in`: virtual midi input
|
||||
- `device_name_out`: virtual midi output
|
||||
|
||||
Multiple devices can be declared (multiple virtual devices as well).
|
||||
|
||||
## Widget settings
|
||||
|
||||
In order to send midi messages, a widget must have at least one `target` formatted as follow;
|
||||
|
||||
`midi:device_name` (where `device_name` is one of the declared midi devices (see previous section))
|
||||
|
||||
## Supported commands
|
||||
|
||||
Here are the supported commands. One must use the `preArgs` option to make sure the correct number of arguments is sent.
|
||||
|
||||
| address | args | note |
|
||||
|---------|------|------|
|
||||
| `/note` | `channel note velocity` | (if `velocity` is `0`, a `note off` will be sent) |
|
||||
| `/control` | `channel cc value` | |
|
||||
| `/program` | `channel program` | |
|
||||
| `/pitch` | `channel LSB MSB` | |
|
||||
|
||||
|
||||
- `channel` is an integer between 1 and 16
|
||||
- `ǹote`, `velocity`, `cc`, `value`, `program`, `LSB`,`MSB` are integers between 0 and 127
|
||||
17
resources/docs/extras/property-inheritance.md
Normal file
17
resources/docs/extras/property-inheritance.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Property inheritance
|
||||
|
||||
Widgets can use each other's property values by using the following syntaxes:
|
||||
|
||||
- `@{this.propertyName}`
|
||||
- `@{parent.propertyName}`
|
||||
- `@{widgetId.propertyName}` (where `widgetId` is the target widget's `id`)
|
||||
|
||||
It can be used to:
|
||||
|
||||
- concatenate strings: `/@{parent.id}/some_suffix`
|
||||
- define object value: `["@{parent.id}"]`
|
||||
|
||||
If the retreived property is an object (`[] / {}`), it can be used as is or one can retreive a specfic item from it: `@{parent.variables.0}` will try to return the first item of the parent's `variables` property.
|
||||
|
||||
!!! note ""
|
||||
The root panel's `id` is `root`.
|
||||
33
resources/docs/extras/remote-control.md
Normal file
33
resources/docs/extras/remote-control.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Remote control
|
||||
|
||||
All widgets that send osc messages respond to the same messages. Additionnaly, Open Stage Control responds to some general osc commands.
|
||||
|
||||
|
||||
## `/EDIT id options`
|
||||
|
||||
|
||||
Apply a set of options to an existing widget by replacing the old ones with the new ones.
|
||||
|
||||
|
||||
- `id`: `string`, widget's `id`
|
||||
- `options`: `string`, JSON stringified object defining the new properties to merge
|
||||
- example: `{"label":"New Label", "color":"red"}`
|
||||
|
||||
!!! warning ""
|
||||
Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea
|
||||
|
||||
## `/EDIT_SOFT id options`
|
||||
|
||||
Apply a set of options to an existing widget by merging them to the widget's options.
|
||||
|
||||
|
||||
- `id`: `string`, widget's `id`
|
||||
- `options`: `string`, JSON stringified object defining the new properties to merge
|
||||
- example: `{"label":"New Label", "color":"red"}`
|
||||
|
||||
!!! warning ""
|
||||
Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea
|
||||
|
||||
## `/TABS id id etc`
|
||||
|
||||
Open the tabs designated by the `id` parameters. The target tab link must be accesible (opening a tab located in a disabled tab won't work unless you specify the parent tab's `id` before; the safest way to go is to pass the whole tab tree to enable).
|
||||
29
resources/docs/extras/theming.md
Normal file
29
resources/docs/extras/theming.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Theming
|
||||
|
||||
Theming is as simple as writing a tiny css file that will override the default style variables defined in [_vars.scss](https://github.com/jean-emmanuel/open-stage-control/blob/master/src/browser/scss/_vars.scss) :
|
||||
|
||||
```css
|
||||
:root {
|
||||
--color-accent:red;
|
||||
}
|
||||
```
|
||||
|
||||
This will change the default accent color to red. Variables can also be overridden for a specific subset of elements, for example :
|
||||
|
||||
```css
|
||||
.panel-container {
|
||||
--color-text:blue;
|
||||
}
|
||||
```
|
||||
|
||||
This will change the default text color to blue for all elements in panel widgets.
|
||||
|
||||
Of course, regular css is also allowed :
|
||||
|
||||
```css
|
||||
.widget .input {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
This will hide the widgets' value inputs.
|
||||
20
resources/docs/extras/url-options.md
Normal file
20
resources/docs/extras/url-options.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# URL Options
|
||||
|
||||
Client specific options can be set by adding query parameters to the server's url. One must prepend the url with a question mark (`?`) followed by `parameter=value` pairs separated with ampersands (`&`).
|
||||
|
||||
|
||||
| Option | Value | Default | Description |
|
||||
|----|----|----|----|
|
||||
| hdpi | 1 / 0 | 0 |enable high resolution canvas |
|
||||
| doubletab | number | 375 | sets the double tap/click time thershold in milliseconds |
|
||||
| zoom | number | 1 | sets the initial zoom |
|
||||
|
||||
Example:
|
||||
|
||||
`http://server-ip:port?hdpi=1`
|
||||
|
||||
|
||||
!!! note ""
|
||||
When using the built-in client, url options can be set through the `--url-options` switch.
|
||||
|
||||
Example: `open-stage-control --url-options zoom=2 doubletap=200`
|
||||
Loading…
Add table
Add a link
Reference in a new issue