Skip to content

Commit

Permalink
Roland DJ-202: Set correct 14-bit crossfader max
Browse files Browse the repository at this point in the history
The DJ-202 (default crossfader curve hardware settings) sends a value
of (0x7f<<7) + 0x70 when maxed to the right. We now use this max. so that left
deck output is properly cut off.
  • Loading branch information
eigengrau committed May 19, 2019
1 parent 50c2236 commit 4b3cd51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions res/controllers/Roland_DJ-202-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ DJ202.crossfader = new components.Pot({
midi: [0xBF, 0x08],
group: '[Master]',
inKey: 'crossfader',
input: function () {
// We need a weird max. for the crossfader to make it cut cleanly.
// However, components.js resets max. to 0x3fff when the first value is
// received. Hence, we need to set max. here instead of within the
// constructor.
this.max = (0x7f<<7) + 0x70;
components.Pot.prototype.input.apply(this, arguments);
}
});

DJ202.Deck = function (deckNumbers, offset) {
Expand Down

0 comments on commit 4b3cd51

Please sign in to comment.