Skip to content

Commit

Permalink
fix: account for a dewcks rate_dir for displaying rate
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Nov 15, 2024
1 parent 591c0dd commit 38762b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion res/controllers/Numark-NS6II-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ NS6II.Display = function(channelOffset) {
duration: 0,
// stored as 1% = 100
rate: 0,
rateDir: 1, // 1 or -1 (like the CO)
trackLoaded: false,
// stored as rotations per second instead of rpm.
vinylControlSpeedTypeRatio: 0,
Expand All @@ -573,6 +574,11 @@ NS6II.Display = function(channelOffset) {
});
vinylControlSpeedTypeConnection.trigger();

const rateDirConnection = engine.makeConnection(deck, "rate_dir", function(value) {
deckInfoCache.rateDir = value;
});
rateDirConnection.trigger();

this.keylockUI = new NS6II.DisplayElement({
midi: [0x90 + channelOffset, 0x0D],
outKey: "keylock",
Expand Down Expand Up @@ -604,7 +610,7 @@ NS6II.Display = function(channelOffset) {
outKey: "rate",
outValueScale: function(value) {
return NS6II.numberToSysex(
value * deckInfoCache.rate,
value * deckInfoCache.rate * deckInfoCache.rateDir,
true,
6
);
Expand Down

0 comments on commit 38762b8

Please sign in to comment.