Skip to content

Commit

Permalink
S4 Mk3: eliminate scratch drift when using engine.scratch.. functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Dec 10, 2024
1 parent 4a248d4 commit 1592e2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion res/controllers/Traktor-Kontrol-S4-MK3.js
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,8 @@ class S4Mk3Deck extends Deck {
}

const currentSpeed = (value - oldValue)/(timestamp - oldTimestamp);
if ((currentSpeed <= 0) === (speed <= 0)) {
if ((currentSpeed < 0) === (speed < 0) ||
((currentSpeed > 0) === (speed > 0))) {
speed = (speed + currentSpeed)/2;
} else {
speed = currentSpeed;
Expand Down

0 comments on commit 1592e2c

Please sign in to comment.