From 83c8de3ac357102e1f555017560b533d2c4bd12b Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 15 Mar 2016 17:05:07 +0100 Subject: [PATCH] split widgets reference, fix typos, try to be accurate... --- CHANGELOG.md | 7 +- resources/docs/build-from-sources.md | 2 + resources/docs/run-from-sources.md | 2 +- resources/docs/widgets-reference.md | 165 ++------------------------- resources/docs/widgets/buttons.md | 26 +++++ resources/docs/widgets/containers.md | 24 ++++ resources/docs/widgets/matrices.md | 50 ++++++++ resources/docs/widgets/pads.md | 29 +++++ resources/docs/widgets/plots.md | 29 +++++ resources/docs/widgets/sliders.md | 24 ++++ 10 files changed, 198 insertions(+), 160 deletions(-) create mode 100644 resources/docs/widgets/buttons.md create mode 100644 resources/docs/widgets/containers.md create mode 100644 resources/docs/widgets/matrices.md create mode 100644 resources/docs/widgets/pads.md create mode 100644 resources/docs/widgets/plots.md create mode 100644 resources/docs/widgets/sliders.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 18aa9a36..f4171de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/resources/docs/build-from-sources.md b/resources/docs/build-from-sources.md index fb642e6a..24003f70 100644 --- a/resources/docs/build-from-sources.md +++ b/resources/docs/build-from-sources.md @@ -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.* diff --git a/resources/docs/run-from-sources.md b/resources/docs/run-from-sources.md index de6df50a..f8f75e6f 100644 --- a/resources/docs/run-from-sources.md +++ b/resources/docs/run-from-sources.md @@ -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 ``` diff --git a/resources/docs/widgets-reference.md b/resources/docs/widgets-reference.md index fa84c503..3539ecab 100644 --- a/resources/docs/widgets-reference.md +++ b/resources/docs/widgets-reference.md @@ -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) diff --git a/resources/docs/widgets/buttons.md b/resources/docs/widgets/buttons.md new file mode 100644 index 00000000..4a12d455 --- /dev/null +++ b/resources/docs/widgets/buttons.md @@ -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 +} +``` diff --git a/resources/docs/widgets/containers.md b/resources/docs/widgets/containers.md new file mode 100644 index 00000000..75676bae --- /dev/null +++ b/resources/docs/widgets/containers.md @@ -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 +``` diff --git a/resources/docs/widgets/matrices.md b/resources/docs/widgets/matrices.md new file mode 100644 index 00000000..e32968ca --- /dev/null +++ b/resources/docs/widgets/matrices.md @@ -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 +``` diff --git a/resources/docs/widgets/pads.md b/resources/docs/widgets/pads.md new file mode 100644 index 00000000..8191e2e5 --- /dev/null +++ b/resources/docs/widgets/pads.md @@ -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. diff --git a/resources/docs/widgets/plots.md b/resources/docs/widgets/plots.md new file mode 100644 index 00000000..ecfc3576 --- /dev/null +++ b/resources/docs/widgets/plots.md @@ -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) +``` diff --git a/resources/docs/widgets/sliders.md b/resources/docs/widgets/sliders.md new file mode 100644 index 00000000..a6e4d7c7 --- /dev/null +++ b/resources/docs/widgets/sliders.md @@ -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 +```