Skip to content

Commit

Permalink
Roland DJ-202: Map FX-rack headphones cue
Browse files Browse the repository at this point in the history
  • Loading branch information
eigengrau committed Apr 10, 2018
1 parent 2c08261 commit a17ed0d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions res/controllers/Roland_DJ-202-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,23 @@ DJ202.EffectUnit = function (unitNumber) {
engine.softTakeover(eu.group, 'mix', true);
}

this.headphones = new components.Button({
group: '[EffectRack1_EffectUnit' + unitNumber + ']',
midi: [0x98, 0x04],
unshift: function() {
this.outKey = 'group_[Headphone]_enable';
this.inKey = this.outKey;
this.input = function (channel, control, value, status) {
// FIXME Trigger *after* release, to work-around the device
// disabling the LED on release. Refactor this once a customized
// ‘Button’ class is available.
if (!value) {
script.toggleControl(this.group, this.outKey);
};
};
}
});

this.knob = new components.Pot({
unshift: function () {
this.input = function (channel, control, value, status) {
Expand Down
9 changes: 9 additions & 0 deletions res/controllers/Roland_DJ-202.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>DJ202.effectUnit[1].headphones.input</key>
<status>0x98</status>
<midino>0x04</midino>
<options>
<script-binding/>
</options>
</control>
<!-- jog wheels -->
<control>
<group>[Channel1]</group>
Expand Down

0 comments on commit a17ed0d

Please sign in to comment.