diff options
author | Ferran Pujol Camins <ferranpujolcamins@gmail.com> | 2019-11-03 10:16:50 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-02-28 23:47:05 +0100 |
commit | 30b82cf1b4333bbdca4aeced776c4973fbe6b532 (patch) | |
tree | cb68c72785c44b66e63eb45d3419cde4185ff48d /res/controllers/midi-components-0.0.js | |
parent | 66d3ffadfdc2c0d80427db18d115924e12a96934 (diff) |
Update midi-components library
and change cue color CO name
Diffstat (limited to 'res/controllers/midi-components-0.0.js')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 2657bb2176..7db8bd503b 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -295,9 +295,9 @@ return; } if (options.colors !== undefined || options.sendRGB !== undefined) { - this.colorIdKey = "hotcue_" + options.number + "_color_id"; + this.colorKey = 'hotcue_' + options.number + '_color'; if (options.colors === undefined) { - options.colors = color.predefinedColorsList(); + options.colors = color.hotcueColorPalette(); } } this.number = options.number; @@ -312,8 +312,8 @@ this.inKey = "hotcue_" + this.number + "_clear"; }, getColor: function() { - if (this.colorIdKey !== undefined) { - return color.predefinedColorFromId(engine.getValue(this.group, this.colorIdKey)); + if (this.colorKey !== undefined) { + return color.colorFromHexCode(engine.getValue(this.group,this.colorKey)); } else { return null; } @@ -324,8 +324,8 @@ // and there is no hotcueColor for turning the LED // off. So the `send()` function is responsible for turning the // actual LED off. - if (this.colorIdKey !== undefined && outval !== this.off) { - this.outputColor(engine.getValue(this.group, this.colorIdKey)); + if (this.colorKey !== undefined && outval !== this.off) { + this.outputColor(engine.getValue(this.group, this.colorKey)); } else { this.send(outval); } @@ -348,9 +348,9 @@ }, connect: function() { Button.prototype.connect.call(this); // call parent connect - if (undefined !== this.group && this.colorIdKey !== undefined) { - this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, function(id) { - if (engine.getValue(this.group, this.outKey)) { + if (undefined !== this.group && this.colorKey !== undefined) { + this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) { + if (engine.getValue(this.group,this.outKey)) { this.outputColor(id); } }); |