Scripts should have access to a ControlObject like ScriptValue

Bug #398350 reported by RJ Skerry-Ryan
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

Currently scripts only access control objects via a line like:

engine.setValue("[Channel1]","playposition", foo);

Which inevitably leads to code like:

var add = 10;
var curVal = engine.getValue("[Channel1]","playposition");
engine.setValue("[Channel1]","playposition", curVal+add);

This is not ideal, at all. Especially considering ControlObjects support add/sub so you dont have to get the value first.

We should expose ControlObject functionality as objects in QtScript.

This involves writing a wrapper around ControlObjectThread that supports the various operations we would like to support in script. We may even be able to provide the ControlObjectThread itself, though we'll need to review how safe that is.

This will lead to more readable script code. Also it will make scripts slightly faster since they don't have to do a lookup for the COT every time you get or set the value.

Tags: midi
RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: midi
Be (
Changed in mixxx:
milestone: none → 2.4.0
Be (
Changed in mixxx:
milestone: 2.4.0 → none
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.