diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e23681d..b3faa392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/package.json b/package.json index fd19b943..5e10fd42 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index afd3d932..878759a9 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -439,6 +439,7 @@ | property | type |default | description | | --- | --- | --- | --- | |
1 | Defines visualization duration in seconds |
+ | 30 | Defines visualization framerate |
| \{
"min": 0,
"max": 1
} | Defines the min and max values for the y axis |
| "auto" | Defines the y axis origin. Set to `false` to disable it |
| false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
diff --git a/src/client/widgets/graphs/visualizer.js b/src/client/widgets/graphs/visualizer.js
index 3fcd592b..5c8a8b51 100644
--- a/src/client/widgets/graphs/visualizer.js
+++ b/src/client/widgets/graphs/visualizer.js
@@ -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
diff --git a/src/server/callbacks.js b/src/server/callbacks.js
index 084f467c..0c5e9f43 100644
--- a/src/server/callbacks.js
+++ b/src/server/callbacks.js
@@ -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]