Merge branch 'master' of github.com:jean-emmanuel/open-stage-control

This commit is contained in:
bordun 2020-04-19 10:49:03 +02:00
commit 9295b8f86a
5 changed files with 6 additions and 3 deletions

View file

@ -57,6 +57,7 @@
- switch: added `click` mode
- plot/eq: removed `smooth`
- plots/sliders/pads: reversed `logScale` behavior to match standard implementations; can be either `false` (disabled), `true` (logarithmic scale) or `number` (manual log scale, negative for exponential scale)
- visualizer: added `framerate` property
- menu: always centered menu
- modal: modals can't overflow their parents' (modal, tab, panel) boundaries
- input: removed `vertical`

View file

@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.0.0-alpha7",
"version": "1.0.0-alpha8",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "jean-emmanuel@ammd.net"

View file

@ -439,6 +439,7 @@
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="visualizer_duration">duration<a class="headerlink" href="#visualizer_duration" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines visualization duration in seconds |
| <h6 id="visualizer_framerate">framerate<a class="headerlink" href="#visualizer_framerate" title="Permanent link">#</a></h6> | `number` | <code>30</code> | Defines visualization framerate |
| <h6 id="visualizer_rangeY">rangeY<a class="headerlink" href="#visualizer_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the y axis |
| <h6 id="visualizer_origin">origin<a class="headerlink" href="#visualizer_origin" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Defines the y axis origin. Set to `false` to disable it |
| <h6 id="visualizer_logScaleY">logScaleY<a class="headerlink" href="#visualizer_logScaleY" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |

View file

@ -20,6 +20,7 @@ module.exports = class Visualizer extends StaticProperties(Plot, {rangeX: {min:
_visualizer:'visualizer',
duration: {type: 'number', value: 1, help: 'Defines visualization duration in seconds'},
framerate: {type: 'number', value: 30, help: 'Defines visualization framerate'},
rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis'},
origin: {type: 'number', value: 'auto', help: 'Defines the y axis origin. Set to `false` to disable it'},
logScaleY: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm\'s base.'},
@ -33,7 +34,7 @@ module.exports = class Visualizer extends StaticProperties(Plot, {rangeX: {min:
super(options)
this.fps = CANVAS_FRAMERATE
this.fps = clip(this.getProp('framerate'), [1, CANVAS_FRAMERATE])
this.length = Math.round(clip(this.fps * this.getProp('duration'), [8, 4096]))
this.value = new Array(this.length).fill(this.rangeY.min)
this.cancel = false

View file

@ -319,7 +319,7 @@ module.exports = {
var targets = []
if (shortdata.i && settings.read('send') && !shortdata.target) Array.prototype.push.apply(targets, settings.read('send'))
if (!shortdata.i && settings.read('send') && !shortdata.target) Array.prototype.push.apply(targets, settings.read('send'))
if (data.target) Array.prototype.push.apply(targets, data.target)
data.args = data.preArgs ? data.preArgs.concat(value) : [value]