Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traktor Kontrol S4 Mk3: issue with slow scratching #14000

Open
ronso0 opened this issue Dec 7, 2024 · 2 comments
Open

Traktor Kontrol S4 Mk3: issue with slow scratching #14000

ronso0 opened this issue Dec 7, 2024 · 2 comments

Comments

@ronso0
Copy link
Member

ronso0 commented Dec 7, 2024

Bug Description

I noticed that when scratching very slowly in one direction (also when trying to hold the wheel steady in order to set a hotcue), the play position makes tiny jumps forwards and backwards resulting in unexpectedly loud sound artifacts.

However, scratching sounds pretty smooth when doing similarly slow/small moves with the waveform or with my old, rather low-res wheel on the Reloop TerminalMix 2/4 (the mapping does no filtering/averaging).
Yes, there are artifacts, much louder, higher pitch than comparable moves with vinyl of course, but they are still more quiet than with the S4 mapping.

I saw the wheel also sends absolute position data which is not used for certain reasons.
Could that be used when the wheel moves slowly?

I'll compare with the mappings in 2.4 or 2.5

// The relative and absolute position inputs have the same resolution but direction
// cannot be determined reliably with the absolute position because it is easily
// possible to spin the wheel fast enough that it spins more than half a revolution
// between input reports. So there is no need to process the absolution position
// at all; the relative position is sufficient.
this.wheelRelative = new Component({
oldValue: null,
deck: this,
speed: 0,
input: function(value, timestamp) {
if (this.oldValue === null) {
// This is to avoid the issue where the first time, we diff with 0, leading to the absolute value
this.oldValue = [value, timestamp, 0];
return;
}
let [oldValue, oldTimestamp, speed] = this.oldValue;
if (timestamp < oldTimestamp) {
oldTimestamp -= wheelRelativeMax;
}
let diff = value - oldValue;
if (diff > wheelRelativeMax / 2) {
oldValue += wheelRelativeMax;
} else if (diff < -wheelRelativeMax / 2) {
oldValue -= wheelRelativeMax;
}
const currentSpeed = (value - oldValue)/(timestamp - oldTimestamp);
if ((currentSpeed <= 0) === (speed <= 0)) {
speed = (speed + currentSpeed)/2;
} else {
speed = currentSpeed;
}
this.oldValue = [value, timestamp, speed];
this.speed = wheelAbsoluteMax*speed*10;

Version

No response

OS

No response

@ronso0 ronso0 added the bug label Dec 7, 2024
@ronso0
Copy link
Member Author

ronso0 commented Dec 7, 2024

Furthermore if I rotate the wheel veeeery slowly in one direction I can move it quite a distance before anything happens.

I tried the old way in the S4 mapping an it's much smoother:

  • enable scratching:
    if (touched) {
       engine.scratchEnable(this.deck.currentDeckNumber,
         2150, // matches LED position @33 1/3
         33+1/3,
         1.0/8,
         1.0/256);
    } else {
       engine.scratchDisable(this.deck.currentDeckNumber);
    }
  • scratch: simply use diff for engine.scratchTick()
     case wheelModes.vinyl:
         if (this.deck.wheelTouch.touched || engine.getValue(this.group, "scratch2") !== 0) {
             engine.scratchTick(this.deck.currentDeckNumber, diff);
         } else {
             engine.setValue(this.group, "jog", this.speed);
         }
         break;

This is my temporary fix until someone more familiar with this will take a look 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant