Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed makeUnbufferedConnection and used it for VuMeter controls #4583

Merged
merged 3 commits into from
Jan 9, 2022
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
4 changes: 2 additions & 2 deletions res/controllers/Behringer-CMD-MM1-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,10 @@ CMDMM.init = function () {
this.speed=navEncoderScale;
},
});
CMDMM.VuMeterL = engine.makeConnection("[Master]","VuMeterL",function (value) {
CMDMM.VuMeterL = engine.makeUnbufferedConnection("[Master]","VuMeterL",function (value) {
midi.sendShortMsg(MIDI.CC, 0x50, (value * 15) + 48);
});
CMDMM.VuMeterR = engine.makeConnection("[Master]","VuMeterR",function (value) {
CMDMM.VuMeterR = engine.makeUnbufferedConnection("[Master]","VuMeterR",function (value) {
midi.sendShortMsg(MIDI.CC, 0x51, (value * 15) + 48);
});
CMDMM.layer(1);
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Denon-MC7000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ MC7000.init = function() {
midi.sendSysexMsg(ControllerStatusSysex, ControllerStatusSysex.length);

// VU meters
engine.makeConnection("[Channel1]", "VuMeter", MC7000.VuMeter);
engine.makeConnection("[Channel2]", "VuMeter", MC7000.VuMeter);
engine.makeConnection("[Channel3]", "VuMeter", MC7000.VuMeter);
engine.makeConnection("[Channel4]", "VuMeter", MC7000.VuMeter);
engine.makeUnbufferedConnection("[Channel1]", "VuMeter", MC7000.VuMeter);
engine.makeUnbufferedConnection("[Channel2]", "VuMeter", MC7000.VuMeter);
engine.makeUnbufferedConnection("[Channel3]", "VuMeter", MC7000.VuMeter);
engine.makeUnbufferedConnection("[Channel4]", "VuMeter", MC7000.VuMeter);

// Platter Ring LED mode
midi.sendShortMsg(0x90, 0x64, MC7000.modeSingleLED);
Expand Down
12 changes: 6 additions & 6 deletions res/controllers/Numark-Mixtrack-Platinum-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ MixtrackPlatinum.init = function(id, debug) {
engine.makeConnection("[Controls]", "ShowDurationRemaining", MixtrackPlatinum.timeElapsedCallback);

// setup vumeter tracking
engine.makeConnection("[Channel1]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeConnection("[Channel2]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeConnection("[Channel3]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeConnection("[Channel4]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeConnection("[Master]", "VuMeterL", MixtrackPlatinum.vuCallback);
engine.makeConnection("[Master]", "VuMeterR", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Channel1]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Channel2]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Channel3]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Channel4]", "VuMeter", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Master]", "VuMeterL", MixtrackPlatinum.vuCallback);
engine.makeUnbufferedConnection("[Master]", "VuMeterR", MixtrackPlatinum.vuCallback);
};

MixtrackPlatinum.shutdown = function() {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Numark-Mixtrack-Pro-FX-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ MixtrackProFX.init = function() {
var statusSysex = [0xF0, 0x00, 0x20, 0x7F, 0x03, 0x01, 0xF7];
midi.sendSysexMsg(statusSysex, statusSysex.length);

engine.makeConnection("[Channel1]", "VuMeter", MixtrackProFX.vuCallback);
engine.makeConnection("[Channel2]", "VuMeter", MixtrackProFX.vuCallback);
engine.makeUnbufferedConnection("[Channel1]", "VuMeter", MixtrackProFX.vuCallback);
engine.makeUnbufferedConnection("[Channel2]", "VuMeter", MixtrackProFX.vuCallback);

// trigger is needed to initialize lights to 0x01
MixtrackProFX.deck.forEachComponent(function(component) {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Pioneer-DDJ-400-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ PioneerDDJ400.toggleLight = function(midiIn, active) {
PioneerDDJ400.init = function() {
engine.setValue("[EffectRack1_EffectUnit1]", "show_focus", 1);

engine.makeConnection("[Channel1]", "VuMeter", PioneerDDJ400.vuMeterUpdate);
engine.makeConnection("[Channel2]", "VuMeter", PioneerDDJ400.vuMeterUpdate);
engine.makeUnbufferedConnection("[Channel1]", "VuMeter", PioneerDDJ400.vuMeterUpdate);
engine.makeUnbufferedConnection("[Channel2]", "VuMeter", PioneerDDJ400.vuMeterUpdate);

PioneerDDJ400.toggleLight(PioneerDDJ400.lights.deck1.vuMeter, false);
PioneerDDJ400.toggleLight(PioneerDDJ400.lights.deck2.vuMeter, false);
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ TraktorS2MK2.registerOutputPackets = function() {
TraktorS2MK2.connectEffectButtonLEDs("[EffectRack1_EffectUnit1]");
TraktorS2MK2.connectEffectButtonLEDs("[EffectRack1_EffectUnit2]");

engine.makeConnection("[Channel1]", "VuMeter", TraktorS2MK2.onVuMeterChanged).trigger();
engine.makeConnection("[Channel2]", "VuMeter", TraktorS2MK2.onVuMeterChanged).trigger();
engine.makeUnbufferedConnection("[Channel1]", "VuMeter", TraktorS2MK2.onVuMeterChanged).trigger();
engine.makeUnbufferedConnection("[Channel2]", "VuMeter", TraktorS2MK2.onVuMeterChanged).trigger();

engine.makeConnection("[Channel1]", "loop_enabled", TraktorS2MK2.onLoopEnabledChanged);
engine.makeConnection("[Channel2]", "loop_enabled", TraktorS2MK2.onLoopEnabledChanged);
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S2-MK3-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ TraktorS2MK3.registerOutputPackets = function () {
this.linkOutput("[Microphone]", "talkover", this.outputHandler);

// VuMeter
this.vuLeftConnection = engine.makeConnection("[Channel1]", "VuMeter", this.vuMeterHandler);
this.vuRightConnection = engine.makeConnection("[Channel2]", "VuMeter", this.vuMeterHandler);
this.vuLeftConnection = engine.makeUnbufferedConnection("[Channel1]", "VuMeter", this.vuMeterHandler);
this.vuRightConnection = engine.makeUnbufferedConnection("[Channel2]", "VuMeter", this.vuMeterHandler);
this.clipLeftConnection = engine.makeConnection("[Channel1]", "PeakIndicator", this.peakOutputHandler);
this.clipRightConnection = engine.makeConnection("[Channel2]", "PeakIndicator", this.peakOutputHandler);

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S3-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1906,8 +1906,8 @@ TraktorS3.Controller.prototype.registerOutputPackets = function() {
engine.connectControl("[Master]", "maximize_library", TraktorS3.bind(TraktorS3.Controller.prototype.maximizeLibraryOutput, this));

// Master VuMeters
this.masterVuMeter["VuMeterL"].connection = engine.makeConnection("[Master]", "VuMeterL", TraktorS3.bind(TraktorS3.Controller.prototype.masterVuMeterHandler, this));
this.masterVuMeter["VuMeterR"].connection = engine.makeConnection("[Master]", "VuMeterR", TraktorS3.bind(TraktorS3.Controller.prototype.masterVuMeterHandler, this));
this.masterVuMeter["VuMeterL"].connection = engine.makeUnbufferedConnection("[Master]", "VuMeterL", TraktorS3.bind(TraktorS3.Controller.prototype.masterVuMeterHandler, this));
this.masterVuMeter["VuMeterR"].connection = engine.makeUnbufferedConnection("[Master]", "VuMeterR", TraktorS3.bind(TraktorS3.Controller.prototype.masterVuMeterHandler, this));
this.linkChannelOutput("[Master]", "PeakIndicatorL", TraktorS3.bind(TraktorS3.Controller.prototype.peakOutput, this));
this.linkChannelOutput("[Master]", "PeakIndicatorR", TraktorS3.bind(TraktorS3.Controller.prototype.peakOutput, this));
this.guiTickConnection = engine.makeConnection("[Master]", "guiTick50ms", TraktorS3.bind(TraktorS3.Controller.prototype.guiTickHandler, this));
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Yaeltex-MiniMixxx-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ MiniMixxx.EncoderModeGain = class extends MiniMixxx.Mode {
this.showGain = false;
engine.makeConnection(this.channel, "pregain", this.pregainIndicator.bind(this));
engine.makeConnection(this.channel, "pfl", this.pflIndicator.bind(this));
engine.makeConnection(this.channel, "VuMeter", this.vuIndicator.bind(this));
engine.makeUnbufferedConnection(this.channel, "VuMeter", this.vuIndicator.bind(this));
engine.makeConnection(this.channel, "PeakIndicator", this.peakIndicator.bind(this));
}
handleSpin(velo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ QJSValue ControllerScriptInterfaceLegacy::makeConnection(
return ControllerScriptInterfaceLegacy::makeConnectionInternal(group, name, callback, false);
}

QJSValue ControllerScriptInterfaceLegacy::makeCompressedConnection(
QJSValue ControllerScriptInterfaceLegacy::makeUnbufferedConnection(
const QString& group, const QString& name, const QJSValue& callback) {
return ControllerScriptInterfaceLegacy::makeConnectionInternal(group, name, callback, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ControllerScriptInterfaceLegacy : public QObject {
Q_INVOKABLE QJSValue makeConnection(const QString& group,
const QString& name,
const QJSValue& callback);
Q_INVOKABLE QJSValue makeCompressedConnection(const QString& group,
Q_INVOKABLE QJSValue makeUnbufferedConnection(const QString& group,
const QString& name,
const QJSValue& callback);
// DEPRECATED: Use makeConnection instead.
Expand Down