From 9c238d7f2f8721c342cae89fe0af009878e02222 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Wed, 18 Dec 2024 11:46:59 +0100 Subject: [PATCH 1/3] S4 Mk3: compare scratch functions engine.scratch.. vs engine.setValue(group, "scratch2..") --- .../Traktor Kontrol S4 MK3.hid.xml | 18 +++ res/controllers/Traktor-Kontrol-S4-MK3.js | 106 +++++++++++++----- 2 files changed, 98 insertions(+), 26 deletions(-) diff --git a/res/controllers/Traktor Kontrol S4 MK3.hid.xml b/res/controllers/Traktor Kontrol S4 MK3.hid.xml index a254772e6c5..1deb185ac7d 100644 --- a/res/controllers/Traktor Kontrol S4 MK3.hid.xml +++ b/res/controllers/Traktor Kontrol S4 MK3.hid.xml @@ -10,6 +10,24 @@ + + + + + + + + diff --git a/res/controllers/Traktor-Kontrol-S4-MK3.js b/res/controllers/Traktor-Kontrol-S4-MK3.js index 9eed54105e7..6e172961436 100644 --- a/res/controllers/Traktor-Kontrol-S4-MK3.js +++ b/res/controllers/Traktor-Kontrol-S4-MK3.js @@ -127,6 +127,7 @@ const ScratchAlpha = 1.0/8; const ScratchBeta = ScratchAlpha/32; const ScratchTicksPerRev = ScratchSyncToWheelLED ? 2150 : 6750; const ScratchSpeedFactor = ScratchSyncToWheelLED ? 2.14 : 1; +const HotcuePressStopsScratching = !!engine.getSetting("hotcuePressStopsScratching"); // Define whether or not to use motors. // This is a BETA feature! Please use at your own risk. Setting this off means that below settings are inactive @@ -733,7 +734,9 @@ class HotcueButton extends PushButton { this.inKey = `hotcue_${this.number}_clear`; } input(pressed) { - this.deck.wheelTouch.toggleScratching(false); + if (HotcuePressStopsScratching) { + this.deck.wheelTouch.toggleScratching(false); + } engine.setValue(this.group, this.inKey, pressed); } output(value) { From 7abf2616ce1607e42676872f9302ef6ea0553531 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Wed, 18 Dec 2024 12:34:35 +0100 Subject: [PATCH 3/3] S4 Mk3: use scratch modes scratch2, scratchTick or scratch_position --- .../Traktor Kontrol S4 MK3.hid.xml | 11 +- res/controllers/Traktor-Kontrol-S4-MK3.js | 103 ++++++++++++++---- 2 files changed, 87 insertions(+), 27 deletions(-) diff --git a/res/controllers/Traktor Kontrol S4 MK3.hid.xml b/res/controllers/Traktor Kontrol S4 MK3.hid.xml index fe984cc8441..0feff777a2c 100644 --- a/res/controllers/Traktor Kontrol S4 MK3.hid.xml +++ b/res/controllers/Traktor Kontrol S4 MK3.hid.xml @@ -13,11 +13,12 @@