Skip to content

Commit 341b0b1

Browse files
authored
Merge pull request mixxxdj#14180 from endcredits33/2.5
Update Numark-Mixtrack-3-scripts.js
2 parents c1239d9 + 089213d commit 341b0b1

2 files changed

Lines changed: 112 additions & 23 deletions

File tree

res/controllers/Numark-Mixtrack-3-scripts.js

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
**********************************************************************/
55
// TrackEndWarning: "true": when you reach the end of the track,
66
// the jog wheel Button will flash. "false": No flash of Jog Wheel Button
7-
var TrackEndWarning = true;
7+
const TrackEndWarning = engine.getSetting("TrackEndWarning") === "true";
88

99
//iCutEnabled: iCut mode will automatically cut your track with the cross fader
1010
// when SHIFT enabled and scratching with the jog wheel
11-
var iCutEnabled = true;
11+
const iCutEnabled = engine.getSetting("iCutEnabled") === "true";
1212

1313
//activate PFL of deck on track load
14-
var smartPFL = true;
14+
const smartPFL = engine.getSetting("smartPFL") === "true";
1515

1616
//Disable Play on Sync button Double Press
17-
var noPlayOnSyncDoublePress = false;
17+
const noPlayOnSyncDoublePress = engine.getSetting("noPlayOnSyncDoublePress") === "true";
1818

1919
// Shift+Filter control behavior
2020
// true (default) - FX parameter 4 (when the FX is focused)
2121
// false - Channel Gain
22-
var ShiftFilterFX4 = true;
22+
const ShiftFilterFX4 = engine.getSetting("ShiftFilterFX4") === "true";
2323

2424
// allow pitch bend with wheel when wheel is not active
25-
var PitchBendOnWheelOff = true;
25+
const PitchBendOnWheelOff = engine.getSetting("PitchBendOnWheelOff") === "true";
2626

