split widgets reference, fix typos, try to be accurate...
This commit is contained in:
parent
c8a4d64d52
commit
83c8de3ac3
10 changed files with 198 additions and 160 deletions
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
## next
|
||||
|
||||
- electron 0.37.0 (chrome 49)
|
||||
- electron 0.37 (chrome 49)
|
||||
- logarithmic scaling (log10) support added to knob, fader & xy
|
||||
- mousewheel support added to knob and fader (ctrlKey for fine control)
|
||||
- new widgets : plot & visualizer
|
||||
- traversing gestures switch in sidepanel
|
||||
- widget categories in editor's context menu
|
||||
- sync/link event handling improved
|
||||
- many small optimizations...
|
||||
|
||||
## 0.3.1
|
||||
|
||||
|
|
|
|||
|
|
@ -25,3 +25,5 @@ $ npm run deb64
|
|||
```
|
||||
|
||||
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.*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $ sudo npm install -g npm # update npm
|
|||
**Download**
|
||||
```bash
|
||||
$ git clone https://github.com/jean-emmanuel/open-stage-control
|
||||
$ cd Open-Stage-Control/
|
||||
$ cd open-stage-control/
|
||||
$ npm install --save-dev
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -25,162 +25,11 @@ Every widget has the following properties:
|
|||
|
||||
## Widget specifics
|
||||
|
||||
Each widget type comes with a set of specific properties which are described below.
|
||||
Each widget type comes with an additional set of specific properties which are described in the page listed below.
|
||||
|
||||
### strip : *simple widget container*
|
||||
```js
|
||||
type:'strip',
|
||||
horizontal:false, // [bool] set to true to display widgets horizontally
|
||||
widgets: [] // [array] of widget objects
|
||||
```
|
||||
|
||||
### panel : *widget/tabs containers*
|
||||
```js
|
||||
type:'panel',
|
||||
stretch:false, // [bool] set to true to stretch widgets width (don't put horizontal strips in it)
|
||||
widgets: [], // [array] of widget objects
|
||||
tabs: [] // [array] of tab objects
|
||||
```
|
||||
|
||||
### fader
|
||||
```js
|
||||
type:'fader',
|
||||
horizontal:false, // [bool] set to true to display fader horizontally
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
|
||||
### multifader
|
||||
```js
|
||||
type:'multifader',
|
||||
strips:2, // [integer] number of faders
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
*This creates a row of vertical faders that respond to the same gesture. Each of these faders will receive its parent's properties and the following (where X is the fader's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
|
||||
### knob
|
||||
```js
|
||||
type:'knob',
|
||||
range: {"min":0,"max":1}, // [object] minimum and maximum values
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
pan:false // [bool] true for panning knob
|
||||
```
|
||||
|
||||
### xy
|
||||
```js
|
||||
type:'xy',
|
||||
range:{ // [object] minimum and maximum values for x and y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false, // [bool] use logarithmic scale for y axis (log10)
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/x' & '/y' will be appended to the widget's path
|
||||
// or object : {x:'/osc_path_x', y:'/osc_path_y'}
|
||||
|
||||
```
|
||||
|
||||
### rgb
|
||||
```js
|
||||
type:'rgb',
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/r', '/g' & '/b' will be appended to the widget's path
|
||||
// or object : {r:'/osc_path_r', g:'/osc_path_g',b:'/osc_path_b'}
|
||||
```
|
||||
Variant of xy pad, it outputs rgb values between 0 and 255.
|
||||
|
||||
|
||||
### toggle
|
||||
```js
|
||||
type:'toggle',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
### multitoggle
|
||||
```js
|
||||
type:'multitoggle',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of toggles that respond to the same gesture. Each of these toggles will receive its parent's properties and the following (where X is the toggle's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
### push
|
||||
```js
|
||||
type:'push',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
### multipush
|
||||
```js
|
||||
type:'multipush',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of push buttons that respond to the same gesture. Each of these buttons will receive its parent's properties and the following (where X is the button's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
### switch
|
||||
```js
|
||||
type:'switch',
|
||||
values: { // [object] of ("label":value) pairs
|
||||
"Value 1":1,
|
||||
"Value 2":2
|
||||
}
|
||||
```
|
||||
|
||||
### plot
|
||||
```js
|
||||
type:'plot',
|
||||
points:[], // [string|array]
|
||||
// string : a single widget id, whose multiple values will be displayed,
|
||||
// evenly spaced on the x-axis
|
||||
// array : an array of [x,y] coordinates, which can be numbers
|
||||
// or widget id strings, for example :
|
||||
// [[0,0],[0.5,"some_widget_id"],["some_other_id","another_id"]]
|
||||
range:{ // [object] minimum and maximum values for X and Y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false // [bool] use logarithmic scale for y axis (log10)
|
||||
```
|
||||
|
||||
### plot
|
||||
```js
|
||||
type:'visualizer',
|
||||
curve:'', // [string] widget id (its value will be displayed)
|
||||
duration:1, // [number] window size in seconds
|
||||
range:{"min":0,"max":1}, // [object] minimum and maximum values the Y axis
|
||||
logScale: false, // [bool] use logarithmic scale for Y axis (log10)
|
||||
```
|
||||
- [Sliders](widgets/sliders.md)
|
||||
- [Buttons](widgets/buttons.md)
|
||||
- [Pads](widgets/pads.md)
|
||||
- [Matrices](widgets/matrices.md)
|
||||
- [Plots](widgets/plots.md)
|
||||
- [Containers](widgets/containers.md)
|
||||
|
|
|
|||
26
resources/docs/widgets/buttons.md
Normal file
26
resources/docs/widgets/buttons.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Buttons
|
||||
|
||||
Buttons are exactly what you think they are.
|
||||
|
||||
## toggle
|
||||
```js
|
||||
type:'toggle',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
## push
|
||||
```js
|
||||
type:'push',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
## switch
|
||||
```js
|
||||
type:'switch',
|
||||
values: { // [object] of ("label":value) pairs
|
||||
"Value 1":1,
|
||||
"Value 2":2
|
||||
}
|
||||
```
|
||||
24
resources/docs/widgets/containers.md
Normal file
24
resources/docs/widgets/containers.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# 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',
|
||||
horizontal:false, // [bool] set to true to display widgets horizontally
|
||||
widgets: [] // [array] of widget objects
|
||||
```
|
||||
|
||||
## 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',
|
||||
stretch:false, // [bool] set to true to stretch widgets width (don't put horizontal strips in it)
|
||||
widgets: [], // [array] of widget objects
|
||||
tabs: [] // [array] of tab objects
|
||||
```
|
||||
50
resources/docs/widgets/matrices.md
Normal file
50
resources/docs/widgets/matrices.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Matrices
|
||||
|
||||
Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures.
|
||||
|
||||
## multifader
|
||||
```js
|
||||
type:'multifader',
|
||||
strips:2, // [integer] number of faders
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
*This creates a row of vertical faders that respond to the same gesture. Each of these faders will receive its parent's properties and the following (where X is the fader's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
|
||||
## multitoggle
|
||||
```js
|
||||
type:'multitoggle',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of toggles that respond to the same gesture. Each of these toggles will receive its parent's properties and the following (where X is the toggle's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
|
||||
## multipush
|
||||
```js
|
||||
type:'multipush',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of push buttons that respond to the same gesture. Each of these buttons will receive its parent's properties and the following (where X is the button's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
29
resources/docs/widgets/pads.md
Normal file
29
resources/docs/widgets/pads.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Pads
|
||||
|
||||
Pads are multidimensional widgets that output multiple values.
|
||||
|
||||
## xy
|
||||
```js
|
||||
type:'xy',
|
||||
range:{ // [object] minimum and maximum values for x and y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false, // [bool] use logarithmic scale for y axis (log10)
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/x' & '/y' will be appended to the widget's path
|
||||
// or object : {x:'/osc_path_x', y:'/osc_path_y'}
|
||||
|
||||
```
|
||||
|
||||
## rgb
|
||||
```js
|
||||
type:'rgb',
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/r', '/g' & '/b' will be appended to the widget's path
|
||||
// or object : {r:'/osc_path_r', g:'/osc_path_g',b:'/osc_path_b'}
|
||||
```
|
||||
Variant of xy pad, it outputs rgb values between 0 and 255.
|
||||
29
resources/docs/widgets/plots.md
Normal file
29
resources/docs/widgets/plots.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Plots
|
||||
|
||||
Plots are tools that display other widgets' state or incomming osc messages.
|
||||
|
||||
## plot
|
||||
```js
|
||||
type:'plot',
|
||||
points:[], // [string|array]
|
||||
// string : a single widget id, whose multiple values will be displayed,
|
||||
// evenly spaced on the x-axis
|
||||
// array : an array of [x,y] coordinates, which can be numbers
|
||||
// or widget id strings, for example :
|
||||
// [[0,0],[0.5,"some_widget_id"],["some_other_id","another_id"]]
|
||||
range:{ // [object] minimum and maximum values for X and Y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false // [bool] use logarithmic scale for y axis (log10)
|
||||
```
|
||||
|
||||
## visualizer
|
||||
```js
|
||||
type:'visualizer',
|
||||
curve:'', // [string] widget id (its value will be displayed)
|
||||
duration:1, // [number] window size in seconds
|
||||
range:{"min":0,"max":1}, // [object] minimum and maximum values the Y axis
|
||||
logScale: false, // [bool] use logarithmic scale for Y axis (log10)
|
||||
```
|
||||
24
resources/docs/widgets/sliders.md
Normal file
24
resources/docs/widgets/sliders.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Sliders
|
||||
|
||||
Sliders are unidimensional widgets that output one value at a time.
|
||||
|
||||
## fader
|
||||
```js
|
||||
type:'fader',
|
||||
horizontal:false, // [bool] set to true to display fader horizontally
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
|
||||
## knob
|
||||
```js
|
||||
type:'knob',
|
||||
range: {"min":0,"max":1}, // [object] minimum and maximum values
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
pan:false // [bool] true for panning knob
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue