structure: take src out of packaged folder
This commit is contained in:
parent
139eab5fa4
commit
d1cb4194fa
85 changed files with 7 additions and 7 deletions
110
resources/docs/getting-started.md
Normal file
110
resources/docs/getting-started.md
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# Getting started
|
||||
|
||||
----
|
||||
## Run from binaries
|
||||
|
||||
|
||||
Prebuilt binaries for Linux, Windows and OS X can be found on the [release](https://github.com/jean-emmanuel/open-stage-control/releases) page.
|
||||
|
||||
```
|
||||
Options:
|
||||
-h, --help display help
|
||||
-s, --sync synchronized hosts (ip:port pairs) (all osc messages will also be sent to these)
|
||||
-o, --osc-port osc input port (for synchronization / feedback)
|
||||
-d, --debug log received osc in the console
|
||||
-p, --port http port of the server (default to 8080)
|
||||
-n, --no-gui disable default gui
|
||||
-g, --gui-only server's ip:port, default to localhost:8080, only launch the gui (a server instance must be running)
|
||||
-l, --load session file to load
|
||||
-t, --theme theme name or path (mutliple values allowed)
|
||||
|
||||
Examples:
|
||||
|
||||
$ open-stage-control -s 127.0.0.1:5555 127.0.0.1:6666 -p 7777
|
||||
|
||||
This will create an app listening on port 7777 for synchronization messages, and sending its widgets state changes to ports 5555 and 6666.
|
||||
|
||||
$ open-stage-control -n -l path/to/session.js
|
||||
|
||||
This will create a headless app available through http on port 8080. Multiple clients can use the app (with chrome only) simultaneously, their widgets will be synchronized.
|
||||
|
||||
$ open-stage-control -n -l path/to/session.js
|
||||
|
||||
|
||||
|
||||
$ open-stage-control -t light noinput /path/to/custom_theme.css
|
||||
|
||||
This will apply three themes (light ui, remove all inputs, and a custom theme file)
|
||||
|
||||
|
||||
Available themes:
|
||||
- light
|
||||
- noinput
|
||||
```
|
||||
|
||||
----
|
||||
## Run from sources
|
||||
|
||||
Running the app from the sources slightly differs from using built binaries : instead of running a binary, we'll launch the app with npm.
|
||||
|
||||
**Requirements**
|
||||
|
||||
- [Node.js >= 4.0](https://nodejs.org/)
|
||||
- [npm](https://www.npmjs.com/)
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install nodejs npm # install nodejs & npm
|
||||
$ sudo npm install -g npm # update npm
|
||||
```
|
||||
|
||||
|
||||
**Download**
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/jean-emmanuel/open-stage-control
|
||||
$ cd open-stage-control/
|
||||
$ npm install
|
||||
```
|
||||
|
||||
**Run**
|
||||
|
||||
```bash
|
||||
$ npm start [ -- options]
|
||||
|
||||
# A double hyphen ("--") is used here to tell npm that the following options are to be given to the app.
|
||||
```
|
||||
|
||||
----
|
||||
## Build from sources
|
||||
|
||||
**Requirements**
|
||||
|
||||
- [Node.js](https://nodejs.org/)
|
||||
- [npm](https://www.npmjs.com/)
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install npm # install nodejs & npm
|
||||
$ sudo npm install -g npm # update npm
|
||||
```
|
||||
|
||||
**Build**
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/jean-emmanuel/open-stage-control
|
||||
$ cd open-stage-control
|
||||
$ npm install
|
||||
$ export PLATFORM=TARGET_PLATFORM # TARGET_PLATFORM can be linux, win32 (windows) or darwin (os x)
|
||||
$ export ARCH=TARGET_ARCH # TARGET_ARCH can be ia32 or x64
|
||||
$ npm run build
|
||||
|
||||
$ # Do the following if you want a deb package for debian/ubuntu
|
||||
$ npm run deb32
|
||||
$ # or
|
||||
$ npm run deb64
|
||||
$ # or
|
||||
$ npm run debarm
|
||||
```
|
||||
|
||||
This will build the app in `dist/open-stage-control-PLATFORM-ARCH`.
|
||||
|
||||
*Please note that building the app for windows from a linux system requires wine to be installed.*
|
||||
1
resources/docs/img/logo.png
Symbolic link
1
resources/docs/img/logo.png
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../images/logo.png
|
||||
45
resources/docs/index.md
Normal file
45
resources/docs/index.md
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# <img src="img/logo.png" height="80px"/> <small>Open Stage Control</small>
|
||||
|
||||
Open Stage Control is a libre desktop OSC bi-directionnal control surface application. It's built with HTML, JavaScript & CSS and run as a Node / [Electron](http://electron.atom.io/) web server that accepts any number of Chrome / Chromium / Electron clients.
|
||||
|
||||
## Demo
|
||||
|
||||
You can try the app here [http://openstagecontrol.herokuapp.com/](http://openstagecontrol.herokuapp.com/)
|
||||
|
||||
Please note that :
|
||||
|
||||
- Chrome/Chromium **49** at least is required
|
||||
- Since there is only one instance running, all connected guests are synchronized (widgets using the same osc paths update each other's states) : you might experience some unwanted synchronization with other users unless you specify custom parameters for your widgets.
|
||||
- You might want to download the examples sessions files under *examples/* and load them in the app to get started.
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- mouse & multi-touch sensitive widgets
|
||||
- modular & responsive layout
|
||||
- built-in live editor
|
||||
- bi-directionnal osc bindings
|
||||
- headless server mode with any number of clients using chromium
|
||||
- app state store / recall & import / export
|
||||
- themes !
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Same as [Electron's supported platforms](https://github.com/electron/electron/blob/master/docs/tutorial/supported-platforms.md)
|
||||
|
||||
## License & credits
|
||||
|
||||
Copyleft © Jean-Emmanuel @ [AMMD](http://ammd.net). This program is released under the GNU/GPL3 license.
|
||||
|
||||
It relies on the use of several libraries :
|
||||
|
||||
- [Node.js](https://nodejs.org/)
|
||||
- [Electron](http://electron.atom.io/)
|
||||
- [osc.js](https://github.com/colinbdclark/osc.js)
|
||||
- [socket.io](http://socket.io)
|
||||
- [browserify](http://browserify.org)
|
||||
- [express](http://expressjs.com)
|
||||
- [node-sass](https://github.com/sass/node-sass)
|
||||
- [jQuery](http://jquery.com/)
|
||||
- [jQuery-UI](http://jqueryui.com/) (draggable, resizable & sortable)
|
||||
- [Font Awesome](http://fontawesome.io/)
|
||||
31
resources/docs/user-guide/interface.md
Normal file
31
resources/docs/user-guide/interface.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# User interface
|
||||
|
||||
|
||||
----
|
||||
|
||||
## Editor
|
||||
|
||||
The session editor can be enabled in the side panel. Once enabled, clicking on a widget or on a tab will make it the *selected object*, adding a fancy dashed blue border to it.
|
||||
|
||||
|
||||
### Properties
|
||||
|
||||
All the selected object's properties are displayed and can be modified in the side panel. Any modification will redraw the object **and all its children** if the submitted data is valid. Please refer to the [widgets reference](widgets-generics.md) for the list of valid options.
|
||||
|
||||
Widgets containers such as tabs, strips and panels will also list their children here, which can be reordered using drag-and-drop.
|
||||
|
||||
### Size / Position
|
||||
|
||||
The selected object can be resized using its south, south-east and east handles. It can be dragged with its north handle.
|
||||
|
||||
|
||||
### Context menu
|
||||
|
||||
Right clicking on a widget or on a tab will also display a context menu providing useful utilities :
|
||||
|
||||
- `copy`: copy widget's data
|
||||
- `cut`: copy widget's data and delete selected widget
|
||||
- `paste`: paste copied widget in selected container
|
||||
- `Add widget`: create a new widget in selected container
|
||||
- `Add tab`: create a new tab in selected container
|
||||
- `Delete`: delete selected tab or widget
|
||||
81
resources/docs/user-guide/session-file.md
Normal file
81
resources/docs/user-guide/session-file.md
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Session file
|
||||
|
||||
A valid session file is a javascript file that returns an array of [tab objects](#tab-object). It can be written as a javascript `array` :
|
||||
|
||||
```js
|
||||
[// array
|
||||
{// tab object
|
||||
label:"A tab containing widgets",
|
||||
widgets: [// array
|
||||
{// widget object
|
||||
// widget properties
|
||||
},
|
||||
{
|
||||
// etc
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label:"A tab containing tabs",
|
||||
tabs: [
|
||||
{// tab object
|
||||
// tab properties
|
||||
},
|
||||
{
|
||||
// etc
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// tab properties
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
It can also be a javascript self invoking function that returns an array of [tab objects](#tab-object) :
|
||||
|
||||
```js
|
||||
(function(){
|
||||
var tabs = []
|
||||
for (for i in [0,1,2,3]) {
|
||||
tabs.push({
|
||||
id:'tab'+i,
|
||||
widgets: [
|
||||
{
|
||||
id:'tab'+i+'fader',
|
||||
type:'fader'
|
||||
}
|
||||
// etc
|
||||
]
|
||||
})
|
||||
}
|
||||
return tabs
|
||||
}()
|
||||
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
## Tab object
|
||||
|
||||
A tab object is a javascript object which properties are described below.
|
||||
|
||||
```js
|
||||
{
|
||||
// tab properties
|
||||
}
|
||||
```
|
||||
|
||||
#### `label`
|
||||
- type: `string`
|
||||
- default: `Unnamed`
|
||||
|
||||
#### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a `widget` object. A tab cannot contain widgets and tabs simultaneously.
|
||||
|
||||
#### `tabs`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a `tab` object. A tab cannot contain widgets and tabs simultaneously.
|
||||
29
resources/docs/user-guide/theming.md
Normal file
29
resources/docs/user-guide/theming.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Theming
|
||||
|
||||
Theming is as simple as writing a tiny css file that will override the default style variables defined in [_vars.scss](https://github.com/jean-emmanuel/open-stage-control/blob/master/browser/scss/_vars.scss) :
|
||||
|
||||
```css
|
||||
:root {
|
||||
--color-accent:red;
|
||||
}
|
||||
```
|
||||
|
||||
This will change the default accent color to red. Variables can also be overridden for a specific subset of elements, for example :
|
||||
|
||||
```css
|
||||
.panel-container {
|
||||
--color-text:blue;
|
||||
}
|
||||
```
|
||||
|
||||
This will change the default text color to blue for all elements in panel widgets.
|
||||
|
||||
Of course, regular css is also allowed :
|
||||
|
||||
```css
|
||||
.widget .input {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
This will hide the widgets' value inputs.
|
||||
114
resources/docs/user-guide/widgets-generics.md
Normal file
114
resources/docs/user-guide/widgets-generics.md
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
## Widgets generics
|
||||
|
||||
A widget object is a javascript object. All widgets share a set of generic properties described below. Each widget type comes with an additional set of specific properties which are documented in these pages:
|
||||
|
||||
- [Sliders](widgets-specifics/sliders.md)
|
||||
- [Buttons](widgets-specifics/buttons.md)
|
||||
- [Pads](widgets-specifics/pads.md)
|
||||
- [Matrices](widgets-specifics/matrices.md)
|
||||
- [Plots](widgets-specifics/plots.md)
|
||||
- [Containers](widgets-specifics/containers.md)
|
||||
|
||||
```js
|
||||
{
|
||||
// widget properties
|
||||
}
|
||||
```
|
||||
|
||||
----
|
||||
### 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.
|
||||
|
||||
#### `id`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.
|
||||
|
||||
|
||||
|
||||
----
|
||||
### Style
|
||||
|
||||
#### `label`
|
||||
- type: `string|false`
|
||||
- default: `auto`, which displays `id`
|
||||
- usage:
|
||||
- set to `false` to hide completely
|
||||
- set to `icon: fontawesome-class` to display an icon from [FontAwesome](http://fontawesome.io/icons/) (replace `fontawesome-class` with the icon's name)
|
||||
|
||||
#### `top` / `left`
|
||||
- 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` / `height`
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
|
||||
#### `color`
|
||||
- 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`
|
||||
- type: `string`
|
||||
- default: *empty*
|
||||
- usage: the `css` property can be used to override inherited [theming](theming.md) variables. Also, some widgets expose specific theming variables that allow a finer customization. Standard `css` properties can be applied to the widget's root element through this property.
|
||||
|
||||
----
|
||||
### OSC
|
||||
|
||||
|
||||
#### `precision`
|
||||
- type: `integer`
|
||||
- default: `2`
|
||||
- usage: the `precision` property defines the number of decimals to display and to send. Set to `0` to send `integers` only.
|
||||
|
||||
|
||||
#### `target`
|
||||
- type: `array`
|
||||
- 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"]`
|
||||
|
||||
#### `path`
|
||||
- type: `string`
|
||||
- default: `/widgets_id`
|
||||
- usage: this is the `path` of the osc messages sent by the widget
|
||||
|
||||
#### `preArgs`
|
||||
- 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 type needs to be specified (ie different from the default implied by the `precision`)
|
||||
- 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:"float",
|
||||
value:0.5
|
||||
},
|
||||
{
|
||||
type:"integer",
|
||||
value:1
|
||||
}
|
||||
]
|
||||
```
|
||||
77
resources/docs/user-guide/widgets-specifics/buttons.md
Normal file
77
resources/docs/user-guide/widgets-specifics/buttons.md
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# Buttons
|
||||
|
||||
Buttons are exactly what you think they are.
|
||||
|
||||
----
|
||||
|
||||
## Toggle
|
||||
```js
|
||||
{
|
||||
type:'toggle',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `on`
|
||||
- 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-generics.md#preargs))
|
||||
|
||||
#### `off`
|
||||
- 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-generics.md#preargs))
|
||||
|
||||
|
||||
----
|
||||
|
||||
## Push
|
||||
```js
|
||||
{
|
||||
type:'push',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `on`
|
||||
- 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-generics.md#preargs))
|
||||
|
||||
#### `off`
|
||||
- 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-generics.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
|
||||
55
resources/docs/user-guide/widgets-specifics/containers.md
Normal file
55
resources/docs/user-guide/widgets-specifics/containers.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Containers
|
||||
|
||||
Containers can contain any widgets
|
||||
|
||||
----
|
||||
|
||||
## Strip
|
||||
|
||||
Strips can contain any number of widgets, which can't be absolutely positioned and whose size can't overflow their parent's.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'strip',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display widgets horizontally
|
||||
|
||||
#### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a widget `object`
|
||||
|
||||
----
|
||||
|
||||
## Panel
|
||||
|
||||
Panels can contains tabs or widgets. These can be absolutely positioned and can overflow their parent's size (which will then display scrollbars).
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'panel',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `scroll`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to disable scrollbars
|
||||
|
||||
#### `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.
|
||||
86
resources/docs/user-guide/widgets-specifics/matrices.md
Normal file
86
resources/docs/user-guide/widgets-specifics/matrices.md
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
# Matrices
|
||||
|
||||
Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures.
|
||||
|
||||
## 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`
|
||||
- `path`: same as the widget's with `/i` appended to it
|
||||
|
||||
|
||||
#### `range`
|
||||
- see fader's [`range`](sliders/#fader)
|
||||
|
||||
#### `logScale`
|
||||
- see fader's [`logScale`](sliders/#fader)
|
||||
|
||||
#### `unit`
|
||||
- see fader's [`unit`](sliders/#fader)
|
||||
|
||||
#### `compact`
|
||||
- see fader's [`compact`](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`
|
||||
- `path`: same as the widget's with `/i` appended to it
|
||||
|
||||
|
||||
#### `on`
|
||||
- see toggle's [`on`](buttons/#toggle)
|
||||
|
||||
#### `off`
|
||||
- see toggle's [`off`](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`
|
||||
- `path`: same as the widget's with `/i` appended to it
|
||||
|
||||
|
||||
#### `on`
|
||||
- see push's [`on`](buttons/#push)
|
||||
|
||||
#### `off`
|
||||
- see push's [`off`](buttons/#push)
|
||||
75
resources/docs/user-guide/widgets-specifics/pads.md
Normal file
75
resources/docs/user-guide/widgets-specifics/pads.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# Pads
|
||||
|
||||
Pads are multidimensional widgets that output multiple values.
|
||||
|
||||
----
|
||||
|
||||
## XY
|
||||
|
||||
```js
|
||||
{
|
||||
type:'xy',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### `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
|
||||
|
||||
#### `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.
|
||||
|
||||
#### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `x` and `y` axis. The `path` 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 `path` : `{x:'/osc_path_x', y:'/osc_path_y'}`
|
||||
|
||||
----
|
||||
|
||||
## RGB
|
||||
|
||||
RGB is a variant of XY, it outputs rgb values between 0 and 255.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'rgb',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### `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.
|
||||
|
||||
#### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `r` and `g` & `b`. The `path` 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 `path` : `{r:'/osc_path_r', g:'/osc_path_g',b:'/osc_path_b'}`
|
||||
185
resources/docs/user-guide/widgets-specifics/plots.md
Normal file
185
resources/docs/user-guide/widgets-specifics/plots.md
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
# 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 use logarithmic scaling
|
||||
|
||||
|
||||
|
||||
## Plot
|
||||
|
||||
The plot receives an array of [x,y] coordinates and draws them on a chart with linear or logarithmic interpolation.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'plot',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `points`
|
||||
- type: `array|string`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- as a `string`: a widget's `id` whose multiple values will be displayed on the `y` axis, evenly spaced on the `x` axis (only *[matrices](matrices.md)* and *[pads](pads.md)* will work)
|
||||
- as an `array`: each element must be an `array` of `[x,y]` coordinates, where `x` and `y` can either be a:
|
||||
- `number`: constant values
|
||||
- `string`: a widget's `id` whose value will be used
|
||||
|
||||
#### `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
|
||||
|
||||
#### `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)
|
||||
|
||||
|
||||
## Eq
|
||||
|
||||
The Eq receives an array of filter objects and draws their frequency response between 20Hz and 22050Hz.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'eq',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `filters`
|
||||
- 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)
|
||||
|
||||
|
||||
|
||||
## Visualizer
|
||||
|
||||
The visualizer displays the evolution in time of a received value (through osc) *or* another widget's value.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'visualizer',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
#### `widgetId`
|
||||
- type: `object`
|
||||
- default: `empty`
|
||||
- usage: a widget's `id` whose value will be displayed (thus bypassing the incoming osc)
|
||||
|
||||
#### `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)
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
#### `defaultText`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: default text to be displayed. If not set, `label` or `id` is used
|
||||
|
||||
|
||||
## 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)
|
||||
159
resources/docs/user-guide/widgets-specifics/sliders.md
Normal file
159
resources/docs/user-guide/widgets-specifics/sliders.md
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
# 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
|
||||
|
||||
#### `noPip`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to hide the scale
|
||||
|
||||
#### `compact`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a compact alternative for the widget. Enables `noPips` and disables default mouse/touch focusing on the value display (right-click/long-touch still triggers it).
|
||||
|
||||
|
||||
#### `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.
|
||||
|
||||
|
||||
#### `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 `path `will be the same as the widget's with `/meter` appended to it
|
||||
|
||||
|
||||
#### `css`
|
||||
```
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
## Knob
|
||||
|
||||
```js
|
||||
{
|
||||
type:'knob',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### `noPip`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to show the scale
|
||||
|
||||
#### `compact`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a compact alternative for the widget. Enables `noPips` and disables mouse/touch focusing on the value display.
|
||||
|
||||
#### `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.
|
||||
|
||||
#### `css`
|
||||
```
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue