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

improve/clone PositionScratchController for use with controller mappings #14070

Open
ronso0 opened this issue Dec 28, 2024 · 0 comments
Open

Comments

@ronso0
Copy link
Member

ronso0 commented Dec 28, 2024

Feature Description

The benefit over engine.scratchTick() and scratch2:

  • no drift
  • built-in inertia mode (backspins, throws)
  • slow scratching with PositionScratchController can sound much smoother

(When comparing these methods make sure to use high-res tracks so that track artifacts are not mistaken for scratch artifacts!)

Actually it does already work quite nicely with the existing controls scratch_position_enable and scratch_position.
The latter requires an absolute position (like those sent by the S3/S4 Mk3 wheels) with factor X to achieve the desired scratch speed, though that can be emulated with relative psoitions, too: the mapping can accumulate ticks on wheel touch and send its internal 'absolute' position.
See #14004

IIUC the main difference (reason for drift) is that engine.scratchTick() and scratch2 compute ticks/scratch rate in between engine process calls, so the engine inevitably misses 'position' updates. Maybe engine.scratchTick() can also be optimized but I found it much easier to work with the existing PositionScratchController implementation.
And scratch2 / engine.scratchTick() (using scratch2) can apparently easily overshoot when scratching slowly.


PositionScratchController is built for mouse scratching, so for optimum controller performance it would be nice to have controls/parameters to adjust the sample period and probably other parameters.
For a starter I suggest to clone PositionScratchController --> WheelScratchCotroller so its settings don't affect the waveforms scratching.

What do you think?

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