2727
/**************************
2828
* scriptpause
@@ -1078,36 +1078,55 @@ NumarkMixtrack3.PlayButton = function(channel, control, value, status, group) {
10781078
};
10791079

10801080
NumarkMixtrack3.BrowseButton = function(channel, control, value, status, group) {
1081-
var shifted = (NumarkMixtrack3.decks.D1.shiftKey || NumarkMixtrack3.decks.
1082-
D2.shiftKey || NumarkMixtrack3.decks.D3.shiftKey || NumarkMixtrack3.decks.D4.shiftKey);
1081+
const shifted = (
1082+
NumarkMixtrack3.decks.D1.shiftKey || NumarkMixtrack3.decks.D2.shiftKey ||
1083+
NumarkMixtrack3.decks.D3.shiftKey || NumarkMixtrack3.decks.D4.shiftKey
1084+
);
10831085

10841086
if (value === ON) {
1085-
if (shifted) {
1086-
// SHIFT + BROWSE push : directory mode -- > Open/Close selected side bar item
1087-
engine.setValue("[Library]", "GoToItem", true);
1088-
} else {
1089-
// Browse push : maximize/minimize library view
1090-
if (value === ON) {
1091-
script.toggleControl("[Skin]", "show_maximized_library");
1092-
}
1093-
}
1087+
if (engine.getSetting("libraryMode") === "focus") {
1088+
if (shifted) {
1089+
// SHIFT + BROWSE push : maximize/minimize library view
1090+
script.toggleControl("[Skin]", "show_maximized_library");
1091+
} else {
1092+
// Browse push : expand sidebar item or load track when in track table
1093+
engine.setValue("[Library]", "GoToItem", true);
1094+
}
1095+
} else { // Classic mode
1096+
if (shifted) {
1097+
// SHIFT + BROWSE push : directory mode -- > Open/Close selected side bar item
1098+
engine.setValue("[Library]", "GoToItem", true);
1099+
} else {
1100+
// Browse push : maximize/minimize library view
1101+
script.toggleControl("[Skin]", "show_maximized_library");
1102+
}
1103+
}
10941104
}
10951105
};
10961106

10971107
NumarkMixtrack3.BrowseKnob = function(channel, control, value, status, group) {
1098-
var shifted = (
1108+
const shifted = (
10991109
NumarkMixtrack3.decks.D1.shiftKey || NumarkMixtrack3.decks.D2.shiftKey ||
11001110
NumarkMixtrack3.decks.D3.shiftKey || NumarkMixtrack3.decks.D4.shiftKey
11011111
);
11021112

11031113
// value = 1 / 2 / 3 ... for positive //value = 1 / 2 / 3
11041114
var nval = (value > 0x40 ? value - 0x80 : value);
11051115

1106-
// SHIFT+Turn BROWSE Knob : directory mode --> select Play List/Side bar item
1107-
if (shifted) {
1108-
engine.setValue("[Playlist]", "SelectPlaylist", nval);
1109-
} else {
1110-
engine.setValue("[Playlist]", "SelectTrackKnob", nval);
1116+
if (engine.getSetting("libraryMode") === "focus") {
1117+
// SHIFT+Turn BROWSE Knob : change focus between search, track table, and sidebar
1118+
if (shifted) {
1119+
engine.setValue("[Library]", "MoveFocus", nval);
1120+
} else {
1121+
engine.setValue("[Library]", "MoveVertical", nval);
1122+
}
1123+
} else { // Classic mode
1124+
// SHIFT+Turn BROWSE Knob : directory mode --> select Play List/Side bar item
1125+
if (shifted) {
1126+
engine.setValue("[Playlist]", "SelectPlaylist", nval);
1127+
} else {
1128+
engine.setValue("[Playlist]", "SelectTrackKnob", nval);
1129+
}
11111130
}
11121131
};
11131132

res/controllers/Numark-Mixtrack-3.midi.xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,76 @@
88
<forums>https://mixxx.discourse.group/t/mixtrack-pro-3/15165</forums>
99
<wiki>http://www.mixxx.org/wiki/doku.php/numark_mixtrack_pro_3</wiki>
1010
</info>
11+
<settings>
12+
<option
13+
variable="libraryMode"
14+
label="Navigation mode"
15+
type="enum">
16+
<value label="Focus" default="true">focus</value>
17+
<value label="Classic">classic</value>
18+
<description>
19+
In Focus mode the Browse encoder affects the library widget which currently has keyboard focus.
20+
This requires the Mixxx window to have focus and allows to control the searchbar, too.
21+
22+
In Classic mode the Browse encoder can select items in the sidebar and tracks table only, but independent
23+
of keyboard focus.
24+
</description>
25+
</option>
26+
<option
27+
variable="TrackEndWarning"
28+
label="Track End Warning"
29+
type="boolean"
30+
default="true">
31+
<description>
32+
The jog wheel button flashes near the end of a track.
33+
</description>
34+
</option>
35+
<option
36+
variable="iCutEnabled"
37+
label="Enable iCut Mode"
38+
type="boolean"
39+
default="true">
40+
<description>
41+
When enabled, scratching with SHIFT automatically cuts the track using the crossfader.
42+
</description>
43+
</option>
44+
<option
45+
variable="smartPFL"
46+
label="Smart PFL on Track Load"
47+
type="boolean"
48+
default="true">
49+
<description>
50+
Automatically activates the deck’s PFL (headphone cue) when a track is loaded.
51+
</description>
52+
</option>
53+
<option
54+
variable="noPlayOnSyncDoublePress"
55+
label="Disable Play on Sync Double-Press"
56+
type="boolean"
57+
default="false">
58+
<description>
59+
Prevents the Sync button from triggering Play when double-pressed.
60+
</description>
61+
</option>
62+
<option
63+
variable="ShiftFilterFX4"
64+
label="Shift + Filter Controls FX4 (not Gain)"
65+
type="boolean"
66+
default="true">
67+
<description>
68+
When true, Shift + Filter adjusts FX parameter 4. When false, it controls channel gain.
69+
</description>
70+
</option>
71+
<option
72+
variable="PitchBendOnWheelOff"
73+
label="Pitch-bend with Wheel when Scratch is Off"
74+
type="boolean"
75+
default="true">
76+
<description>
77+
Allows pitch-bend using the jog wheel even when scratch mode is disabled.
78+
</description>
79+
</option>
80+
</settings>
1181
<controller id="Mixtrack3">
1282
<scriptfiles>
1383
<file functionprefix="NumarkMixtrack3" filename="Numark-Mixtrack-3-scripts.js" />

0 commit comments

Comments
 (0)