From 6d5cd6a438709f76a059deabf2f426116d999afe Mon Sep 17 00:00:00 2001 From: Al Hadebe Date: Tue, 25 Jun 2024 16:53:49 +1000 Subject: [PATCH] add controller settings for the Numark Scratch --- res/controllers/Numark-Scratch-scripts.js | 25 +++--- res/controllers/Numark-Scratch.midi.xml | 96 ++++++++++++++++++++++- 2 files changed, 105 insertions(+), 16 deletions(-) diff --git a/res/controllers/Numark-Scratch-scripts.js b/res/controllers/Numark-Scratch-scripts.js index 3a29485ae9c..60605806900 100644 --- a/res/controllers/Numark-Scratch-scripts.js +++ b/res/controllers/Numark-Scratch-scripts.js @@ -3,36 +3,35 @@ var NumarkScratch = {}; /* * USER CONFIGURABLE SETTINGS. + * Change settings in the preferences */ // Defines the Beatloop Roll sizes for the 4 pads, for available values see: -// https://manual.mixxx.org/2.4/en/chapters/appendix/mixxx_controls.html#control-[ChannelN]-beatlooproll_X_activate +// https://manual.mixxx.org/latest/en/chapters/appendix/mixxx_controls.html#control-[ChannelN]-beatlooproll_X_activate // Default: [0.25, 0.5, 1, 2] NumarkScratch.autoLoopSizes = [ - "0.25", - "0.5", - "1", - "2", + engine.getSetting("beatLoopRollsSize1") || 0.25, + engine.getSetting("beatLoopRollsSize2") || 0.5, + engine.getSetting("beatLoopRollsSize3") || 1, + engine.getSetting("beatLoopRollsSize4") || 2, ]; // Defines how the Loop Encoder functions. // If 'true' the Encoder scrolls the library/loads track. Shift + Encoder manages looping. // If 'false' the Encoder manages looping. Shift + Encoder scrolls the library/loads track (Serato default). // Default: false -NumarkScratch.invertLoopEncoderFunction = false; +NumarkScratch.invertLoopEncoderFunction = !!engine.getSetting("invertLoopEncoderFunction"); -// Defines the bightness of button LEDs when they inactive. -// '0x00' sets the LEDSs to completely off. '0x01 sets the LEDs to dim. -// Default: 0x01 (dim) -NumarkScratch.LOW_LIGHT = 0x01; +// Define whether or not to keep LEDs dimmed if they are inactive. +// 0x01 ('true' in UI) will keep them dimmed, 0x00 ('false' in UI) will turn them off. Default: 0x01 ('true') +NumarkScratch.noLight = 0x00; +NumarkScratch.dimLight = 0x01; +components.Button.prototype.off = engine.getSetting("inactiveLightsAlwaysBacklit") ? NumarkScratch.dimLight : NumarkScratch.noLight; /* * CODE */ - -components.Button.prototype.off = NumarkScratch.LOW_LIGHT; - NumarkScratch.init = function() { // Initialize component containers NumarkScratch.deck = new components.ComponentContainer(); diff --git a/res/controllers/Numark-Scratch.midi.xml b/res/controllers/Numark-Scratch.midi.xml index d550bf831a3..a23674152c1 100644 --- a/res/controllers/Numark-Scratch.midi.xml +++ b/res/controllers/Numark-Scratch.midi.xml @@ -1,12 +1,102 @@ - + Numark Scratch Al Hadebe(NotYourAverageAl) Mapping for the Numark Scratch Mixer - NumarkScratch - NumarkScratch + https://mixxx.discourse.group/t/numark-scratch-mapping/25186 + https://manual.mixxx.org/latest/en/hardware/controllers/numark_scratch + + + + + + + + + + + + + + + +