Skip to content

Commit

Permalink
Roland DJ-202: Make loop button mappings generic
Browse files Browse the repository at this point in the history
This allows us to change their functionality dynamically, dependent on pad
section state.
  • Loading branch information
eigengrau committed May 19, 2019
1 parent 2f10efa commit 50c2236
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions res/controllers/Roland_DJ-202-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1114,22 +1114,22 @@ DJ202.PadSection = function (deck) {
});
}

this.loopIn = new DJ202.ManualLoopButton({
this.loopIn = this.loopButton[5] = new DJ202.ManualLoopButton({
cc: 0x15,
inKey: 'loop_in',
outKey: 'loop_start_position'
});
this.loopOut = new DJ202.ManualLoopButton({
this.loopOut = this.loopButton[6] = new DJ202.ManualLoopButton({
cc: 0x16,
inKey: 'loop_out',
outKey: 'loop_end_position',
});
this.loopToggle = new DJ202.ManualLoopButton({
this.loopToggle = this.loopButton[8] = new DJ202.ManualLoopButton({
cc: 0x18,
inKey: 'reloop_toggle',
outKey: 'loop_enabled'
});
this.loopExit = new DJ202.ManualLoopButton({
this.loopExit = this.loopButton[7] = new DJ202.ManualLoopButton({
cc: 0x17,
inKey: 'reloop_andstop',
outKey: 'reloop_andstop'
Expand Down
32 changes: 16 additions & 16 deletions res/controllers/Roland_DJ-202.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>DJ202.leftDeck.padSection.loopIn.input</key>
<key>DJ202.leftDeck.padSection.loopButton[5].input</key>
<status>0x94</status>
<midino>0x15</midino>
<options>
Expand All @@ -233,7 +233,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>DJ202.leftDeck.padSection.loopOut.input</key>
<key>DJ202.leftDeck.padSection.loopButton[6].input</key>
<status>0x94</status>
<midino>0x16</midino>
<options>
Expand All @@ -242,7 +242,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>DJ202.leftDeck.padSection.loopExit.input</key>
<key>DJ202.leftDeck.padSection.loopButton[7].input</key>
<status>0x94</status>
<midino>0x17</midino>
<options>
Expand All @@ -251,7 +251,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>DJ202.leftDeck.padSection.loopToggle.input</key>
<key>DJ202.leftDeck.padSection.loopButton[8].input</key>
<status>0x94</status>
<midino>0x18</midino>
<options>
Expand Down Expand Up @@ -952,7 +952,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>DJ202.leftDeck.padSection.loopIn.input</key>
<key>DJ202.leftDeck.padSection.loopButton[5].input</key>
<status>0x96</status>
<midino>0x15</midino>
<options>
Expand All @@ -961,7 +961,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>DJ202.leftDeck.padSection.loopOut.input</key>
<key>DJ202.leftDeck.padSection.loopButton[6].input</key>
<status>0x96</status>
<midino>0x16</midino>
<options>
Expand All @@ -970,7 +970,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>DJ202.leftDeck.padSection.loopExit.input</key>
<key>DJ202.leftDeck.padSection.loopButton[7].input</key>
<status>0x96</status>
<midino>0x17</midino>
<options>
Expand All @@ -979,7 +979,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>DJ202.leftDeck.padSection.loopToggle.input</key>
<key>DJ202.leftDeck.padSection.loopButton[8].input</key>
<status>0x96</status>
<midino>0x18</midino>
<options>
Expand Down Expand Up @@ -1771,7 +1771,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>DJ202.rightDeck.padSection.loopIn.input</key>
<key>DJ202.rightDeck.padSection.loopButton[5].input</key>
<status>0x95</status>
<midino>0x15</midino>
<options>
Expand All @@ -1780,7 +1780,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>DJ202.rightDeck.padSection.loopOut.input</key>
<key>DJ202.rightDeck.padSection.loopButton[6].input</key>
<status>0x95</status>
<midino>0x16</midino>
<options>
Expand All @@ -1789,7 +1789,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>DJ202.rightDeck.padSection.loopExit.input</key>
<key>DJ202.rightDeck.padSection.loopButton[7].input</key>
<status>0x95</status>
<midino>0x17</midino>
<options>
Expand All @@ -1798,7 +1798,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>DJ202.rightDeck.padSection.loopToggle.input</key>
<key>DJ202.rightDeck.padSection.loopButton[8].input</key>
<status>0x95</status>
<midino>0x18</midino>
<options>
Expand Down Expand Up @@ -2508,7 +2508,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>DJ202.rightDeck.padSection.loopIn.input</key>
<key>DJ202.rightDeck.padSection.loopButton[5].input</key>
<status>0x97</status>
<midino>0x15</midino>
<options>
Expand All @@ -2517,7 +2517,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>DJ202.rightDeck.padSection.loopOut.input</key>
<key>DJ202.rightDeck.padSection.loopButton[6].input</key>
<status>0x97</status>
<midino>0x16</midino>
<options>
Expand All @@ -2526,7 +2526,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>DJ202.rightDeck.padSection.loopExit.input</key>
<key>DJ202.rightDeck.padSection.loopButton[7].input</key>
<status>0x97</status>
<midino>0x17</midino>
<options>
Expand All @@ -2535,7 +2535,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>DJ202.rightDeck.padSection.loopToggle.input</key>
<key>DJ202.rightDeck.padSection.loopButton[8].input</key>
<status>0x97</status>
<midino>0x18</midino>
<options>
Expand Down

0 comments on commit 50c2236

Please sign in to comment.