diff --git a/app/assets/fonts b/app/assets/fonts
new file mode 120000
index 00000000..db461b94
--- /dev/null
+++ b/app/assets/fonts
@@ -0,0 +1 @@
+../../resources/fonts
\ No newline at end of file
diff --git a/resources/docs/docs.md b/resources/docs/docs.md
deleted file mode 120000
index 2539e41e..00000000
--- a/resources/docs/docs.md
+++ /dev/null
@@ -1 +0,0 @@
-docs/getting-started.md
\ No newline at end of file
diff --git a/resources/docs/docs/url-options.md b/resources/docs/docs/client-options.md
similarity index 58%
rename from resources/docs/docs/url-options.md
rename to resources/docs/docs/client-options.md
index 7dcae063..5cd7a07b 100644
--- a/resources/docs/docs/url-options.md
+++ b/resources/docs/docs/client-options.md
@@ -1,6 +1,4 @@
-# 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 (`&`).
+Client options can be set either with the server's `--client-options` option, or per client 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 |
@@ -15,9 +13,3 @@ Client specific options can be set by adding query parameters to the server's ur
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`
diff --git a/resources/docs/docs/credits.md b/resources/docs/docs/credits.md
index f19ae400..2661279c 100644
--- a/resources/docs/docs/credits.md
+++ b/resources/docs/docs/credits.md
@@ -5,8 +5,36 @@ This program is a free software released under the [GNU/GPL3](https://github.com
## Dependencies
-Open Stage Control relies on several other free softwares, including [Node.js](https://nodejs.org/), [Electron](http://electron.atom.io/), [osc.js](https://github.com/colinbdclark/osc.js), [babel](http://babeljs.io/), [browserify](http://browserify.org), [exorcist](https://github.com/thlorenz/exorcist), [express](http://expressjs.com), [node-sass](https://github.com/sass/node-sass), [jQuery](http://jquery.com/), [jQuery-UI](http://jqueryui.com/), [Font Awesome](http://fontawesome.io/), [stacktracejs](http://stacktracejs.com), [mathjs](http://mathjs.org/). A comprehensive and up-to-date list can be found [here](https://github.com/jean-emmanuel/open-stage-control/network/dependencies).
+Open Stage Control relies on several other free softwares:
+
+https://github.com/jean-emmanuel/open-stage-control/network/dependencies
## Contributors
https://github.com/jean-emmanuel/open-stage-control/graphs/contributors
+
+## Infrastructure supports
+
+----
+
+
+
+
+
+AMMD hosts this website and made this project possible by funding its first 2 years of development.
+
+----
+
+
+
+
+
+Discourse provides the community forum.
+
+----
+
+
+
+
+
+BrowserStack provides remote browsers for debbuging.
diff --git a/resources/docs/docs/custom-module.md b/resources/docs/docs/custom-module/custom-module.md
similarity index 77%
rename from resources/docs/docs/custom-module.md
rename to resources/docs/docs/custom-module/custom-module.md
index 4e4b00c5..7a0a397d 100644
--- a/resources/docs/docs/custom-module.md
+++ b/resources/docs/docs/custom-module/custom-module.md
@@ -50,9 +50,13 @@ module.exports = {
The module is executed in a restricted context, only a few globals are available :
+----
+
#### `app`: [`Event Emitter`](https://nodejs.org/api/events.html#events_class_eventemitter)
Useful for monitoring the events sent by the different clients. Event names can be found in [callbacks.js](https://github.com/jean-emmanuel/open-stage-control/blob/master/src/server/callbacks.js), callbacks are called with 2 arguments: `data` (object) and `client` (object: `{address, id}`)
+----
+
#### `receive`: `function(host, port, address, ...args, options)`
Send osc/midi message to connected clients. `host` and `port` can be specified to simulate a specific origin for the message.
@@ -61,29 +65,40 @@ Send osc/midi message to connected clients. `host` and `port` can be specified t
- `port` (optional): `integer` port number or `string` midi device name
- `address`: osc address
- `args`: value or `{type: "OSC_TYPE_LETTER", value: VALUE}` `object`
-- `options` (optional): set to `{clientId: id}` to define which client receives the message (where `id` is the client's id as retreived from `app` events or `oscOutFilter`)
+- `options` (optional): set to `{clientId: id}` to define which client receives the message (where `id` is the client's id as retreived from `app` events or `oscOutFilter`)
+
+----
#### `send`: `function(host, port, address, ...args)`
Send osc/midi to a target.
+----
#### `settings.read`: `function(name)`
Returns specified server option. `name` must be the option's long name without the leading dashes (ie: `"send"`, not `"s"`)
+----
+
#### `options`: `array`
Contains the extra options passed to `--custom-module` after the filename
+----
+
#### `loadJSON`: `function(path)`
Loads a json file (path is relative to the custom module location)
+----
+
#### `saveJSON`: `function(path, object)`
Saves an object/array to a json file (path is relative to the custom module location)
+----
+
#### Other javascript globals
- `console`
- `setTimeout`
@@ -91,34 +106,4 @@ Saves an object/array to a json file (path is relative to the custom module loca
- `setInterval`
- `clearInterval`
-## Managing big modules
-
-Custom modules don't let you use node's `require` function at runtime, but you can manage your sources in multiple files and bundle them into a single file before loading it in Open Stage Control.
-
-The common pattern for this is using the [browserify](http://browserify.org/) library:
-
-**1**. define some variable in `number.js`
-
-```javascript
-module.exports = 42
-```
-
-**2**. retreive it in your main module file (`main.js`):
-
-```javascript
-var num = require('./number.js')
-
-module.exports = {
- init: function(){
- console.log(num) // 42
- },
- oscInFilter: function(data){
- // etc
- }
-}
-```
-
-
-**3**. bundle your sources into `custom-module.js`:
-
-`browserify main.js -o custom-module.js --standalone module.exports`
+----
diff --git a/resources/docs/docs/custom-module/examples.md b/resources/docs/docs/custom-module/examples.md
new file mode 100644
index 00000000..cb3acefc
--- /dev/null
+++ b/resources/docs/docs/custom-module/examples.md
@@ -0,0 +1 @@
+!!! warning "Incomplete documentation"
diff --git a/resources/docs/docs/custom-module/managing-big-modules.md b/resources/docs/docs/custom-module/managing-big-modules.md
new file mode 100644
index 00000000..b9097065
--- /dev/null
+++ b/resources/docs/docs/custom-module/managing-big-modules.md
@@ -0,0 +1,29 @@
+Custom modules don't let you use node's `require` function at runtime, but you can manage your sources in multiple files and bundle them into a single file before loading it in OSC.
+
+The common pattern for this is using the [browserify](http://browserify.org/) library:
+
+**1**. define some variable in `number.js`
+
+```javascript
+module.exports = 42
+```
+
+**2**. retreive it in your main module file (`main.js`):
+
+```javascript
+var num = require('./number.js')
+
+module.exports = {
+ init: function(){
+ console.log(num) // 42
+ },
+ oscInFilter: function(data){
+ // etc
+ }
+}
+```
+
+
+**3**. bundle your sources into `custom-module.js`:
+
+`browserify main.js -o custom-module.js --standalone module.exports`
diff --git a/resources/docs/docs/css-tips.md b/resources/docs/docs/customization/css-tips.md
similarity index 98%
rename from resources/docs/docs/css-tips.md
rename to resources/docs/docs/customization/css-tips.md
index a06d9c52..ebd93d37 100644
--- a/resources/docs/docs/css-tips.md
+++ b/resources/docs/docs/customization/css-tips.md
@@ -31,7 +31,7 @@ CSS selectors can be used to apply styles to specific elements:
```
-!!! warning ""
+!!! info ""
Mixing Inline and Selector syntaxes doesn't work, once you use selectors, you have to use the `:host` selector to target the widget element.
## Extra css classes: `class`
@@ -39,7 +39,7 @@ CSS selectors can be used to apply styles to specific elements:
This non-standard css property can be used to add custom css classes to the widget element: `class: my-custom-class;`
Multiple classes can be added (one per `class` statement). Custom classes are always added to the widget's root element, css selectors are ignored.
-!!! warning ""
+!!! info ""
Using class names that are already used in the app can be hazardous. In order to avoid that, custom class names should be prefixed with something uncommon and preferably cool, such as `xxx-myclass` or `crispy-seitan-myclass`.
## Layering: `z-index`
@@ -50,7 +50,7 @@ Z-Axis ordering can be set using the `z-index` rule. Absolutely positionned widg
To make a widget ignore interactions (ie to be able to click through it), add `pointer-events:none;`.
-!!! note ""
+!!! info ""
This is always ignored when the editor is enabled.
## Responsive sizing
diff --git a/resources/docs/docs/theming.md b/resources/docs/docs/customization/themes.md
similarity index 71%
rename from resources/docs/docs/theming.md
rename to resources/docs/docs/customization/themes.md
index 6f47c976..01dc5840 100644
--- a/resources/docs/docs/theming.md
+++ b/resources/docs/docs/customization/themes.md
@@ -5,14 +5,6 @@ Themes can be loaded with the `--theme` option. Multiple themes can be combined.
Available themes (full color scheme):
- `orange`: grey and orange theme
-- `light`: light and blue
-- `dark`: blue night theme
-
-Available extensions (alternative visual settings)
-
-- `flat`: remove 3d effects
-- `alt-buttons`: colorful active buttons
-- `responsive-fonts`: bigger texts for bigger screens
## Creating a custom theme
@@ -20,7 +12,7 @@ Creating a custom theme is as simple as writing a tiny css file that will overri
```css
:root {
- --color-accent:red;
+ --color-accent: red;
}
```
@@ -28,15 +20,15 @@ This will change the default accent color to red. Variables can also be overridd
```css
.panel-container {
- --color-text:blue;
+ --color-accent: blue;
}
```
-This will change the default text color to blue for all elements in panel widgets.
+This will change the default accent color to blue for all elements in panel widgets.
## Scss / autoreload
-When running the app [from sources](/docs/getting-started), custom themes can be written in scss:
+When running the app from sources, custom themes can be written in scss:
- the scss file must be located in `src/browser/scss/themes/`
- run `npm run watch-css`
diff --git a/resources/docs/docs/examples.md b/resources/docs/docs/examples.md
deleted file mode 100644
index 50e5f5b8..00000000
--- a/resources/docs/docs/examples.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Community examples
-
-Feel free to submit your own by [opening an issue](https://github.com/jean-emmanuel/open-stage-control/issues/new?title=[example]) on github.
-
-## Ardour
-
-[Ardour Control](https://github.com/jean-emmanuel/ardour-control)
-
-
-
-## Reaper
-
-[Reaper OSC Panels](https://github.com/ThrashJazzAssassin/REAPER-OSC-panels)
-
-
-
-## QLab
-
-[QLab Cook Book / Open Stage Control](https://qlabcookbook.com/tag/open-stage-control/)
-
-
-
-## Bitwig
-
-[Open Stage Control Bitwig](https://github.com/kdejaeger/open-stage-control-bitwig)
-
-
-
-
-[OpenStageControl4Bitwig](http://www.mossgrabers.de/Software/Bitwig/Bitwig.html)
-
-- https://www.youtube.com/watch?v=u-fgArpsHQQ
-- https://www.youtube.com/watch?v=RvEMlo72ynQ
-
-
-## Cubase
-
-[Manaberry's UI](https://vi-control.net/community/threads/open-stage-control-tutorial-an-alternative-to-lemur-and-touchosc.72643/)
-
-
-
-# Ableton
-
-[Hiram's AaMakro5oul](https://github.com/hiramegl/AaMakro5oul) (v0.23.0 only)
-
-
diff --git a/resources/docs/docs/getting-started.md b/resources/docs/docs/getting-started.md
deleted file mode 100644
index e3b44f89..00000000
--- a/resources/docs/docs/getting-started.md
+++ /dev/null
@@ -1,206 +0,0 @@
-# Getting started
-
-!!! tip ""
- Prebuilt binaries for Linux, Windows and OS X can be found on the [release](https://github.com/jean-emmanuel/open-stage-control/releases) page.
-
-## Supported platforms
-
-Open Stage Control is a *desktop* server application. It runs on all [platforms supported by Electron](https://electron.atom.io/docs/tutorial/supported-platforms/) or [Node](https://nodejs.org/en/) (in headless mode only, see [Running without Electron](#running-without-electron)). Any device running a compatible browser can connect to the server :
-
-- Chrome/Chromium version `50` or later (Linux, MacOS, Windows, Android, etc)
-- iOS version `9.3` or later
-
-!!! tip "Android / iOS native app ?"
- There is no native mobile application. The server's url can be added to the home screen to launch the interface in fullscreen.
-
-
-## Options
-
-Below are the available command-line options. Note that when running without any command-line switch (ie from a file browser), a launcher window will spawn to help setting them.
-
-!!! tip ""
- Preferences are stored in the user's home folder in a file named `.open-stage-control` (hidden under Linux / macOS)
-
-|| Option | Description |
-|---||---|
-| `-s` | `--send` | default targets for all widgets (ip:port / domain:port / midi:port_name pairs) |
-| `-l` | `--load` | session file to load |
-| | `--state` | state file to load (osc messages will be sent, unless there are other clients connected) |
-| `-b` | `--blank` | load a blank session and start the editor |
-| `-c` | `--custom-module` | custom module file to load (custom options can be passed after the filename) |
-| `-p` | `--port` | http port of the server (default to 8080) |
-| `-o` | `--osc-port` | osc input port (default to --port) |
-| | `--tcp-port` | tcp server input port |
-| | `--tcp-targets` | tcp servers to connect to (ip:port pairs), does not susbtitute for --send |
-| `-m` | `--midi` | midi router settings |
-| `-d` | `--debug` | log received osc messages in the console |
-| `-n` | `--no-gui` | disable default gui |
-| `-g` | `--gui-only` | app server's url. If true, local port (--port) is used |
-| `-t` | `--theme` | theme name or path (mutliple values allowed) see [theming](/docs/theming/) |
-| `-e` | `--examples` | list examples instead of recent sessions |
-| | `--url-options` | [url options](/docs/url-options) (opt=value pairs) |
-| |`--disable-vsync` | disable gui's vertical synchronization |
-| |`--disable-gpu` | disable hardware acceleration |
-| |`--force-gpu` | ignore chrome's gpu blacklist |
-| |`--read-only` | disable session editing and session history changes |
-| |`--remote-saving` | disable remote session saving for hosts that don\'t match the regular expresion |
-| |`--remote-root` | set remote file browsing root folder |
-| |`--instance-name` | used to differenciate multiple instances in a zeroconf network |
-| |`--fullscreen` | launch in fullscreen mode (only affects the default gui, F11 to exit) |
-
-Command-line only :
-
-|| Option | Description |
-|---||---|
-| `-h` | `--help` | print available options |
-| `-v` | `--version` | print version number |
-| | `--inspect` | enable node/electron inspector (visit chrome://inspect with chromium to access DevTools) |
-
-**Examples**
-
-```bash
-open-stage-control --send 127.0.0.1:5555 127.0.0.1:6666 --port 7777
-```
-
-This will create an app listening on port 7777 for synchronization messages, and sending its widgets state changes to ports 5555 and 6666.
-
-```bash
-open-stage-control --no-gui --load path/to/session.js --port 9999
-```
-
-This will create a headless app available through http on port 9999 with session.js loaded automatically.
-
-!!! tip "What about HTTPS ?"
- Security is out of the app's scope. If you are concerned about safety, using a private - protected - network should be enough.
-
-
-## Run from sources
-
-Running the app from the sources slightly differs from using built binaries : we'll build and launch the app with npm (node package manager).
-
-**1. Requirements**
-
-- [Node.js >= 4.8](https://nodejs.org/en/#download)
-- [git](https://git-scm.com/downloads)
-
-**2. Download sources**
-
-```bash
-git clone https://github.com/jean-emmanuel/open-stage-control
-cd open-stage-control/
-# uncomment next line if you want the latest release
-# instead of the current development version
-# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
-npm install
-npm run build
-```
-
-!!! note "Updating from sources"
- ```bash
- git pull
- npm install
- npm run build
- ```
-
-**3. Run !**
-
-```bash
-npm start [ -- options]
-```
-
-!!! note ""
- A double hyphen (`--`) is used here to tell npm that the options are to be passed to the app.
-
-
-## Build from sources
-
-**1. Requirements**
-
-- [Node.js >= 4.8](https://nodejs.org/en/#download)
-- [git](https://git-scm.com/downloads)
-
-**2. Download sources & build package**
-
-```bash
-git clone https://github.com/jean-emmanuel/open-stage-control
-cd open-stage-control/
-# uncomment next line if you want the latest release
-# instead of the current development version
-# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
-
-# TARGET_PLATFORM can be linux, win32 (windows) or darwin (os x)
-export PLATFORM=TARGET_PLATFORM
-# TARGET_ARCH can be ia32, x64, armv7l or arm64
-export ARCH=TARGET_ARCH
-
-
-npm install
-
-# run this instead if ARCH is armv7l
-# npm install --arch=armv7l
-
-
-npm run build
-
-npm run package
-
-# Do one of the following if you want a deb package for debian/ubuntu
-npm run deb32
-npm run deb64
-npm run debarm
-```
-
-This will build the app in `dist/open-stage-control-PLATFORM-ARCH`.
-
-!!! note ""
- Building the app for windows from a linux system requires wine to be installed.*
-
-## Running in a headless context
-
-Electron, Open Stage Control's engine, is based on chromium and can't run out of the box without a display server. However, using a virtual framebuffer does the trick. Detailed instructions can be found in Electron's [documentation](http://electron.atom.io/docs/tutorial/testing-on-headless-ci/).
-
-In short: install [xvfb](https://en.wikipedia.org/wiki/Xvfb) and prepend your command with `xvfb-run`:
-
-```bash
-xvfb-run open-stage-control -n
-```
-
-## Running without Electron
-
-It is possible to run the server in headless mode without Electron using [node](https://nodejs.org/en/download/package-manager/) (v6 or higher) :
-
-```bash
-node /path/to/packaged/open-stage-control/resources/app/ -n
-node /path/to/sources/open-stage-control/app/ -n
-```
-
-Or using the precompilled binaries for node:
-
-```bash
-node /path/to/packaged/open-stage-control-node/ -n
-```
-
-To build the app for node only from sources:
-
-```bash
-
-# git clone, etc...
-
-npm install
-
-npm run build
-
-npm run package-node
-
-```
-
-## Running in a terminal on Windows
-
-Windows users launching the app from a terminal need to add a double dash (`--`) before their options:
-
-```bash
-open-stage-control.exe -- --port 5555 [...]
-
-# when running from sources
-npm start -- -- [options]
-```
diff --git a/resources/docs/docs/getting-started/running-from-sources.md b/resources/docs/docs/getting-started/running-from-sources.md
new file mode 100644
index 00000000..62ddfb23
--- /dev/null
+++ b/resources/docs/docs/getting-started/running-from-sources.md
@@ -0,0 +1,79 @@
+## Requirements
+
+- [Node.js](https://nodejs.org/en/#download)
+- [git](https://git-scm.com/downloads)
+
+
+## Run from sources
+
+Running the app from the sources slightly differs from using built binaries : we'll build and launch the app with npm (node package manager).
+
+**2. Download sources**
+
+```bash
+git clone https://github.com/jean-emmanuel/open-stage-control
+cd open-stage-control/
+# uncomment next line if you want the latest release
+# instead of the current development version
+# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
+npm install
+npm run build
+```
+
+!!! info "Updating from sources"
+ ```bash
+ git pull
+ npm install
+ npm run build
+ ```
+
+**3. Run !**
+
+```bash
+npm start [ -- options]
+```
+
+!!! info ""
+ A double hyphen (`--`) is used here to tell npm that the options are to be passed to the app.
+
+
+## Package from sources
+
+```bash
+git clone https://github.com/jean-emmanuel/open-stage-control
+cd open-stage-control/
+# uncomment next line if you want the latest release
+# instead of the current development version
+# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
+
+# TARGET_PLATFORM can be linux, win32 (windows) or darwin (os x)
+export PLATFORM=TARGET_PLATFORM
+# TARGET_ARCH can be ia32, x64, armv7l or arm64
+export ARCH=TARGET_ARCH
+
+
+npm install
+
+# run this instead if ARCH is armv7l
+# npm install --arch=armv7l
+
+
+npm run build
+
+npm run package
+
+# Do one of the following if you want a deb package for debian/ubuntu
+npm run deb32
+npm run deb64
+npm run debarm
+
+
+# The node-only package can be built with
+npm run package-node
+
+```
+
+This will build the app in `dist/open-stage-control-PLATFORM-ARCH`.
+
+!!! info ""
+ Building the app for windows from a linux system requires wine to be installed.
diff --git a/resources/docs/docs/getting-started/running-with-node.md b/resources/docs/docs/getting-started/running-with-node.md
new file mode 100644
index 00000000..0ad4098f
--- /dev/null
+++ b/resources/docs/docs/getting-started/running-with-node.md
@@ -0,0 +1,13 @@
+It is possible to run the server in headless mode using [Node.js](https://nodejs.org/en/download/package-manager/). This allows running OSC on systems that
+
+
+1. Install [Node.js](https://nodejs.org/en/download/package-manager/)
+2. Download `open-stage-control-[version]-node.zip` package and extract it
+3. Run `node /path/to/open-stage-control`
+
+
+!!! info
+ When running from sources or with regular binaries (packaged with electron), the command slightly differs:
+
+ - electron package: `node /path/to/open-stage-control/resources/app`
+ - from sources: `node /path/to/open-stage-control/app`
diff --git a/resources/docs/docs/getting-started/server-setup.md b/resources/docs/docs/getting-started/server-setup.md
new file mode 100644
index 00000000..143930ef
--- /dev/null
+++ b/resources/docs/docs/getting-started/server-setup.md
@@ -0,0 +1,50 @@
+# Server options
+
+Below are the available command-line options. Note that when running without any command-line switch (ie from a file browser), a launcher window will spawn to help setting them.
+
+
+| Option | Description |
+|---|---|
+| --send | default targets for all widgets (ip: port / domain: port / midi: port_name pairs) |
+| --load | session file to load |
+| --state | state file to load |
+| --custom-module | custom module file to load (custom options can be passed after the filename) |
+| --port | http port of the server (default to 8080) |
+| --osc-port | osc input port (default to --port) |
+| --tcp-port | tcp server input port |
+| --tcp-targets | tcp servers to connect to (ip: port pairs), does not susbtitute for --send |
+| --midi | midi router settings |
+| --debug | log received osc messages in the console |
+| --no-gui | disable default gui |
+| --theme | theme name or path (mutliple values allowed) |
+| --client-options | client options (opt=value pairs) |
+| --disable-vsync | disable gui's vertical synchronization |
+| --force-gpu | ignore chrome's gpu blacklist |
+| --read-only | disable session editing and session history changes |
+| --remote-saving | disable remote session saving for hosts that don't match the regular expresion |
+| --remote-root | set remote file browsing root folder |
+| --instance-name | used to differenciate multiple instances in a zeroconf network |
+| --fullscreen | launch in fullscreen mode (only affects the default client gui) |
+
+The following options can only be set when running the app from a terminal:
+
+
+| Option | Description |
+|---|---|
+| --disable-gpu | disable hardware acceleration |
+| --inspect | enable node/electron inspector |
+| --cache-dir | override default cache directory |
+| --config-file | override default config file (defaults to cache-dir/config.json) |
+| --help | Show help |
+| --version | Show version number |
+
+## Running in a terminal on Windows
+
+Windows users launching the app from a terminal need to add a double dash (`--`) before their options:
+
+```bash
+open-stage-control.exe -- --port 5555 [...]
+
+# when running from sources
+npm start -- -- [options]
+```
diff --git a/resources/docs/docs/getting-started/supported-platforms.md b/resources/docs/docs/getting-started/supported-platforms.md
new file mode 100644
index 00000000..f637ceb6
--- /dev/null
+++ b/resources/docs/docs/getting-started/supported-platforms.md
@@ -0,0 +1,9 @@
+# Supported platforms
+
+Open Stage Control is a *desktop* server application. It runs on all [platforms supported by Electron](https://electron.atom.io/docs/tutorial/supported-platforms/) or [Node](https://nodejs.org/en/) (in headless mode only, see [Running with Node](./running-with-node.md)). Any device running a compatible browser can connect to the server :
+
+- Chrome/Chromium version `60` or later (Linux, MacOS, Windows, Android, etc)
+- iOS version `10.3` or later
+
+!!! info "Android / iOS app ?"
+ There is no native mobile application. The server's url can be added to the home screen to launch the interface in fullscreen.
diff --git a/resources/docs/docs/interface.md b/resources/docs/docs/interface.md
deleted file mode 100644
index a555209a..00000000
--- a/resources/docs/docs/interface.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# User interface
-
-The interface is made of two main components: the widgets and the sidepanel.
-
-## Widgets
-
-All widgets are contained in the `root` widget, a special `panel` widget that can only contain tabs.
-
-### Interacting with widgets
-
-| Mouse | Touch | Description |
-|---|---|---|
-| Click | Tap | Handled at pressing time, not releasing. |
-| Double Click | Double Tap | Some widgets handle double click / tap events. |
-| Drag | Drag | The widgets respond to mouse and touch drag gestures with a 1:1 precision ratio. |
-| `Ctrl` + Drag | | Holding the `Ctrl` key while dragging with the mouse increases the gesture's precision by 10.|
-| | Two-fingers drag (single target) | Using two fingers on a single-touch target increases the gesture's precision by 10. |
-
-
-## Sidepanel
-
-The sidepanel can be opened by clicking the navigation icon in the upper right corner or by pressing `F10`.
-
-### State management
-
-- Store: save the state of all widgets in the temporary slot
-- Recall: reload saved state from the temporary slot
-- Send All: make all widgets send their current value
-- Save / Save As: save the state of all widgets to a `.state` file on the server
-- Load: load a state from a `.state` file on the server
-- Export: save to local filesystem
-- Import: load from local filesystem
-
-### Traversing gestures
-
-By default, a dragging gesture can only affect the widget it started on. Enabling traversing gesture does two things:
-
-- make gestures affect every widgets no matter where they started
-- make sliders-like widgets respond as if their `snap` option is enabled
-
-When traversing gestures are set to `auto`, these will only affect widgets that have the same type as the first touched widget.
-
-### Editor
-
-See [Editing sessions](/docs/editing-sessions.md).
diff --git a/resources/docs/docs/midi.md b/resources/docs/docs/midi/midi-messages.md
similarity index 51%
rename from resources/docs/docs/midi.md
rename to resources/docs/docs/midi/midi-messages.md
index 1cd9647e..35a3008c 100644
--- a/resources/docs/docs/midi.md
+++ b/resources/docs/docs/midi/midi-messages.md
@@ -1,49 +1,7 @@
-## Requirements
-
-MIDI support requires additional software to be installed on the server's system:
-
-- python (2 or 3)
-- python package [python-rtmidi](https://spotlightkid.github.io/python-rtmidi/installation.html)
-
-To install `python-rtmidi`, run `pip install python-rtmidi` (python 2) in a terminal or `pip3 install python-rtmidi` (python 3).
-
-!!! note "Why an additionnal dependency ?"
- Providing cross-platform MIDI support is not trivial, as it requires OS-specific compilation that cannot be automated within Open Stage Control's current packaging workflow. Using a python addon seems to be the best compromise so far : the core app remains easy to build, and the extra dependency is easy to install.
-
-## Setup
-
-When running the app, the `-m / --midi` switch must be set; it accepts the following options (separated by spaces):
-
-- `list`: prints the available MIDI ports to the console; numbers in the first column may be used for `input`/`output` definition below
-- `device_name:input,output`: connect to midi ports `input` and `output`; osc messages sent to target `midi:device_name` will be processed as midi events; Multiple devices can be declared. If the `device_name` contains white spaces, the declaration must be enquoted (ie `"spaced name:input,output"`). `device_name` doesn't need to match the actual midi device name, it is just an identifier (see [Widget settings](#widget-settings)).
-- `sysex`: parse incomming system exclusive messages (disabled by default)
-- `pc_offset`: send program changes with a `-1` offset to match some software/hardware implementations
-- `path=/path/to/python`: indicates where to find python or python3 binary in case open stage control doesn't (`Error: spawn python3 ENOENT`)
-
-*Linux only:*
-
-- `device_name:virtual`: creates a virtual midi device with one input port and one output port
-- `jack`: use JACK MIDI instead of ALSA (add as extra parameter). `rtmidi` must be compiled with `--jack-midi` flag for this to work.
-
-!!! tip
- When using the launcher window, midi devices can be listed by right-clicking and choosing `Midi > List Devices`
-
-## Widget settings
-
-In order to send MIDI messages, a widget must have at least one `target` formatted as follows:
-
-`midi:device_name` (where `device_name` is one of the declared midi devices)
-
-!!! warning
- Messages received from a MIDI port only affect widgets that send to this port.
-
-
-## Supported MIDI messages
-
-!!! warning ""
+!!! info ""
Define static argument values using the [`preArgs`](/docs/widgets-reference/#preArgs) option in order to complete the respective MIDI message.
-
+----
#### `/note channel note velocity`
@@ -63,6 +21,8 @@ A push button might be configured as follows in order to send a MIDI note whose
- `off`: 0 (to send a noteOff on button release)
- `target`: ["midi:device_name"] (where device_name is one of the declared midi devices defined during [setup](#setup))
+----
+
#### `/control channel cc value`
Control change event.
@@ -80,6 +40,8 @@ A fader might be configured as follows in order to send a MIDI control message (
- `range`: {"min": 0, "max": 127} (MIDI values are encoded in this range)
- `target`: ["midi:device_name"]
+----
+
#### `/program channel program`
Program change event.
@@ -87,9 +49,11 @@ Program change event.
- `channel`: integer between 1 and 16
- `program`: integer between 0 and 127*
-!!! note
+!!! info
\* Some devices / softwares display the `program` value between 1 and 128, thus interpreting `program change 0` as `program change 1` and so on. Enable the `pc_offset` option to make Open Stage Control behave this way.
+----
+
#### `/pitch channel pitch`
PitchWheel event.
@@ -97,6 +61,8 @@ PitchWheel event.
- `channel`: integer between 1 and 16
- `pitch`: integer between 0 and 16383
+----
+
#### `/sysex msg v1 .. vN`
System exclusive message.
@@ -105,3 +71,5 @@ System exclusive message.
- `v1, .., vN`: values encoded as hexadecimal data strings to include in `msg`. Most probably, you will need to sepcify a [custom module](/docs/custom-module/) in order to convert numeric widget values into the required hexadecimal format. In general, this conversion will be different for each manufacturer / device.
For a very simple example, refer to session 'sysex.json' found in the application's sub folder 'resources/app/examples/'. Please remember to adjust the button's `target` to the `device_name` used in your MIDI setup.
+
+----
diff --git a/resources/docs/docs/midi/midi-setup.md b/resources/docs/docs/midi/midi-setup.md
new file mode 100644
index 00000000..9e0f427a
--- /dev/null
+++ b/resources/docs/docs/midi/midi-setup.md
@@ -0,0 +1,36 @@
+## Requirements
+
+MIDI support requires additional software to be installed on the server's system:
+
+- python (2 or 3)
+- python package [python-rtmidi](https://spotlightkid.github.io/python-rtmidi/installation.html)
+
+To install `python-rtmidi`, run `pip install python-rtmidi` (python 2) in a terminal or `pip3 install python-rtmidi` (python 3).
+
+!!! info "Why an additionnal dependency ?"
+ Providing cross-platform MIDI support is not trivial, as it requires OS-specific compilation that cannot be automated within Open Stage Control's current packaging workflow. Using a python addon seems to be the best compromise so far : the core app remains easy to build, and the extra dependency is easy to install.
+
+## Setup
+
+When running the app, the `-m / --midi` switch must be set; it accepts the following options (separated by spaces):
+
+- `list`: prints the available MIDI ports to the console; numbers in the first column may be used for `input`/`output` definition below
+- `device_name:input,output`: connect to midi ports `input` and `output`; osc messages sent to target `midi:device_name` will be processed as midi events; Multiple devices can be declared. If the `device_name` contains white spaces, the declaration must be enquoted (ie `"spaced name:input,output"`). `device_name` doesn't need to match the actual midi device name, it is just an identifier (see [Widget settings](#widget-settings)).
+- `sysex`: parse incomming system exclusive messages (disabled by default)
+- `pc_offset`: send program changes with a `-1` offset to match some software/hardware implementations
+- `path=/path/to/python`: indicates where to find python or python3 binary in case open stage control doesn't (`Error: spawn python3 ENOENT`)
+
+*Linux only:*
+
+- `device_name:virtual`: creates a virtual midi device with one input port and one output port
+- `jack`: use JACK MIDI instead of ALSA (add as extra parameter). `rtmidi` must be compiled with `--jack-midi` flag for this to work.
+
+
+## Widget setup
+
+In order to send MIDI messages, a widget must have at least one `target` formatted as follows:
+
+`midi:device_name` (where `device_name` is one of the declared midi devices)
+
+!!! warning
+ Messages received from a MIDI port only affect widgets that send to this port.
diff --git a/resources/docs/docs/remote-control.md b/resources/docs/docs/remote-control.md
index f936615f..553b09a7 100644
--- a/resources/docs/docs/remote-control.md
+++ b/resources/docs/docs/remote-control.md
@@ -3,7 +3,7 @@
All widgets that send osc messages respond to the same messages. Additionnaly, Open Stage Control responds to some general osc commands.
-## `/EDIT id options`
+#### `/EDIT id options`
Apply a set of options to an existing widget by replacing the old ones with the new ones.
@@ -13,10 +13,10 @@ Apply a set of options to an existing widget by replacing the old ones with the
- `options`: `string`, [JSON5](https://github.com/json5/json5) stringified object defining the new properties to merge
- example: `{"label":"New Label", "color":"red"}`
-!!! warning ""
+!!! info ""
Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea
-## `/EDIT/MERGE id options`
+#### `/EDIT/MERGE id options`
Apply a set of options to an existing widget by merging them to the widget's options.
@@ -25,18 +25,18 @@ Apply a set of options to an existing widget by merging them to the widget's opt
- `options`: `string`, [JSON5](https://github.com/json5/json5) stringified object defining the new properties to merge
- example: `{"label":"New Label", "color":"red"}`
-!!! warning ""
+!!! info ""
Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea
-## `/EDIT/UNDO`
+#### `/EDIT/UNDO`
Undo editing action
-## `/EDIT/REDO`
+#### `/EDIT/REDO`
Redo editing action
-## `/EDIT/GET target id`
+#### `/EDIT/GET target id`
Sends back a widget's data (JSON stringified object), including its children, to specified target.
@@ -48,7 +48,7 @@ Replies `/EDIT/GET id data`
- `id`: `string`
- `data`: `string`
-## `/EDIT/GET target address preArg1 preArg2 ...`
+#### `/EDIT/GET target address preArg1 preArg2 ...`
Sends back a widget's data (JSON stringified object), including its children, to specified target.
@@ -63,7 +63,7 @@ Replies `/EDIT/GET address preArg1 preArg2 ... data`
- `data`: `string`
-## `/GET target id`
+#### `/GET target id`
Sends back a widget's value to specified target.
@@ -75,7 +75,7 @@ Replies `/GET id value`
- `id`: `string`
- `value`: `*`
-## `/GET target address preArg1 preArg2 ...`
+#### `/GET target address preArg1 preArg2 ...`
Sends back a widget's value to specified target.
@@ -89,18 +89,18 @@ Replies `/GET address preArg1 preArg2 ... value`
- `preArg[1...]`: `*`, widget's `preArgs`
- `value`: `*`
-## `/GET/#`
+#### `/GET/#`
Same as `/GET` but uses the widget's address instead of `/GET` to reply.
-## `/SET target id value`
+#### `/SET target id value`
Set a widget's value as if it was interacted with from the interface. This is likely to make it send its value.
- `id`: `string`, widget's `id`
- `value`: `*`, widget's new value
-## `/SET address preArg1 preArg2 ... value`
+#### `/SET address preArg1 preArg2 ... value`
Set a widget's value as if it was interacted with from the interface. This is likely to make it send its value.
@@ -109,28 +109,23 @@ Set a widget's value as if it was interacted with from the interface. This is li
- `value`: `*`, widget's new value
-## `/STATE/GET target`
+#### `/STATE/GET target`
Sends back the app's state to specified target
- `target`: `string`, `ip:port` pair
-## `/STATE/SET state`
+#### `/STATE/SET state`
Set widgets' state
- `state`: `string`, json stringified object (`"widget_id": value` pairs)
-## `/STATE/STORE`
+#### `/STATE/STORE`
Save the state of all widgets in the temporary slot.
-## `/STATE/RECALL`
+#### `/STATE/RECALL`
Reload saved state from the temporary slot.
-
-
-## `/TABS id id etc`
-
-Open the tabs designated by the `id` parameters.
diff --git a/resources/docs/docs/editing-sessions.md b/resources/docs/docs/user-interface/editor.md
similarity index 55%
rename from resources/docs/docs/editing-sessions.md
rename to resources/docs/docs/user-interface/editor.md
index 2e0e0d31..f0c5cbc0 100644
--- a/resources/docs/docs/editing-sessions.md
+++ b/resources/docs/docs/user-interface/editor.md
@@ -1,19 +1,13 @@
-# Editing sessions
+!!! warning "Incomplete documentation"
-The session editor can be enabled from the sidepanel. Once enabled, clicking on a widget will make it the *selected widget*.
-
-## Root panel
-
-The root panel can be selected by clicking on the "Root" button in the sidepanel.
## Context menu
Right clicking / long touch on a widget or on a tab will also display a context menu providing useful utilities :
-- `Edit parent`: select widget's parent for edition
+- `Show in tree`: show widget in project tree
- `Copy`: copy widget's data
- `Cut`: copy widget's data and delete selected widget
-- `Wrap in`: wrap the widget in a new container
- `Paste`: paste copied widget in selected container
- `Paste`: paste the widget as is
- `ID + 1` : increments the id of the copied widget (and all its children) before pasting
@@ -26,14 +20,13 @@ Right clicking / long touch on a widget or on a tab will also display a context
By default, sessions are saved and opened on the server's filesystem. When saving a session opened by mutliple clients, these will reload the session file automatically.
-!!! note
+!!! info
It is possible to limit this feature to specific client addresses by using the server's `--remote-saving` option. For example:
- `open-stage-control --remote-saving 127.0.0.1|192.168.0.10`
+
+ `open-stage-control --remote-saving "127.0.0.1|192.168.0.10"`
Will disable remote saving except for the clients with ip addresses `127.0.0.1` (the server's local address) and `192.168.0.10`.
-
-
## Import / Export
Sessions can be exported/imported on the device's filesystem, doing so has a few limitations:
@@ -55,45 +48,11 @@ Properties are written in JSON, with some flexibility brought by the [JSON5](htt
Selected widget can be resized using its south, south-east and east handles. It can be dragged with its north-west handle. Using this feature will convert position and size values to plain number values, thus breaking previously set percent or inherited values.
-## Keyboard shortcuts
-
-The following shortcuts are always available:
-
-| Shortcut | Description |
-|---|---|
-| `mod + e` | enable/disable editor |
-| `mod + s` | save session |
-| `mod + shift s` | export session as... |
-| `mod + o` | open a session file |
-
-The following shortcuts are available only when the editor is enabled:
-
-| Shortcut | Description |
-|---|---|
-| `mod + click`* | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.|
-| `shift + click + drag`* | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If `mod` is pressed too, current selection is kept and will be merged with the new one if possible. |
-| `f2` | Edit selected widget's label |
-| `mod + z` | Undo |
-| `mod + y / mod + shift + z` | Redo |
-| `delete` (`backspace` on Mac) | Delete selected widgets |
-| `mod + c` | Copy selected widgets |
-| `mod + x` | Cut selected widgets |
-| `mod + v` | Paste clipboard in selected widget |
-| `mod + shift + v` | Paste and increment id |
-| `up, down, left, right` | Move selected widgets (1 grid unit, hold `shift` for 5 grid units) |
-| `alt + [up, down, left, right]` | Resize selected widgets (1 grid unit, hold `shift` for 5 grid units) |
-| `mod + a` | Select current widget's siblings and itself |
-| `mod + shift + a` | Cancel current widget selection |
-| `mod + up` | Select current widget's parent |
-| `mod + down` | Select current widget's first child |
-| `mod + right` | Select current widget's next sibling |
-| `mod + left` | Select current widget's previous sibling |
-Where `mod` is `ctrl` except on MacOs (`command`)
+!!! info ""
+ \* *Multi-widgets editing*
-
-!!! note "* Multi-widgets editing"
- selection can only contain sibling widgets (same direct parent)
- context-menu actions and properties changes apply to all selected widgets
- resizing / dragging will affect all selected widgets, relatively to the first selected widget
diff --git a/resources/docs/docs/user-interface/keyboard-shortcuts.md b/resources/docs/docs/user-interface/keyboard-shortcuts.md
new file mode 100644
index 00000000..475c259f
--- /dev/null
+++ b/resources/docs/docs/user-interface/keyboard-shortcuts.md
@@ -0,0 +1,38 @@
+!!! info
+ `mod` refers to the `ctrl` key except on MacOs (`command`)
+
+## General
+
+The following shortcuts are always available:
+
+
+| Shortcut | Description |
+|---|---|
+| `mod + e` | enable/disable editor |
+| `mod + s` | save session |
+| `mod + shift s` | save session as... |
+| `mod + o` | open a session file |
+
+## Editor
+
+The following shortcuts are available only when the editor is enabled:
+
+| Shortcut | Description |
+|---|---|
+| `mod + click`* | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.|
+| `shift + click + drag`* | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If `mod` is pressed too, current selection is kept and will be merged with the new one if possible. |
+| `mod + z` | Undo |
+| `mod + y / mod + shift + z` | Redo |
+| `delete` (`backspace` on Mac) | Delete selected widgets |
+| `mod + c` | Copy selected widgets |
+| `mod + x` | Cut selected widgets |
+| `mod + v` | Paste clipboard in selected widget |
+| `mod + shift + v` | Paste and increment id |
+| `up, down, left, right` | Move selected widgets (1 grid unit, hold `shift` for 5 grid units) |
+| `alt + [up, down, left, right]` | Resize selected widgets (1 grid unit, hold `shift` for 5 grid units) |
+| `mod + a` | Select current widget's siblings and itself |
+| `mod + shift + a` | Cancel current widget selection |
+| `mod + up` | Select current widget's parent |
+| `mod + down` | Select current widget's first child |
+| `mod + right` | Select current widget's next sibling |
+| `mod + left` | Select current widget's previous sibling |
diff --git a/resources/docs/docs/user-interface/user-interface.md b/resources/docs/docs/user-interface/user-interface.md
new file mode 100644
index 00000000..0d75f665
--- /dev/null
+++ b/resources/docs/docs/user-interface/user-interface.md
@@ -0,0 +1,5 @@
+!!! warning "Incomplete documentation"
+
+## Layout
+
+## Menu
diff --git a/resources/docs/docs/widgets-reference.md b/resources/docs/docs/widgets-reference.md
deleted file mode 100644
index 481cf3f0..00000000
--- a/resources/docs/docs/widgets-reference.md
+++ /dev/null
@@ -1,832 +0,0 @@
-
-
-# Widget reference
-
-
| `number`| `string` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).
Otherwise, the widget will be absolutely positioned |
-|
| `number`| `percentage` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).
Otherwise, the widget will be absolutely positioned |
-|
| `string` | "auto" | Defines the widget's accent color (css variable `--custom-color`). Must be a valid CSS color. Set to "auto" to inherit from parent widget. |
-|
| `integer`| `string` | 2 | Defines the number of decimals to display and to send.
Set to `0` to send integers only.
Data type can be specified by appending a valid osc type tag to the precision value, for example : `3d` will make the widget send double precision numbers rounded to three decimals |
-|
| `string`| `array`| `null` | "" | This defines the targets of the widget's OSC messages - A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:port"]` - If midi is enabled, targets can be `midi:device_name` - The special item `"self"` can be used to refer to the emitting client directly. - If no target is set, messages can still be sent if the server has default targets - The server's default targets can be bypassed by setting one of the items to `null` |
-|
| `boolean` | false | Set to true to display a vu-meter next in the fader - the meter's `id` will be the same as the widget's with `/meter` appended to it - the meter's `address` will be the same as the widget's with `/meter` appended to it |
-|
| `boolean` | false | Set to `true` to display a compact alternative for the widget. If `input` is `true`, the input can be focused with a right-click (mouse only). Disables `pips` when enabled. |
-|
| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
-|
| `object` | \{ "min": 0, "max": 1 } | Defines the breakpoints of the fader's scale: - keys can be percentages and/or `min` / `max` - values can be `number` or `object` if a custom label is needed
| `string`| `number`| `array` | "" | Restricts the widget's value: - `auto`: use values defined in `range` - `number`: define a number of evenly spaced steps - `array`: use arbitrary values |
-|
| `boolean` | false | Set to `true` to display a compact alternative for the widget. If `input` is `true`, the input can be focused with a right-click (mouse only). Disables `pips` when enabled. |
-|
| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
-|
| `object` | \{ "min": 0, "max": 1 } | Defines the breakpoints of the fader's scale: - keys can be percentages and/or `min` / `max` - values can be `number` or `object` if a custom label is needed
| `string`| `number`| `array` | "" | Restricts the widget's value: - `auto`: use values defined in `range` - `number`: define a number of evenly spaced steps - `array`: use arbitrary values |
-|
| `number` | "" | Defines which value is sent when releasing the encoder: - Set to `null` to send send no argument in the osc message - Can be an `object` if the type needs to be specified |
-|
| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
-|
| `boolean`| `object` | false | Set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it
Can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`
Note: the widget will only respond to its original osc address, not to the splitted version |
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | `Array` of possible values to switch between : `[1,2,3]`
`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
-|
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | `Array` of possible values to switch between : `[1,2,3]`
`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept
An empty option will always be prepended to values (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css` |
| `boolean`| `number` | false | - If `circular` is `false`, set this to `true` for grid layout - Can be a `number` to define the number of columns |
-|
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | `Array` of possible values to switch between : `[1,2,3]`
`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/x` or `/y` appended to it
Can be set as an `object` to specify a different address : ['/osc_address_x', '/osc_address_y']
Note: the widget will only respond to its original osc address, not to the splitted version |
| `boolean`| `object` | false | Set to `true` to send separate osc messages for for r and g & b. The address will be the same as the widget's with `/r`, `/g` or `/b` appended to it
Can be set as an `object` to specify a different address : `['/r', '/g', 'b']`
Note: the widget will only respond to its original osc address, not to the splitted version |
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/N/x` or `/N/y` appended to it, where N is the point's id (or the point's label if points is an array)
Can be set as an `object` to specify a different address : `['/0/x', '/0/y', '/1/x', '/2/y']`
Note: the widget will only respond to its original osc address, not to the splitted version |
| `boolean`| `string` | false | `true`: the widget's index will be appended to the matrice's osc address
`false`: it will be prepended to the widget's preArgs
`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) |
| `array`| `object` | [ "input_1", "input_2" ] | - `Array` of input names : `['input_1', 'input_2']` - `Object` of `"label_1": "input_1"` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept
Patchbay inputs can be connected to one or more outputs and will send messages of the following form when they are connected/disconnected:
`/patchbay_address input_x output_x output_y etc`
If no output is connected to the input, the message will be `/patchbay_address input_x`
The inputs values can be consumed with the property inheritance syntax: `@{patchbay_id/input_1}` returns an array of output names connected to `input_1` |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `array` | "" | Each item must be an object with the following properties - `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak" or "notch") - `freq`: number (filter's resonant frequency) - `q`: number (Q factor) - `gain`: number - `on`: boolean |
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
-|
| `array`| `object` | [] | When set, the meter's gauge will be filled with a linear color gradient - each item must be a CSS color string. - as an `object`: each key must be a number between 0 and 1 - each item must be a CSS color string.
| `string` | "" | - File `url` or `path` (relative to the session file location by default, falling back to absolute path) - Base64 encoded image : `data:image/...` |
| `string` | "" | External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc) |
| `boolean` | true | By default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too |
-|
| `boolean` | true | By default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too |
-|
| `array` | [] | Each element of the array must be a widget object - By default, children widgets that don't have an explicit `width`/`height` set will be shrinked to respect the sizes specified by others - Adding `flex:1;` to a children's `css` will give it the ability the fill the remaining space - Multiple children can have a `flex:x;` css property (`x` will ponderate their expansion) |
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
-|
| `string`| `array` | "" | Only save state from widgets contained in widgets designated by id. If empty, the whole session's state is saved. Switchers are always ignored. - widget id `string` - `array` of widget id strings |
-|
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | Each item represents a bank that stores the values from the widgets listed in `linkedWidgets` - `Array` of possible values to switch between : `[1,2,3]` - `Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
| `string` | "" | This property is evaluated each time the key combo is pressed and defines the widget's own value. Formulas are given extras variables in this context: - `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key) - `code`: pressed key code name (full list) - `ctrl`: control key state - `alt`: alt key state - `shift`: shift key state - `meta`: command/windows key state |
-|
| `string` | 1 | When the widget receives a value, if this property return a falsy value, the script property won't be evaluated. If it's non-falsy, it will be evaluated normally. Formulas are given one extra variable in this context: - `value`: the value received by the widget |
-|
| `string` | "" | This property is evaluated each time the widget receives a value* if condition is non-falsy. Formulas are given extras variables in this context: - `value`: value received by the widget - `id`: id of the widget that triggered the script - `send(target, address, arg1, arg2, ...)`: function for sending osc messages (ignores the script's targets and the server's defaults unless `target` is `false`; ignores the script's `preArgs`) - `set(id, value)`: function for setting a widget's value - `get(id)`: function for getting a widget's value (dynamic equivalent of @{id}) - `getProp(id, property)`: function for getting a widget's property value ((dynamic equivalent of @{id.property}) - `httpGet(url, callback)`: function for making http requests (asynchronous "GET" request and local urls only)
* Note: `value` or `linkId` properties can be used to receive other widgets' values. The `value` property must actually change to trigger the execution, where linked widgets via `linkId` can submit the same value over and over and trigger the execution |
| `boolean` | false | Set to `true` to return the orientation values with respect to the actual north direction of the world instead of the head direction of the device |
-|
| `number`| `string` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).
Otherwise, the widget will be absolutely positioned |
+|
| `number`| `percentage` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).
Otherwise, the widget will be absolutely positioned |
+|
| `boolean`| `number` | "false" | If parent's layout is `vertical` or `horizontal`, set this to `true` to stretch the widget to use available space automatically. |
+|
| `string` | "" | Defines the osc argument types, one letter per argument (including preArgs) - If empty, the types are infered automatically from the values (with numbers casted to floats by default) - If there are more arguments than type letters, the last type is used for the extra arguments
See http://opensoundcontrol.org/spec-1_0 for existing typetags |
+|
| `string`| `array`| `null` | "" | This defines the targets of the widget's OSC messages - A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:port"]` - If midi is enabled, targets can be `midi:device_name` - The special item `"self"` can be used to refer to the emitting client directly. - If no target is set, messages can still be sent if the server has default targets - The server's default targets can be bypassed by setting one of the items to `null` |
+|
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | `Array` of possible values to switch between : `[1,2,3]`
`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
+|
| `string` | "tap" | Interraction mode: - `tap`: activates when the pointer is down but prevents further scrolling - `slide`: same as `tap` but allows sliding between values - `click`: activates upon click only and allows further scrolling |
+|
| `array`| `object` | \{ "Value 1": 1, "Value 2": 2 } | `Array` of possible values to switch between : `[1,2,3]`
`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
| `array`| `object` | [ 1, 2, 3 ] | `Array` of possible values to switch between : `[1,2,3]`
`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
+|
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+|
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+|
| `array`| `object` | [ "input_1", "input_2" ] | - `Array` of input names : `['input_1', 'input_2']` - `Object` of `"label_1": "input_1"` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept
Patchbay inputs can be connected to one or more outputs and will send messages of the following form when they are connected/disconnected:
`/patchbay_address input_x output_x output_y etc`
If no output is connected to the input, the message will be `/patchbay_address input_x`
The inputs values can be consumed with the property inheritance syntax: `@{patchbay_id/input_1}` returns an array of output names connected to `input_1` |
+|
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+|
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+|
| `string` | "" | External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc) |
| `string` | "" | - File `url` or `path` (relative to the session file location by default, falling back to absolute path) - Base64 encoded image : `data:image/...` |
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. |
+|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
+|
| `array` | "" | Each item must be an object with the following properties - `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak", "bandpass" or "notch", default: "peak") - `freq`: number (filter's resonant frequency, default: 1000) - `q`: number (Q factor, default: 1) - `gain`: number (default: 0) - `on`: boolean (default: true)
See https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode |
+|
| `boolean`| `number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
+|
| `number`| `array`| `string` | "" | If `mode` is `intensity`: - `Number`: `intensity` between `range.min` and `range.max`
If `mode` is `color`: - `Array`: `[r, g, b]` (`r`, `g` and `b` between `range.min` and `range.max`) - `Array`: `[r, g, b, alpha]` (`alpha` between `alphaRange.min` and `alphaRange.max`) - `String`: CSS color |
| `array`| `object` | [] | When set, the meter's gauge will be filled with a linear color gradient - each item must be a CSS color string. - as an `object`: each key must be a number between 0 and 1 - each item must be a CSS color string.
| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
+|
| `object` | \{ "min": 0, "max": 1 } | Defines the breakpoints of the fader's scale: - keys can be percentages and/or `min` / `max` - values can be `number` or `object` if a custom label is needed
| `string`| `number`| `array` | "" | Restricts the widget's value: - `auto`: use values defined in `range` - `number`: define a number of evenly spaced steps - `array`: use arbitrary values |
+|
| `object` | \{ "min": 0, "max": 1 } | Defines the breakpoints of the fader's scale: - keys can be percentages and/or `min` / `max` - values can be `number` or `object` if a custom label is needed
| `string`| `number`| `array` | "" | Restricts the widget's value: - `auto`: use values defined in `range` - `number`: define a number of evenly spaced steps - `array`: use arbitrary values |
+|
| `number` | "" | Defines which value is sent when releasing the encoder: - Set to `null` to send send no argument in the osc message - Can be an `object` if the type needs to be specified |
+|
| `array`| `object` | [] | When set, the meter's gauge will be filled with a linear color gradient - each item must be a CSS color string. - as an `object`: each key must be a number between 0 and 1 - each item must be a CSS color string.
| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
+|
| `object` | \{ "min": 0, "max": 1 } | Defines the breakpoints of the fader's scale: - keys can be percentages and/or `min` / `max` - values can be `number` or `object` if a custom label is needed
| `string`| `number`| `array` | "" | Restricts the widget's value: - `auto`: use values defined in `range` - `number`: define a number of evenly spaced steps - `array`: use arbitrary values |
+|
| `string` | "keyDown" | Determines which key event trigger the script's execution |
+
+
+
+
+
diff --git a/resources/docs/docs/scripting.md b/resources/docs/docs/widgets/scripting.md
similarity index 73%
rename from resources/docs/docs/scripting.md
rename to resources/docs/docs/widgets/scripting.md
index a8756908..45d85848 100644
--- a/resources/docs/docs/scripting.md
+++ b/resources/docs/docs/widgets/scripting.md
@@ -1,24 +1,39 @@
# Scripting
The `script` property allows widgets to run javascript code when their value update. It differs from the javascript property syntax in the following ways:
-- no `JS{{}}` wrapper, only `code`
+
+- no `JS{{}}` wrapper, just the code
- `@{}`, `OSC{}`, `JS{{}}` and `#{}` blocks are replaced with their value before the script's compilation
## Available variables
-#### `value`: widget's value
+----
-#### `id`: id of the widget that's reponsible for the value update
+#### `value`
+
+Widget's value
+
+----
+
+#### `id`: `string`
+
+Id of the widget that's reponsible for the value update
+
+----
#### `get`: `function(id)`
Returns the value of the first widget whose id is `"id"`.
+----
+
#### `set`: `function(id, value)`
Sets the value of the first widget whose id is `"id"`.
If the event that triggered the script's execution was initiated by a user interaction, this will make the widget send its value as well.
+----
+
#### `send`: `function(target, address, ...args)`
- `target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target will be used.
- `address`: osc address, must start with a `/`
@@ -26,28 +41,42 @@ If the event that triggered the script's execution was initiated by a user inter
If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect.
+----
+
#### `getProp`: `function(id, name)`
Returns the property called `"name"` of the first widget whose id is `"id"`.
+----
+
#### `httpGet`: `function(url, callback)`
- `url`: url of the resource to fetch (local url only)
- `callback`: function executed when/if the http request succeeds, with the response text as argument
+----
+
#### `stateGet`: `function(id)`
Returns a state object (`id:value`) for the widget that match `id` and all its children.
+----
+
#### `stateSet`: `function(state)`
Loads a state object. If the event that triggered the script's execution was initiated by a user interaction, this will make the updated widgets send their value as well.
-#### `storage`: [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
+----
+
+#### `storage`: `localStorage`
Allows storing data that persists upon refresh/relaunch.
-#### [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) / [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval): `function(id, callback, delay)`
+Reference: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
+
+----
+
+#### `setTimeout` / `setInterval`: `function(id, callback, delay)`
These work like their native equivalent, with an extra (optional) `id` argument.
@@ -55,7 +84,20 @@ These work like their native equivalent, with an extra (optional) `id` argument.
- `callback`: function to executed
- `delay`: delay before execution is ms
+Reference:
-#### [`clearTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout) / [`clearInterval`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval): `function(id)`
+- https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
+- https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval
+
+-----
+
+#### `clearTimeout` / `clearInterval`: `function(id)`
Clear timeout with matching `id`.
+
+Reference:
+
+- https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout
+- https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval
+
+----
diff --git a/resources/docs/download.md b/resources/docs/download.md
new file mode 100644
index 00000000..d59a8388
--- /dev/null
+++ b/resources/docs/download.md
@@ -0,0 +1,69 @@
+# Download latest release
+
+ Open Stage Control
+
+
- {% if 'docs' in page.url %}
- {% set ns = namespace(navigation=[]) %}
- {% for nav_item in nav %}
- {% if nav_item.children %}
- {% set ns.navigation = nav_item %}
- {% endif %}
- {% endfor %}
-
-
- {% for nav_item in ns.navigation.children %}
- {% if nav_item.active or nav_item.url == 'docs/getting-started/' and page.url == 'docs/' %}
- {% set active = True %}
- {% endif %}
-
- {{ nav_item.title }}
- {% if active %}
- {% set toc_ = page.toc %}
-
-
- {% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
- {% set toc_ = (toc_ | first).children %}
- {% endif %}
- {% if toc_ | first is defined %}
-