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

(fix) Waveform scratching: fix seeking to hotcue while scratching is enabled #14059

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

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Dec 25, 2024

This is a first (still dirty) fix for #13981
TL;DR
No need to rush this into 2.6

Recently I compared the available methods for scratching with controllers, and while PositionScratchController (developed for waveform scratching) turned out to be the best (for me, no drift, smooth at low rates, nice spinback) I can't really use it as I want to due to #13981

This fixes the crazy seeking and allows seeking to a hotcue when the wheel is stopped or turned slowly.
It's good enough quickfix for me, and I can use PositionScratchController in my mapping for new year's eve.

Though this is just a first step to understand what's happeing with EngineBuffer, ReadAheadManager, RateControl and PositionScratchController. A real fix needs to be more robust, probably requiring some tweaks in EngineBuffer and other involved units.

m_pRateControl->notifySeek(seekPosition);
}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Until now this was a no-op in RateControl and with the fix it's causing trouble so I removed it.

@ronso0 ronso0 force-pushed the waveform-scratching-seek-fix branch 2 times, most recently from 2ab9774 to 99d15da Compare December 30, 2024 01:50
@ronso0 ronso0 force-pushed the waveform-scratching-seek-fix branch from 99d15da to e98e7ed Compare December 30, 2024 02:36
…ntrolProxy etc.

Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
@ronso0 ronso0 force-pushed the waveform-scratching-seek-fix branch 2 times, most recently from 8d76989 to 2a4d536 Compare December 31, 2024 14:57
…o hotcue

adopt the seek position explicitly in order to avoid crazy seek speeds
@ronso0 ronso0 force-pushed the waveform-scratching-seek-fix branch from 2a4d536 to dff5e6a Compare December 31, 2024 15:28
@ronso0
Copy link
Member Author

ronso0 commented Jan 4, 2025

Still not working as desired. I'm a bit lost here since I don't fully understand how the filters work here:
Either seeking works mostly and loop-scratching works mostly, or seeking works perfectly and loop-scratching is broken sometimes (now I'm using the latter for my mapping since seeking is more importat to me).
Note that I've been testing this lately with a controller implementation, ie. scratch_position is set with my jog wheel position. (which works flawlessly btw)

So, I really don't get how to fix both as I'm not 100% sure loop-scratching works 100% in main.
Maybe the sampling intervals are not workign well for controller mapping which sends updates much faster that the audio engine @5ms latency, so maybe we can ditch the interval stuff and simply process at ever call from RateControl.
That said, it might make sense to sub-class / clone PositionScratchController for controller use.

Any help is appreciated!

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.

1 participant