Skip to content

Commit

Permalink
Merge pull request #3538 from pierrelegall/mapping/hercules-p32/prega…
Browse files Browse the repository at this point in the history
…in-on-drywetknobs

Hercules P32 mapping: pregain instead of dry/wet knob (optional)
  • Loading branch information
Swiftb0y authored Apr 3, 2023
2 parents d5d9dc5 + 3732aef commit 72518d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 4 additions & 4 deletions res/controllers/Hercules P32 DJ.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>P32.leftDeck.effectUnit.dryWetKnob.input</key>
<key>P32.leftDeck.dryWetKnobOrPregain.input</key>
<status>0xB1</status>
<midino>0x09</midino>
<options>
Expand All @@ -521,7 +521,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>P32.leftDeck.effectUnit.dryWetKnob.input</key>
<key>P32.leftDeck.dryWetKnobOrPregain.input</key>
<status>0xB4</status>
<midino>0x09</midino>
<options>
Expand Down Expand Up @@ -1548,7 +1548,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>P32.rightDeck.effectUnit.dryWetKnob.input</key>
<key>P32.rightDeck.dryWetKnobOrPregain.input</key>
<status>0xB2</status>
<midino>0x09</midino>
<options>
Expand All @@ -1557,7 +1557,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>P32.rightDeck.effectUnit.dryWetKnob.input</key>
<key>P32.rightDeck.dryWetKnobOrPregain.input</key>
<status>0xB5</status>
<midino>0x09</midino>
<options>
Expand Down
13 changes: 12 additions & 1 deletion res/controllers/Hercules-P32-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var loopEnabledDot = false;
var samplerCrossfaderAssign = true;
// Toggle effect units between 1 & 3 on left and 2 & 4 on right when toggling decks
var toggleEffectUnitsWithDecks = false;
// Set the dry/wet knob as a pregain
var dryWetKnobAsPregain = false;

/**
* Hercules P32 DJ controller script for Mixxx 2.1
Expand Down Expand Up @@ -378,7 +380,16 @@ P32.Deck = function(deckNumbers, channel) {
this.effectUnit.knobs[1].midi = [0xB0 + channel, 0x06];
this.effectUnit.knobs[2].midi = [0xB0 + channel, 0x07];
this.effectUnit.knobs[3].midi = [0xB0 + channel, 0x08];
this.effectUnit.dryWetKnob.midi = [0xB0 + channel, 0x09];
if (dryWetKnobAsPregain) {
this.dryWetKnobOrPregain = new components.Pot({
midi: [0xB0 + channel, 0x09],
group: "[Channel" + channel + "]",
inKey: "pregain",
});
} else {
this.effectUnit.dryWetKnob.midi = [0xB0 + channel, 0x09];
this.dryWetKnobOrPregain = this.effectUnit.dryWetKnob;
}
this.effectUnit.enableButtons[1].midi = [0x90 + channel, 0x03];
this.effectUnit.enableButtons[2].midi = [0x90 + channel, 0x04];
this.effectUnit.enableButtons[3].midi = [0x90 + channel, 0x05];
Expand Down

0 comments on commit 72518d6

Please sign in to comment.