diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-10 11:09:27 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-10 11:09:27 +0100 |
commit | 702050f0b8c52622849d0db1fa5146589c52d11f (patch) | |
tree | eea060db744a3744f73952c8e6f5019e185f7a8c /res/controllers/midi-components-0.0.js | |
parent | a538a0958356874d1994654d11fec1105937c6fa (diff) |
res/controllers: Add color conv. functions to common-controller-scripts
Diffstat (limited to 'res/controllers/midi-components-0.0.js')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 9936e0841e..3c61cbf383 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -308,21 +308,6 @@ shift: function() { this.inKey = "hotcue_" + this.number + "_clear"; }, - getColor: function(colorCode) { - if (colorCode === undefined && this.colorKey !== undefined) { - colorCode = engine.getValue(this.group, this.colorKey); - } - - if (colorCode !== undefined) { - return { - "red": (colorCode >> 16) & 0xFF, - "green": (colorCode >> 8) & 0xFF, - "blue": colorCode & 0xFF, - }; - } - - return null; - }, output: function(value) { var outval = this.outValueScale(value); // WARNING: outputColor only handles hotcueColors @@ -344,7 +329,7 @@ print("ERROR: no function defined for sending RGB colors"); return; } - this.sendRGB(this.getColor(colorCode)); + this.sendRGB(colorCodeToColor(colorCode)); } }, connect: function() { |