Skip to content

Commit 669ab77

Browse files
authored
Merge pull request mixxxdj#16655 from mixxxdj/yaeltex-shift-fix
Yaeltex Minimixxx: fix shift-pitch behavior
2 parents 3361088 + 8e35db6 commit 669ab77

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

res/controllers/Yaeltex MiniMixxx.midi.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
<!-- <wiki></wiki>
88
<forums></forums> -->
99
</info>
10+
<settings>
11+
<group label="Controller Behavior">
12+
<row orientation="vertical">
13+
<option
14+
variable="shiftPitch"
15+
type="boolean"
16+
default="false"
17+
label="Only adjust pitch when shift button is held">
18+
<description>
19+
When set to true, only allows adjustments to pitch when shift is held. Useful for preventing accidental adjustments.
20+
</description>
21+
</option>
22+
</row>
23+
</group>
24+
</settings>
1025
<controller id="MiniMixxx">
1126
<scriptfiles>
1227
<file filename="Yaeltex-MiniMixxx-scripts.js" functionprefix="MiniMixxx" />

res/controllers/Yaeltex-MiniMixxx-scripts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ MiniMixxx.DebugMode = false;
3131

3232
// Set to true to only allow adjustments to the pitch sliders if Shift is held.
3333
// This can prevent accidental adjustments.
34-
MiniMixxx.ShiftPitch = false;
34+
MiniMixxx.ShiftPitch = engine.getSetting("shiftPitch") || false;
3535

3636
// An Encoder represents a single encoder knob and tracks the active mode.
3737
MiniMixxx.Encoder = class {
@@ -1457,8 +1457,8 @@ MiniMixxx.Controller = class {
14571457
return;
14581458
}
14591459

1460-
// If shift is pressed, don't update any values.
1461-
if (!this.shiftActive() && !this.keylockPressed(group)) {
1460+
// Only adjust pitch based on ShiftPitch setting.
1461+
if ((MiniMixxx.ShiftPitch === !this.shiftActive()) && !this.keylockPressed(group)) {
14621462
this.pitchSliderLastValue[group] = value;
14631463
return;
14641464
}

0 commit comments

Comments
 (0)