docs: new site
This commit is contained in:
parent
43ccd7389d
commit
719a563feb
43 changed files with 1185 additions and 1899 deletions
|
|
@ -1 +0,0 @@
|
|||
osc.ammd.net
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
|
||||
.md-header, .md-tabs {
|
||||
background:rgb(49, 63, 85)!important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 76.1875em) {
|
||||
.md-header, .md-nav__title--site {
|
||||
background:rgb(49, 63, 85)!important;
|
||||
}
|
||||
}
|
||||
|
||||
.md-header-nav__button.md-logo {
|
||||
margin-right:-1rem!important;
|
||||
}
|
||||
|
||||
.md-nav__title--site, .md-header-nav__title {
|
||||
padding-top: 1px;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.4rem!important;
|
||||
/* font-weight:500!important; */
|
||||
letter-spacing:1px;
|
||||
}
|
||||
|
||||
a.button {
|
||||
background:rgb(82, 168, 255);
|
||||
color:white!important;
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
|
||||
a.button:hover {
|
||||
opacity: 0.90;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article img {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dynamic-prop-icon {
|
||||
vertical-align:super;
|
||||
font-size: 75%;
|
||||
/* margin-left: -5px; */
|
||||
opacity: 0.65!important;
|
||||
}
|
||||
|
||||
.dynamic-prop-icon:after {
|
||||
content:"flash_on";
|
||||
font-family: Material Icons;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
white-space: nowrap;
|
||||
speak: none;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
table code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table .thead2 {
|
||||
background: rgba(0,0,0,0.05);
|
||||
color: #555;
|
||||
text-transform: capitalize;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table thead {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
table h4 {
|
||||
margin:0!important;
|
||||
font-size: 1.28rem!important;
|
||||
font-weight: normal!important;
|
||||
}
|
||||
1
resources/docs/docs.md
Symbolic link
1
resources/docs/docs.md
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
docs/getting-started.md
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
# License
|
||||
## License
|
||||
|
||||
Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2018.
|
||||
This program is a free software released under the [GNU/GPL3](ttps://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
|
||||
This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
|
||||
|
||||
## 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](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, 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).
|
||||
|
||||
## Contributors
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ https://github.com/jean-emmanuel/open-stage-control/graphs/contributors
|
|||
----
|
||||
|
||||
<div style="width:240px">
|
||||
[](http://browserstack.com/)
|
||||
[](http://browserstack.com/)
|
||||
</div>
|
||||
|
||||
BrowserStack supports Open Stage Control by providing a complete suite of browser emulators for Android, iOS and Windows.
|
||||
|
|
@ -45,7 +45,7 @@ By default, widget resizing / dragging snaps to a 10 pixel wide grid. Its width
|
|||
|
||||
## Properties
|
||||
|
||||
Selected widget's properties are displayed and can be modified in the sidepanel. The [widgets reference](widgets/widgets) section lists the available properties for each widget type. Property fields are all multiline (press `shift + enter` for new line).
|
||||
Selected widget's properties are displayed and can be modified in the sidepanel. The [widgets reference](/docs/widgets-reference) section lists the available properties for each widget type. Property fields are all multiline (press `shift + enter` for new line).
|
||||
|
||||
Properties are written in JSON, with some flexibility brought by the [JSON5](https://github.com/json5/json5) format. For example, doubles quotes around object keys are not mandatory. All input will be converted to standard JSON.
|
||||
|
||||
|
|
@ -3,6 +3,16 @@
|
|||
!!! 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
|
||||
|
||||
|
|
@ -26,9 +36,9 @@ Below are the available command-line options. Note that when running without any
|
|||
| `-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](extras/theming/) |
|
||||
| `-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](extras/url-options) (opt=value pairs) |
|
||||
| | `--url-options` | [url options](/docs/url-options) (opt=value pairs) |
|
||||
| |`--disable-vsync` | disable gui's vertical synchronization |
|
||||
| |`--disable-gpu` | disable hardware acceleration |
|
||||
| |`--read-only` | disable session editing and session history changes |
|
||||
|
|
@ -23,7 +23,7 @@ When traversing gestures are set to "Smart", these will only affect widgets that
|
|||
|
||||
### Editor
|
||||
|
||||
See [Editing sessions](editing-sessions.md).
|
||||
See [Editing sessions](/docs/editing-sessions.md).
|
||||
|
||||
## Interactions
|
||||
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
# Sending / Receiving MIDI
|
||||
|
||||
Open Stage Control can send and receive MIDI messages.
|
||||
|
||||
## Requirements
|
||||
|
||||
MIDI support requires additional software to be installed on the server's system:
|
||||
|
|
@ -33,7 +29,7 @@ In order to send MIDI messages, a widget must have at least one `target` formatt
|
|||
## Supported MIDI messages
|
||||
|
||||
!!! warning ""
|
||||
Define static argument values using the [`preArgs`](/widgets/widgets/#preargs) option in order to complete the respective MIDI message.
|
||||
Define static argument values using the [`preArgs`](/docs/widgets-reference/#preArgs) option in order to complete the respective MIDI message.
|
||||
|
||||
|
||||
|
||||
|
|
@ -91,6 +87,6 @@ PitchWheel event.
|
|||
System exclusive message.
|
||||
|
||||
- `msg`: hexadecimal sysex data string of the form `f0 ... f7`. You may include placeholders of the form `nn` which will be replaced by `v1, .., vN` respectively.
|
||||
- `v1, .., vN`: values encoded as hexadecimal data strings to include in `msg`. Most probably, you will need to sepcify a [custom module](/extras/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.
|
||||
- `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.
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
# Theming
|
||||
|
||||
## Built-in themes
|
||||
|
||||
Themes can be loaded with the `--theme` option. Multiple themes can be combined. Built-in themes can be loaded using their name, custom theme files can be loaded using their path.
|
||||
|
|
@ -38,7 +36,7 @@ This will change the default text color to blue for all elements in panel widget
|
|||
|
||||
## Scss / autoreload
|
||||
|
||||
When running the app [from sources](../getting-started), custom themes can be written in scss:
|
||||
When running the app [from sources](/docs/getting-started), custom themes can be written in scss:
|
||||
|
||||
- the scss file must be located in `src/browser/scss/themes/`
|
||||
- run `npm run watch-css`
|
||||
|
|
@ -140,6 +140,7 @@
|
|||
| <h4 id="switch_horizontal">horizontal<a class="headerlink" href="#switch_horizontal" title="Permanent link">¶</a></h4> | `boolean` | <code>false</code> | Set to `true` to display values horizontally |
|
||||
| <h4 id="switch_showValues">showValues<a class="headerlink" href="#switch_showValues" title="Permanent link">¶</a></h4> | `boolean` | <code>false</code> | If values is an object, set to `true` to display both values and labels instead of labels only |
|
||||
| <h4 id="switch_values">values<a class="headerlink" href="#switch_values" title="Permanent link">¶</a></h4> | `array`\|<br/>`object` | <code>{<br/> "Value 1": 1,<br/> "Value 2": 2<br/>}</code> | `Array` of possible values to switch between : `[1,2,3]`<br/><br/>`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 |
|
||||
| <h4 id="switch_traversing">traversing<a class="headerlink" href="#switch_traversing" title="Permanent link">¶</a></h4> | `boolean` | <code>true</code> | Set to `false` to disable traversing gestures |
|
||||
|
||||
### dropdown
|
||||
|
||||
|
|
@ -453,7 +454,7 @@
|
|||
| --- | --- | --- | --- |
|
||||
| <h4 class="thead2" id="keys_keys">keys<a class="headerlink" href="#keys_keys" title="Permanent link">¶</a></h4> ||||
|
||||
| <h4 id="keys_binding">binding<a class="headerlink" href="#keys_binding" title="Permanent link">¶</a></h4> | `string`\|<br/>`array` | <code>""</code> | Key combo `string` or `array` of strings (see <a href="https://github.com/RobertWHurst/KeyboardJS">KeyboardJS</a> documentation) |
|
||||
| <h4 id="keys_keydown">keydown<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keydown" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | 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:<br/>- `key`: pressed key name (usefull for handling multiple keys with a single keys widget)<br/>- `ctrl`: control key state<br/>- `alt`: alt key state<br/>- `shift`: shift key state<br/>- `super`: command/windows key state |
|
||||
| <h4 id="keys_keydown">keydown<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keydown" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | 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:<br/>- `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key)<br/>- `code`: pressed key code name (<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code#Code_values" target="_blank">full list</a>)<br/>- `ctrl`: control key state<br/>- `alt`: alt key state<br/>- `shift`: shift key state<br/>- `super`: command/windows key state |
|
||||
| <h4 id="keys_keyup">keyup<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keyup" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | Same as `keydown`, but evaluated when releasing the key combo |
|
||||
| <h4 id="keys_repeat">repeat<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_repeat" title="Permanent link">¶</a></h4> | `boolean` | <code>true</code> | Set to `false` to prevent keydown repeats when holding the key combo pressed |
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# Property maths
|
||||
|
||||
The following syntax allow writing mathematical formulas in widgets' properties:
|
||||
|
||||
```
|
||||
#{ FORMULA }
|
||||
```
|
||||
|
||||
Where FORMULA is a valid [MathJS](http://mathjs.org/docs/expressions/syntax.html) expression:
|
||||
|
||||
- [syntax documentation](http://mathjs.org/docs/expressions/syntax.html)
|
||||
- [available functions](http://mathjs.org/docs/reference/functions.html)
|
||||
- [available constants](http://mathjs.org/docs/reference/constants.html)
|
||||
- formulas can be [multiline](http://mathjs.org/docs/expressions/syntax.html#multiline-expressions)
|
||||
- property inheritance calls (`@{...}`) are always resolved before formulas
|
||||
- arrays / matrices indexes are **zero-based** (ie `["a","b"][0]` returns `"a"`)
|
||||
- strings can be multiline when enclosed in backticks (``` ` ` ```)
|
||||
- inner closing brackets (`}`) must be escaped with a backslash (`\}`)
|
||||
|
||||
Additionnal functions:
|
||||
|
||||
- `unpack(x)`: remove an array's brackets (`unpack([1,2])` returns `"1, 2"`)
|
||||
- `pad(x, padding)`: add leading zeros if the length the integer part of `x` is smaller than `padding` (`pad(1,2)` returns `"01"`)
|
||||
- `length(x)`: returns the length of an array or string
|
||||
- `values(x)`: returns an array of a given object's own property values
|
||||
- `keys(x)`: returns an array of a given object's own property names
|
||||
- `timestamp()`: returns the number of milliseconds elapsed since January 1, 1970
|
||||
|
||||
!!! tip ""
|
||||
A single widget property can contain multiple formulas. Variables and functions declared in a formula are available to subsequent formulas in the same property definition.
|
||||
1
resources/docs/img/logo_discourse.png
Symbolic link
1
resources/docs/img/logo_discourse.png
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../images/logo_discourse.png
|
||||
|
|
@ -1,61 +1 @@
|
|||
|
||||
|
||||
# <img style="margin:0 auto;display:inline-block;width:60px;float:left;margin-right:20px;margin-top:-7px;" src="img/logo.svg"/> Open Stage Control
|
||||
|
||||
*Libre and modular OSC / MIDI controller*
|
||||
|
||||
Open Stage Control is a desktop OSC bi-directional control surface application. It's built on web technologies and run as an [Electron](http://electron.atom.io/) web server that accepts any number of clients.
|
||||
|
||||
<a class="button" href="http://demo.osc.ammd.net">Try the online demo (Chrome 50+ required)</a>
|
||||
|
||||
<a class="button" href="https://github.com/jean-emmanuel/open-stage-control/releases">Download the latest release</a>
|
||||
|
||||
|
||||

|
||||
|
||||
## Supported platforms
|
||||
|
||||
The server can run 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](getting-started/#running-without-electron)). Clients just need to connect to the server with a compatible browser :
|
||||
|
||||
- any system running Chrome/Chromium version `50` or later (Linux, MacOS, Windows, Android, etc)
|
||||
- iOS version `9.3` or later
|
||||
|
||||
Firefox is *not* supported.
|
||||
|
||||
## Is there an Android / iOS app ?
|
||||
|
||||
No, Open Stage Control is a *desktop* server app. Mobile devices can open the app by connecting to the server using Chrome.
|
||||
|
||||
!!! tip "Add to home screen"
|
||||
Once connected, mobile devices can add the server's url to the home screen and launch it from there directly.
|
||||
|
||||
|
||||
## Need help ? Found a bug ?
|
||||
|
||||
Head over the [issue tracker](https://github.com/jean-emmanuel/open-stage-control/issues) :)
|
||||
|
||||
## Free what ?
|
||||
|
||||
Open Stage Control is a [free software](https://www.fsf.org/), as in *gratis* and — most importantly — **libre**. It always will be. If you want to support the project financially, consider using liberapay or [flattr](https://flattr.com/@jean-emmanuel) :
|
||||
|
||||
<script src="https://liberapay.com/jean-emmanuel/widgets/button.js"></script>
|
||||
<noscript><a href="https://liberapay.com/jean-emmanuel/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
|
||||
|
||||
----
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Getting started](getting-started)
|
||||
- [User interface](interface)
|
||||
- [Editing sessions](editing-sessions)
|
||||
- [Widgets reference](widgets-reference)
|
||||
- Extras:
|
||||
- [Advanced property syntax](extras/advanced-property-syntax)
|
||||
- [CSS Tips](extras/css-tips)
|
||||
- [Theming](extras/theming)
|
||||
- [URL options](extras/url-options)
|
||||
- [Remote control](extras/remote-control)
|
||||
- [Custom module](extras/custom-module)
|
||||
- [Midi](extras/midi)
|
||||
- [Examples](examples)
|
||||
- [Credits](credits)
|
||||

|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
# Buttons
|
||||
|
||||
Buttons are exactly what you think they are.
|
||||
|
||||
|
||||
|
||||
## Toggle
|
||||
```js
|
||||
{
|
||||
type:'toggle',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the button require a double tap to be toggled instead of a single tap
|
||||
|
||||
### `led`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the toggle's state with a led
|
||||
|
||||
### `on`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent on `on` position
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `off`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `0`
|
||||
- usage: defines which value is sent on `off` position
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
|
||||
|
||||
|
||||
## Push
|
||||
```js
|
||||
{
|
||||
type:'push',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `on`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent when pushing the button
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `off`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `0`
|
||||
- usage: defines which value is sent when releasing the button
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `norelease`
|
||||
- type: `bool`
|
||||
- default: `false`
|
||||
- usage: set to true to prevent sending any osc message when releasing the button
|
||||
|
||||
Setting the `push`'s value externally (via osc) will toggle it's inner light.
|
||||
|
||||
|
||||
|
||||
|
||||
## Switch
|
||||
|
||||
```js
|
||||
{
|
||||
type:'switch',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
### `values`
|
||||
- type: `array|object`
|
||||
- default: `{"Value 1":1,"Value 2":2}`
|
||||
- usage:
|
||||
- `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.
|
||||
|
||||
### `showValues`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: if `values` is an `object`, set to `true` to display both values and labels instead of labels only
|
||||
|
||||
|
||||
## Dropdown
|
||||
```js
|
||||
{
|
||||
type:'dropdown',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `values`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|object`
|
||||
- default: `{"Value 1":1,"Value 2":2}`
|
||||
- usage:
|
||||
- `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`
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
# Containers
|
||||
|
||||
Containers can contain any widgets.
|
||||
|
||||
|
||||
## Panel
|
||||
|
||||
Panels can contains tabs or widgets. These can be absolutely positioned and can overflow their parent's size (which will then display scrollbars). When a panel contains tabs, it can send and receive its active tab's index through osc.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'panel',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `scroll`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to disable scrollbars
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: 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.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a widget `object`. A panel cannot contain widgets and tabs simultaneously.
|
||||
|
||||
### `tabs`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a tab `object`. A panel cannot contain widgets and tabs simultaneously.
|
||||
|
||||
|
||||
### `variables`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `*`
|
||||
- default: `@{parent.variables}`
|
||||
- usage: defines one or more arbitrary variables that can be inherited by children widgets.
|
||||
- examples:
|
||||
- `1` (`@{parent.variables}` will return `1`)
|
||||
- `{a: [1, 2], b: 2}` (`@{parent.variables.a}` will return `[1, 2]`)
|
||||
- `[1, 2]` (`@{parent.variables.0}` will return `1`)
|
||||
- `@{parent.variables}` useful when nesting containers
|
||||
|
||||
|
||||
### `layout`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: `layout` must be a valid [Visual Format Language](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/VisualFormatLanguage.html) expression. It accepts the [Extended Visual Format Language](https://github.com/IjzerenHein/autolayout.js#extended-visual-format-language-evfl) as well. Widgets are targeted using their `id` or their index prefixed with a `$` (`$0, $1, etc`), the latter method being incompatible with the [range spread operator](https://github.com/IjzerenHein/autolayout.js#view-ranges-spread-operator). Expressions can be tested and debugged with the online [Visual Format Editor](https://rawgit.com/IjzerenHein/visualformat-editor/master/dist/index.html).
|
||||
- note: this only applies when the panel contains widgets, not tabs
|
||||
|
||||
### `spacing`
|
||||
- type: `integer|array`
|
||||
- default: `0`
|
||||
- usage: spacing size used in `layout` expression, can be set as a `[vertical,horizontal]` array.
|
||||
- note: this only applies when the panel contains widgets, not tabs
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--nav-height: number[rem|%];
|
||||
```
|
||||
|
||||
## Strip
|
||||
|
||||
Unidirectional panel with stretching capability. 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).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'strip',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display widgets horizontally
|
||||
|
||||
### `stretch`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to stretch widgets evenly
|
||||
|
||||
### `spacing`
|
||||
- type: `integer|percentage`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets. Percents are always relative to the strips width.
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: by default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the strip too.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a widget `object`
|
||||
|
||||
|
||||
|
||||
|
||||
## Modal
|
||||
|
||||
Modals are buttons that turn into a centered popup panels when enabled. They can only contain widgets. They can send and receive their state via osc (1 to enable, 0 to disable).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'modal',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the modal require a double tap to open instead of a single tap
|
||||
|
||||
### `popupWidth` / `popupHeight`
|
||||
- type: `number|percentage`
|
||||
- default: `100%`
|
||||
- usage: sets the modal's size once opened
|
||||
|
||||
### `popupLeft` / `popupTop`
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
- usage: sets the modal's position once opened (centered by default)
|
||||
|
||||
|
||||
### `popupLabel`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: alternative label for the popup
|
||||
|
||||
### `options`
|
||||
- see panel's [`options`](#panel)
|
||||
|
||||
|
||||
## Clone
|
||||
|
||||
```js
|
||||
{
|
||||
type:'clone',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `widgetId`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `id` of the widget to clone
|
||||
|
||||
### `props`
|
||||
- type: `object`
|
||||
- default: `{}`
|
||||
- usage: cloned widget's properties to override
|
||||
- example:
|
||||
```json
|
||||
{
|
||||
"variables": { "n": 2 },
|
||||
"color": "orange"
|
||||
}
|
||||
```
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
# inputs
|
||||
|
||||
## Input
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'input',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `editable`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to make the input non-editable
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the input horizontally
|
||||
|
||||
### `align`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: set to `left` or `right` to change text alignment (otherwise `center`)
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
## Keys
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'keys',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `binding`
|
||||
- type: `string|array`
|
||||
- default: `''`
|
||||
- usage: [keyboardjs](https://github.com/RobertWHurst/KeyboardJS) key combo string or array of strings.
|
||||
|
||||
### `keydown`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: this property is evaluated each time the key combo is pressed. [Formulas](../extras/advanced-property-syntax/#formulas) are given extras variables in this context:
|
||||
- `key`: pressed key name (usefull for handling multiple keys with a single `keys` widget)
|
||||
- `ctrl`: control key state
|
||||
- `alt`: alt key state
|
||||
- `shift`: shift key state
|
||||
- `super`: command/windows key state
|
||||
|
||||
### `keyup`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: same as `keydown`, but evaluated when releasing the key combo.
|
||||
|
||||
### `repeat`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to prevent `keydown` repeats when holding the key combo pressed.
|
||||
|
||||
|
||||
## Script
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'script',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `condition`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: 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](../extras/advanced-property-syntax/#formulas) are given 1 extra variable in this context:
|
||||
- `value`: the value received by the widget
|
||||
|
||||
### `script`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: this property is evaluated each time the widget receives a value if `condition` is non-falsy. [Formulas](../extras/advanced-property-syntax/#formulas) are given extras variables in this context:
|
||||
- `value`: the value received by the widget
|
||||
- `send`: `function` for sending osc messages
|
||||
- `set`: `function` for setting a widget's value
|
||||
|
||||
#### `send(target, address, arg1, arg2, ...)`
|
||||
- `target` (`string` or `array` or `false`): one or several osc targets. Default targets (`--send` and the script's `target` property) are ignored unless `target` is `false`
|
||||
- `address` (`string`): a valid osc address
|
||||
- `arg`: one or several osc arguments to be sent. The script's `preArgs` property is ignored
|
||||
|
||||
|
||||
#### `set(id, value)`
|
||||
- `id` (`string`): a widget's id
|
||||
- `value`: the widget's new value
|
||||
|
||||
|
||||
## Gyroscope
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'gyroscope',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
The gyroscope's value is an object containing multiple values, which can be used by other widgets via the [property maths syntax](../extras/advanced-property-syntax.md) :
|
||||
|
||||
```
|
||||
// value.do.alpha ( deviceorientation event alpha value )
|
||||
// value.do.beta ( deviceorientation event beta value )
|
||||
// value.do.gamma ( deviceorientation event gamma value )
|
||||
// value.do.absolute ( deviceorientation event absolute value )
|
||||
|
||||
// value.dm.x ( devicemotion event acceleration x value )
|
||||
// value.dm.y ( devicemotion event acceleration y value )
|
||||
// value.dm.z ( devicemotion event acceleration z value )
|
||||
|
||||
// value.dm.gx ( devicemotion event accelerationIncludingGravity x value )
|
||||
// value.dm.gy ( devicemotion event accelerationIncludingGravity y value )
|
||||
// value.dm.gz ( devicemotion event accelerationIncludingGravity z value )
|
||||
|
||||
// value.dm.alpha ( devicemotion event rotationRate alpha value )
|
||||
// value.dm.beta ( devicemotion event rotationRate beta value )
|
||||
// value.dm.gamma ( devicemotion event rotationRate gamma value )
|
||||
|
||||
```
|
||||
|
||||
|
||||
### `frequency`
|
||||
- type: `number`
|
||||
- default: `30`
|
||||
- usage: update frequency in Hz (value updates per seconds)
|
||||
|
||||
### `normalize`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: normalize gravity related values
|
||||
|
||||
### `compass`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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
|
||||
|
||||
### `screenAdjusted`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to return screen adjusted values
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Maths
|
||||
|
||||
Maths do the maths !
|
||||
|
||||
## Formula
|
||||
|
||||
!!! warning "Deprecated"
|
||||
Since `v0.24.0`, any widget property can be defined using math expressions. Formula widget is deprecated and will be removed in a future release.
|
||||
|
||||
Formula evaluates mathematical expressions over other widgets' values each one of these widgets changes.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'formula',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### `formula`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: a [mathjs](http://mathjs.org/docs/expressions/syntax.html) expression in which
|
||||
- `${id}` will be replaced the `id`'s value
|
||||
- example: `${fader_1} * 2 + ${fader_2}`
|
||||
- **important note**: contrary to what is stated in *mathjs*' documentation, **matrix indexes are zero-based** here
|
||||
|
||||
### `condition`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage:
|
||||
- a [mathjs](http://mathjs.org/docs/expressions/syntax.html) comparison expression that bypasses widget's osc sending when returning`false`
|
||||
- example: `${fader_1} > 0.5`
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
### `split`
|
||||
- type: `object`
|
||||
- default: `[]`
|
||||
- usage: specify a different `address` for each item of the widget's value : `['/a', '/b']`
|
||||
- note: only use this is the formula return an `array`
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
# Matrices
|
||||
|
||||
Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures.
|
||||
|
||||
!!! note ""
|
||||
When using the [property inheritance syntax](../extras/advanced-property-syntax) to retreive a matrix' value, the returned value is an array containing all it's children's values.
|
||||
|
||||
## Matrix
|
||||
|
||||
Creates grid of widgets of a given type
|
||||
|
||||
```js
|
||||
{
|
||||
type:'matrix',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `widgetType`
|
||||
- type: `string`
|
||||
- default: `toggle`
|
||||
- usage: set the type of the widgets in the matrix
|
||||
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows in the matrix
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first widget's index
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `props`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `object`
|
||||
- default: `{}`
|
||||
- usage: define a set of property to override the widgets' defaults. [Formulas](../extras/advanced-property-syntax/#formulas) in this field are resolved with an extra variable `$` representing each widget's index
|
||||
|
||||
|
||||
|
||||
|
||||
## Multifader
|
||||
|
||||
Multifader creates a row of vertical faders that respond to the same gestures.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'multifader',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `strips`
|
||||
- type: `integer`
|
||||
- default: `2`
|
||||
- usage: number of faders in the row, each fader will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first faders's index
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `borders`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable widgets borders
|
||||
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `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 (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see fader's [`options`](sliders/#fader)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Multitoggle
|
||||
```js
|
||||
{
|
||||
type:'multitoggle',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows. Each cell will contain a toggle button that will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first toggle's index
|
||||
|
||||
### `spacing`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `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 (`\$`)).
|
||||
|
||||
|
||||
### `options`
|
||||
- see toggle's [`options`](buttons/#toggle)
|
||||
|
||||
|
||||
|
||||
## Multipush
|
||||
```js
|
||||
{
|
||||
type:'multipush',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows. Each cell will contain a push button that will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first push's index
|
||||
|
||||
### `spacing`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `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 (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see push's [`options`](buttons/#push)
|
||||
|
||||
|
||||
|
||||
## Keyboard
|
||||
|
||||
This one works pretty much like the multipush, excepts it looks like a piano keyboard.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'keyboard',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `keys`
|
||||
- type: `integer`
|
||||
- default: `24`
|
||||
- usage: defines the number keys
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `60`
|
||||
- usage: MIDI note number to start with (default is C4)
|
||||
|
||||
!!! note ""
|
||||
Standard keyboards settings are:
|
||||
25 keys - start 48
|
||||
49 keys - start 36
|
||||
61 keys - start 36
|
||||
88 keys - start 21
|
||||
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `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 (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see push's [`options`](buttons/#push)
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-white:color; /* white keys color */
|
||||
--color-black:color; /* black keys color */
|
||||
```
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
# Pads
|
||||
|
||||
Pads are multidimensional widgets that output multiple values.
|
||||
|
||||
|
||||
|
||||
## XY
|
||||
|
||||
```js
|
||||
{
|
||||
type:'xy',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `rangeX`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
|
||||
### `logScaleX`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `x` axis (log10)
|
||||
|
||||
### `logScaleY`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `y` axis (log10)
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the fader reset to its `default` value when receiving a double tap. `doubleTap` can also be an osc address, which case the widget will just send an osc message (`/<doubleTap> <preArgs>`),
|
||||
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `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
|
||||
|
||||
|
||||
|
||||
## MultiXy
|
||||
|
||||
```js
|
||||
{
|
||||
type:'multixy',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `points`
|
||||
- type: `integer|array`
|
||||
- default: `2`
|
||||
- usage: defines the number of points on the pad. Can be an `array` of `strings` that will be used as labels for the points (ex: `['A', 'B']`)
|
||||
|
||||
### `pointSize`
|
||||
- type: `integer`
|
||||
- default: `15`
|
||||
- usage: defines the points's size
|
||||
|
||||
### `rangeX`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
|
||||
### `logScaleX`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `x` axis (log10)
|
||||
|
||||
### `logScaleY`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `y` axis (log10)
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- 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
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, the points are dragged from their initial position; if set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates (one per touch).
|
||||
|
||||
|
||||
|
||||
## RGB
|
||||
|
||||
RGB is a variant of XY, it outputs rgb values between 0 and 255.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'rgb',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `precision`
|
||||
- default:`0`
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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.
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":255}`
|
||||
- usage: `range` defines the widget's output scale.
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages 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', '/b', '/b']`
|
||||
- note: the widget will only respond to its original osc address, not to the splitted version
|
||||
|
|
@ -1,330 +0,0 @@
|
|||
# Plots
|
||||
|
||||
Plots are tools that display other widgets' state or incomming osc messages. They are not sensitive to mouse and touch interactions.
|
||||
|
||||
## Led
|
||||
```js
|
||||
{
|
||||
type:'led',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` value the led's intensity will be mapped to
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to use logarithmic scaling
|
||||
|
||||
## RgbLed
|
||||
|
||||
```js
|
||||
{
|
||||
type:'rgbled',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
This one is like the `led` except it takes either three arguments (red, green and blue values between 0 and 255) with an optionnal forth argument (alpha, between 0 and 1), or one argument (a valid css color name).
|
||||
|
||||
## Plot
|
||||
|
||||
The plot receives an array of coordinates and draws them on a chart. Coordinates can be :
|
||||
- `y` values evenly spaced on the `x` axis
|
||||
- `[x, y]` coordinates arrays
|
||||
|
||||
!!! info
|
||||
Coordinates also can be sent as a stringified array (`[]`). A stringified object can also be sent to change specific points' coordinates (e.g. `{0:1, 4:0}` will change the 1st and 5th points' coordinates) .
|
||||
|
||||
```js
|
||||
{
|
||||
type:'plot',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `value`
|
||||
- type: `array|string`
|
||||
- default: `['']`
|
||||
- usage:
|
||||
- as an `array`: where items can be
|
||||
- `number`
|
||||
- `string` (widget's `id`)
|
||||
- `[x, y]`: array of `number` or `string`
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
}`
|
||||
- usage: defines the `min` and `max` values for the `x` and `y` axis
|
||||
|
||||
### `bars`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use draw bars instead (disables `logScaleX` and forces `x-axis` even spacing)
|
||||
|
||||
### `logScaleX`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `x` axis (log10)
|
||||
|
||||
### `logScaleY`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `y` axis (log10)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Eq
|
||||
|
||||
The Eq receives an array of filter objects and draws their frequency response between 20Hz and 22050Hz.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'eq',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `value`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- each item must be an object of the form below
|
||||
- all filters parameters can be filled with widget ids, whose value will be used
|
||||
|
||||
```
|
||||
{
|
||||
type:[string], // "highpass", "highshelf", "lowpass", "lowshelf", "peak", "notch"
|
||||
freq:[number], //
|
||||
q:[number], //
|
||||
gain:[number], //
|
||||
on:[bool] // 1 or true = active, 0 or false = bypassed
|
||||
}
|
||||
```
|
||||
|
||||
### `resolution`
|
||||
- type: `number`
|
||||
- default: `128`
|
||||
- usage: defines the number of points used to compute the frequency response
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":-20,"max":20}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis (dB level)
|
||||
|
||||
### `logScaleX`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `x` axis (log10)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Visualizer
|
||||
|
||||
The visualizer displays the evolution in time of a received value (through osc) *or* another widget's value.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'visualizer',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `duration`
|
||||
- type: `number`
|
||||
- default: `1`
|
||||
- usage: window size in seconds
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` use logarithmic scaling (log10)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Text
|
||||
|
||||
Text displays incoming values (via osc) as text. Sending a message with no argument to the widget will reset it to its default text.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'text',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `vertical`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` display vertically
|
||||
|
||||
### `wrap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to wrap long lines automatically. This will not break overflowing words by default, word-breaking can be enabled by adding `word-break: break-all;` to the `css` property.
|
||||
|
||||
### `align`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: set to `left` or `right` to change text alignment (otherwise `center`)
|
||||
|
||||
## Meter
|
||||
|
||||
Meter displays incoming numerical values (via osc) as a gauge level
|
||||
|
||||
```js
|
||||
{
|
||||
type:'meter',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the meter horizontally
|
||||
|
||||
### `range`
|
||||
- see fader's [`range`](sliders/#fader)
|
||||
|
||||
### `logScale`
|
||||
- see fader's [`logScale`](sliders/#fader)
|
||||
|
||||
### `gradient`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: when set, the meter's gauge will be filled with a linear color gradient : each item must be a color string. Example: `["blue", "red"]`
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color; /* transparent by default */
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number;
|
||||
```
|
||||
|
||||
## Image
|
||||
|
||||
Image displays an image from a file path/url or from a base64 encoded image string. Sending an empty message resets the widget to its initial `value`.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'image',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `size`
|
||||
- type: `string`
|
||||
- default: `cover`
|
||||
- usage: css [background-size](https://www.w3schools.com/CSSref/css3_pr_background-size.asp)
|
||||
|
||||
|
||||
### `position`
|
||||
- type: `string`
|
||||
- default: `cover`
|
||||
- usage: css [background-position](https://www.w3schools.com/CSSref/pr_background-position.asp)
|
||||
|
||||
|
||||
### `repeat`
|
||||
- type: `string`
|
||||
- default: `no-repeat`
|
||||
- usage: css [background-repeat](https://www.w3schools.com/CSSref/pr_background-repeat.asp)
|
||||
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to disable the image's borders and background-color.
|
||||
|
||||
### `cache`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to disable image caching (forces file reload when updating or editing the widget). When `true`, sending `'reload'` to the widget reloads its image without changing its value.
|
||||
|
||||
### `value`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage : initial image
|
||||
- file url or absolute path
|
||||
- [base64 encoded image](https://duckduckgo.com/?q=base64+encode+image&ia=web) : `data:image/...`
|
||||
|
||||
|
||||
## Svg
|
||||
|
||||
```js
|
||||
{
|
||||
type:'svg',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `svg`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage : svg xml definition
|
||||
- will be wrapped in a `<svg></svg>` element
|
||||
- `<path>` commands support a special percent notation (`%x` and `%y`)
|
||||
|
||||
|
||||
!!! tip ""
|
||||
An exemple session called `svg.json` is shipped with the app.
|
||||
|
||||
|
||||
## Frame
|
||||
|
||||
Frame loads and diplays an external web page, using its own value as URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'frame',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to disable the frame's borders and background-color.
|
||||
|
||||
!!! note ""
|
||||
If `label` is set to `false`, all pointer-events will be disabled on the frame as long as the editor is enabled to ensure it can be selected.
|
||||
|
|
@ -1,272 +0,0 @@
|
|||
# Sliders
|
||||
|
||||
Sliders are unidimensional widgets that output one value at a time.
|
||||
|
||||
|
||||
|
||||
## Fader
|
||||
```js
|
||||
{
|
||||
type:'fader',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the fader horizontally
|
||||
|
||||
### `alignRight`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to invert the pip's and fader's position
|
||||
|
||||
### `pips`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the scale
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `compact`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a compact alternative for the widget. Disables default mouse/touch focusing on the value display.
|
||||
|
||||
### `dashed`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a dashed gauge
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":1}`
|
||||
- usage: `range` 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
|
||||
- example:
|
||||
```js
|
||||
range: {
|
||||
"min":0,
|
||||
"50%":1,
|
||||
"max": {"inf":10} // "inf" will be used as a custom label on the scale
|
||||
}
|
||||
```
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: `origin` defines the starting point's value of the fader's gauge
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` use logarithmic scaling between breakpoints (log10)
|
||||
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the fader reset to its `default` value when receiving a double tap. `doubleTap` can also be an osc address, which case the widget will just send an osc message (`/<doubleTap> <preArgs>`),
|
||||
|
||||
### `meter`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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
|
||||
|
||||
### `meterAddress`
|
||||
- type: `boolean`
|
||||
- default: `empty`
|
||||
- usage: overrides the `meter`'s osc address
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number; /* compact mode only */
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Knob
|
||||
|
||||
```js
|
||||
{
|
||||
type:'knob',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### `pips`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the scale
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `angle`
|
||||
- type: `number`
|
||||
- default: `270`
|
||||
- usage: `angle` defines the angle's width of the knob, in degrees
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":1}`
|
||||
- usage: `range` 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
|
||||
- example:
|
||||
```js
|
||||
range: {
|
||||
"min":0,
|
||||
"50%":1,
|
||||
"max": {"inf":10} // "inf" will be used as a custom label on the scale
|
||||
}
|
||||
```
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: `origin` defines the starting point's value of the knob's gauge
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` use logarithmic scaling between breakpoints
|
||||
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget *vertically* will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the knob reset to its `default` value when receiving a double tap
|
||||
|
||||
### `css`
|
||||
```
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
```
|
||||
|
||||
## Encoder
|
||||
|
||||
An endless knob that only responds to rotative gestures.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'encoder',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `ticks`
|
||||
- type: `number`
|
||||
- default: `360`
|
||||
- usage: defines the granularity / verbosity of the encoder (number of step for a 360° arc)
|
||||
|
||||
### `back`
|
||||
- type: `string|number|object`
|
||||
- default: `-1`
|
||||
- usage: defines which value is sent when rotating the encoder anticlockwise
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `forth`
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent when rotating the encoder clockwise
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `release`
|
||||
- type: `string|number|object`
|
||||
- default: `empty`
|
||||
- usage: 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 (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: 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.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the encoder reset to its initial value when receiving a double tap
|
||||
|
||||
### `css`
|
||||
```
|
||||
--color-knob:color;
|
||||
```
|
||||
|
||||
|
||||
## Range
|
||||
|
||||
A range is a fader with two handles. To move the range (both handles at once), hold the `shift` key or use two fingers.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'range',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- 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
|
||||
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number; /* compact mode only */
|
||||
```
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# Switchers
|
||||
|
||||
Switcher can store and recall the state of other widgets.
|
||||
|
||||
|
||||
|
||||
## Switcher
|
||||
|
||||
The switcher looks like the [`switch`](buttons/#switch). Each of its possible values represent a bank that stores the values from the widgets listed in its `linkedWidgets` attribute.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'switcher',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `linkedWidgets`
|
||||
- type: `array|string`
|
||||
- default:
|
||||
`empty`
|
||||
- usage:
|
||||
- as a `string`: a widget's `id` whose state changes will be stored
|
||||
- as an `array`: a list of widget `id` `strings`
|
||||
|
||||
|
||||
### `values`
|
||||
- type: `array|object`
|
||||
- default: `["A", "B"]`
|
||||
- usage:
|
||||
- `array` of possible values to switch between : `[1,2,3]`
|
||||
- `object` of `"label":value` pairs
|
||||
|
||||
|
||||
## Crossfader
|
||||
|
||||
The crossfader is a 2-states-only switcher that comes with a slider allowing to fade from one state to the other by interpolating the values.
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
# Widgets properties
|
||||
|
||||
All widgets share a set of generic properties described below.
|
||||
|
||||
## Basics
|
||||
|
||||
### `type`
|
||||
- type: `string`
|
||||
- default: `fader`
|
||||
|
||||
### `id`
|
||||
- type: `string`
|
||||
- default: generated unique 'widget_n'
|
||||
- usage: widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages.
|
||||
|
||||
### `linkId`
|
||||
- type: `string|array`
|
||||
- default: `empty`
|
||||
- usage:
|
||||
- widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.
|
||||
- when prefixed with `>>`, the linkId will make the widget act as a master (sending but not receiving)
|
||||
- when prefixed with `<<`, the linkId will make the widget act as a slave (receiving but not sending)
|
||||
|
||||
## Style
|
||||
|
||||
### `label`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|false`
|
||||
- default: `auto`, which displays `id`
|
||||
- usage:
|
||||
- set to `false` to hide completely
|
||||
- insert icons from [FontAwesome](https://fontawesome.com/icons?d=gallery&s=solid&m=free) using the prefix `^` followed by the icon's name : `made with ^heart`, etc
|
||||
|
||||
### `top`<i class="dynamic-prop-icon" title="dynamic"></i> / `left`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
- usage:
|
||||
- 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
|
||||
|
||||
|
||||
### `width`<i class="dynamic-prop-icon" title="dynamic"></i> / `height`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
|
||||
### `color`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: `auto`, inherited accent color
|
||||
- usage: any valid `css` color code is valid, this will change the default accent color for the widget and all its children
|
||||
|
||||
|
||||
### `css`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: *empty*
|
||||
- usage: applies CSS rules to widget. See [css tips](../extras/css-tips.md).
|
||||
|
||||
## Value
|
||||
|
||||
### `default`
|
||||
- type: `*`
|
||||
- default: `empty`
|
||||
- usage: if set, the widget will be initialized with this `value` when the session is loaded. Some widgets use this property under specific conditions (see fader's `doubleTap` for example).
|
||||
|
||||
|
||||
### `value`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `*`
|
||||
- default: `empty`
|
||||
- usage: set `value` to define a widget's value depending on other widget's values / properties using [property inheritance and property maths](../extras/advanced-property-syntax.md). When updated by an osc-sending event (e.g. dragging a slider), the widget will send its own osc message as well.
|
||||
|
||||
!!! note ""
|
||||
`default` and `value` must match the widget's value type (ie a `number` for sliders, an `array` for pads, etc) and restrictions (equal to `on` or `off` for a push/toggle button)
|
||||
|
||||
|
||||
## OSC
|
||||
|
||||
### `precision`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `integer|string`
|
||||
- default: `2`
|
||||
- usage: the `precision` property defines the number of decimals to display and to send.
|
||||
- set to `0` to send `integers` only.
|
||||
- a specific 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
|
||||
|
||||
### `target`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|string`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- this defines the targets of the widget's osc messages
|
||||
- each element of the `array` must be a string formatted as follows : `"ip:port"`
|
||||
- multiple targets can be specified : `["ip1:port1","ip2:port2"]`
|
||||
- a single target can be set : `ip:port`
|
||||
- if [`midi`](../extras/midi.md) is enabled, targets can be `"midi:device_name"`
|
||||
- special item `"self"` can be used to refer to the emitting client directly
|
||||
- if no target is set (empty array `[]`), messages can still be sent if the server has defaults targets (`-s / --send`)
|
||||
- to disable the default global osc targets (set via the app's `--send` option), set one of the array's item as `null` (unquoted).
|
||||
|
||||
### `address`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: `/widgets_id`
|
||||
- usage: this is the `address` of the osc messages sent by the widget, it must start with a `/`
|
||||
|
||||
### `touchAddress`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: sliders and pads can send special osc messages to inform weither they are currently touched or not. The osc message will be of the following form :
|
||||
```
|
||||
/touch/address [preArgs] 0/1
|
||||
```
|
||||
|
||||
### `preArgs`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|*`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- each element of the `array` defines a constant value that will be prepended to the osc message
|
||||
- values can be defined as objects if the osc data type needs to be specified (ie different from the default implied by the `precision` option)
|
||||
- a single non-array value can be set
|
||||
- example:
|
||||
```js
|
||||
preArgs: [
|
||||
"1", // this will always be sent as a string
|
||||
0.5, // this will be sent as an integer if precision equals 0
|
||||
1, // this will be sent as float if precision is different from 0
|
||||
{
|
||||
type:"f",
|
||||
value:0.5
|
||||
},
|
||||
{
|
||||
type:"i",
|
||||
value:1
|
||||
},
|
||||
{
|
||||
type:"T",
|
||||
value:true
|
||||
},
|
||||
{
|
||||
type:"F",
|
||||
value:false
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `bypass`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to prevent the widget from sending any osc message
|
||||
|
||||
!!! note ""
|
||||
Changing OSC properties dynamically using advanced property syntax is likely to break synchronisation between multiple clients.
|
||||
Loading…
Add table
Add a link
Reference in a new issue