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

(DEBUG) S4 Mk3: compare scratch functions engine.scratch.. vs engine.setValue(group, "scratch2..") #14004

Draft
wants to merge 3 commits into
base: 2.5
Choose a base branch
from

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Dec 8, 2024

Helper to fix/debug #14000

This adds two mapping options:

  • current / alternative scratching to easily compare the two methods
    curr: engine.setValue(group, "scratch2..)
    alt: engine.scratchEnable()/engine.scratchTick()
  • sync scratch speed with wheel LED speed (~2x as fast as the current scratch speed)

With the alternative method scratching sounds pretty smooth at low speeds, while with the current implementation it's rather just noise (no buffer underruns, really just how wheel ticks are filtered & emitted)

Another notable difference:
with the alternative method the track is very slowly drifting backwards when doing many (40+) fast + short back & forth scratches¹.

My results:

curr: engine.setValue(group, "scratch2..):

  • noisy with low scratch speeds
  • no notable drift for one-direction scratches
  • no notable drift for fast back'n'forth scratches¹

alt: engine.scratchEnable()/engine.scratchTick():

  • smooth sound at all speeds
  • no notable drift for one-direction scratches
  • drifts backwards for fast back'n'forth scratches¹

Bottom line:

So, to get the best of both methods, could we use the alt. method for slow scratches?
I'll test that soon.

Or fix the filtering for the current method?
I have no clue how..

@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch from ea64ba4 to 9e448ff Compare December 9, 2024 00:32
@ronso0 ronso0 requested a review from acolombier December 9, 2024 10:58
@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch from 9e448ff to 1592e2c Compare December 10, 2024 13:20
@ronso0 ronso0 changed the base branch from main to 2.5 December 10, 2024 13:22
@ronso0
Copy link
Member Author

ronso0 commented Dec 10, 2024

edit: nonsense, speed is not used when calling the engine.scratch..functions.
Instead it seems it occured with a previous version of 2.5/main and now that I rebuilt the drift is gone 🤷‍♂️

However, this commit gives equal noise for slow backward and forward scratches with "scratch2.." controls 😆


I got rid of the back'n'forth scratch drift with the second commit:

if ((currentSpeed <= 0) === (speed <= 0)) {

vs.

if ((currentSpeed < 0) === (speed < 0) ||
        ((currentSpeed > 0) === (speed > 0))) {

Now scratching with the engine.scratch.. functions works great!

@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch from 1592e2c to 4a248d4 Compare December 10, 2024 13:31
Copy link
Member

@acolombier acolombier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had a chance to test yet, but I'll try to do that ASAP

res/controllers/Traktor-Kontrol-S4-MK3.js Outdated Show resolved Hide resolved
@ronso0 ronso0 changed the title S4 Mk3: compare scratch functions engine.scratch.. vs engine.setValue(group, "scratch2..") (DEBUG) S4 Mk3: compare scratch functions engine.scratch.. vs engine.setValue(group, "scratch2..") Dec 12, 2024
@ronso0 ronso0 marked this pull request as draft December 12, 2024 09:24
@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch from 4a248d4 to 5c27a35 Compare December 12, 2024 11:08
@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch from 5c27a35 to b05dfa2 Compare December 13, 2024 09:26
Copy link
Member

@acolombier acolombier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new scratching experience feels very good and precision change doesn't feel as bad as I feared. I'm happy to get those two settings as part of the core mapping. 👍

Only "regression" from my perceptive is the hotcue not "cutting" the scratch anymore.
My routine being, I would scratch over, say a voice sampler and would be able to resume playing instantly by activating a hotcue. How would you feel about restoring that behaviour via an alternative setting? (e.g Stop scratch when activating hotcue and slight refactor of L2458-2470)

Another bug is, if you set a jogwheel tension higher than 0.80, the jog will speed up and never stop! I guess you might be able to adjust the range.

Let me know if you would want me to suggest patches

@ronso0
Copy link
Member Author

ronso0 commented Dec 16, 2024

Only "regression" from my perceptive is the hotcue not "cutting" the scratch anymore.
How would you feel about restoring that behaviour via an alternative setting? (e.g Stop scratch when activating hotcue and slight refactor of L2458-2470)

Sure, I don't plan to remove features, though I'd make the cutting opt-in.

@ronso0
Copy link
Member Author

ronso0 commented Dec 16, 2024

The new scratching experience feels very good and precision change doesn't feel as bad as I feared. I'm happy to get those two settings as part of the core mapping. 👍

Great to hear!
So we'd have 2 new scratching options then, both opt-in:

  • make scratch speed match wheel LED speed
  • seeking to hotcue stops scratching

Or where you saying the engine.scratch.. functions should be optional, too?
Given that both this and scratch2 show sticker drift and engine.scratch.. sounds much smoother at low speeds I'd actually drop scratch2.
Wdyt?

@ronso0 ronso0 force-pushed the s4mk3-fix-slow-scratch branch 2 times, most recently from 005ad8a to 872328d Compare December 18, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants