Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion res/controllers/Allen-and-Heath-Xone-K2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ XoneK2.EffectUnit = function (column, unitNumber, midiChannel, twoDeck) {
libraryEffectUnit.showParametersConnection =
engine.makeConnection(unitString,
'show_parameters',
libraryEffectUnit.onShowParametersChange);
libraryEffectUnit.onShowParametersChange.bind(this));

libraryEffectUnit.knobs.reconnectComponents();
libraryEffectUnit.enableButtons.reconnectComponents();
Expand Down
6 changes: 3 additions & 3 deletions res/controllers/Hercules-P32-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ P32.slipButton = new components.Button({
connect: function () {
for (var d = 1; d <= 4; d++) {
this.connections.push(
engine.connectControl('[Channel' + d + ']', 'slip_enabled', this.output)
engine.connectControl('[Channel' + d + ']', 'slip_enabled', this.output.bind(this))
);
}
},
Expand Down Expand Up @@ -222,9 +222,9 @@ P32.Deck = function (deckNumbers, channel) {
};
},
connect: function () {
this.connections[0] = engine.connectControl(this.group, 'beatloop_size', this.output);
this.connections[0] = engine.connectControl(this.group, 'beatloop_size', this.output.bind(this));
if (loopEnabledDot) {
this.connections[1] = engine.connectControl(this.group, 'loop_enabled', this.output);
this.connections[1] = engine.connectControl(this.group, 'loop_enabled', this.output.bind(this));
}
},
output: function (value, group, control) {
Expand Down
22 changes: 11 additions & 11 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
undefined !== this.outKey &&
undefined !== this.output &&
typeof this.output === 'function') {
this.connections[0] = engine.makeConnection(this.group, this.outKey, this.output);
this.connections[0] = engine.makeConnection(this.group, this.outKey, this.output.bind(this));
}
},
disconnect: function () {
Expand Down Expand Up @@ -193,7 +193,7 @@
this.longPressTimer = engine.beginTimer(this.longPressTimeout, function () {
this.isLongPressed = true;
this.longPressTimer = 0;
}, true);
}.bind(this), true);
} else {
if (this.isLongPressed) {
this.inToggle();
Expand Down Expand Up @@ -364,12 +364,12 @@
}
},
connect: function() {
this.connections[0] = engine.makeConnection(this.group, 'track_loaded', this.output);
this.connections[0] = engine.makeConnection(this.group, 'track_loaded', this.output.bind(this));
if (this.playing !== undefined) {
this.connections[1] = engine.makeConnection(this.group, 'play', this.output);
this.connections[1] = engine.makeConnection(this.group, 'play', this.output.bind(this));
}
if (this.looping !== undefined) {
this.connections[2] = engine.connectControl(this.group, 'repeat', this.output);
this.connections[2] = engine.makeConnection(this.group, 'repeat', this.output.bind(this));
}
},
outKey: null, // hack to get Component constructor to call connect()
Expand Down Expand Up @@ -663,7 +663,7 @@
// presses the skin button for show_parameters.
this.showParametersConnection = engine.makeConnection(this.group,
'show_parameters',
this.onShowParametersChange);
this.onShowParametersChange.bind(this));
this.showParametersConnection.trigger();
}

Expand Down Expand Up @@ -808,7 +808,7 @@
outKey: "focused_effect",
connect: function () {
this.connections[0] = engine.makeConnection(eu.group, "focused_effect",
this.onFocusChange);
this.onFocusChange.bind(this));
},
disconnect: function () {
engine.softTakeoverIgnoreNextValue(this.group, this.inKey);
Expand Down Expand Up @@ -871,11 +871,11 @@

this.connect = function () {
this.connections[0] = engine.makeConnection(eu.group, "focused_effect",
this.onFocusChange);
this.onFocusChange.bind(this));
// this.onFocusChange sets this.group and this.outKey, so trigger it
// before making the connection for LED output
this.connections[0].trigger();
this.connections[1] = engine.makeConnection(this.group, this.outKey, this.output);
this.connections[1] = engine.makeConnection(this.group, this.outKey, this.output.bind(this));
};

this.unshift = function () {
Expand Down Expand Up @@ -919,7 +919,7 @@
// Component.prototype.trigger() triggering the disconnected connection.
this.connections = [engine.makeConnection(eu.group,
"focused_effect",
this.output)];
this.output.bind(this))];
};
},
});
Expand Down Expand Up @@ -961,7 +961,7 @@
var showParameters = engine.getValue(this.group, "show_parameters");
if (this.isPress(channel, control, value, status)) {
this.longPressTimer = engine.beginTimer(this.longPressTimeout,
this.startEffectFocusChooseMode,
this.startEffectFocusChooseMode.bind(this),
true);
if (!showParameters) {
if (!allowFocusWhenParametersHidden) {
Expand Down