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

Denon MC7000: Add optional jog wheel acceleration to the controller mapping #4684

Merged
merged 8 commits into from
Aug 19, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Feb 24, 2022

Based on #4757

While toying around with the jog wheels on the MC7000, I have noticed that Serato performs a form of accelerated scrubbing when scratching in vinyl mode, i.e. the jog sensitivity increases the faster you turn the wheel. Acceleration can be useful to both precisely navigate the track and scrub quickly without having to press shift.

This PR adds a simple, configurable and entirely optional acceleration whose curve is a simple monomial function. In pseudocode:

accelerationFactor = pow(baseSpeed, accelerationExponent) * accelerationCoefficient
scratchSpeed = baseSpeed * accelerationFactor

When acceleration is disabled (which it is by default, or the exponent is 0 and the coefficient 1), we get the current behavior:

scratchSpeed = baseSpeed

Thoughts?

@fwcd
Copy link
Member Author

fwcd commented Feb 24, 2022

cc @toszlanyi

@toszlanyi
Copy link
Contributor

@fwcd Thanks a lot for your improvement, this looks interesting. Unfortunately I cannot test it myself as i don't have the MC7000 to hand. To get rid of the code style issues you may check the wiki page here

@fwcd fwcd marked this pull request as ready for review March 21, 2022 00:33
@fwcd
Copy link
Member Author

fwcd commented May 12, 2022

Many of these code style issues are unrelated to this patch, therefore I've created a separate PR #4754 to tackle those. Once merged, I would rebase this branch.

@Swiftb0y
Copy link
Member

Hey there @fwcd, thank you for your addition. I'm sorry that I forgot about this PR. In regards to the codestyle issues: I'd suggest you rebase your bug fixes and feature additions (this PR and #4755) onto the 2.3 branch, wait until those two are merged into 2.3 (and main) and then rebase #4754 ontop of that new state of main. This way, the bug fixes and feature additions get merged into the next 2.3.x release, while the changes related to the newer javascript environment stay in 2.4. What do you think?

@fwcd fwcd force-pushed the mc7000-jog-acceleration branch from 2135068 to 73eb693 Compare May 12, 2022 16:30
@fwcd fwcd changed the base branch from main to 2.3 May 12, 2022 16:31
@fwcd fwcd force-pushed the mc7000-jog-acceleration branch 2 times, most recently from 6d76a45 to 7cde66c Compare May 12, 2022 16:58
@fwcd
Copy link
Member Author

fwcd commented May 12, 2022

That sounds like a good plan. I have updated both this and #4755 to be based on 2.3. Since there was still a linting issue, I didn't base them directly on 2.3, but on #4757 (which in turn is based on 2.3), to separate the concerns there. To summarize, the branching now looks as follows:

                                           +--- #4755 (inverted shift bug)
                                          /
2.3 <--- #4757 (2.3 code style issues) <-+
                                          \
                                           +--- #4686 (jog wheel acceleration, i.e. this PR)

I'll keep #4754 based on main and will update it once the 2.3 PRs are merged.

@Swiftb0y
Copy link
Member

I have noticed that Serato performs a form of accelerated scrubbing when scratching in vinyl mode, i.e. the jog sensitivity increases the faster you turn the wheel.

Can you elaborate a bit (linking to an explanation would also be fine). If interpret this correctly, this seems to alter the scratch behavior significantly (ontop of mixxx's own scratch emulation). Is this behavior desired from DJs?

@fwcd fwcd force-pushed the mc7000-jog-acceleration branch from 7cde66c to 00175fe Compare May 16, 2022 01:37
@ronso0
Copy link
Member

ronso0 commented May 16, 2022

I have noticed that Serato performs a form of accelerated scrubbing when scratching in vinyl mode

This would lead to so-called "sticker drift", right? Like, scratching forward fast und slowly moving the same distance back would not bring you to the scratch starting point in the track.

@fwcd
Copy link
Member Author

fwcd commented May 16, 2022

Yes, it does lead to 'sticker drift' as you've described it (this would be unavoidable with any kind of acceleration), making it unsuitable for certain kinds of scratching, therefore I would definitely leave it disabled by default.

The primary value in such a feature, as I see it, would be a very convenient way to seek through a track, both on a fine-grained and a larger scale. Whether implementing it on top of Mixxx's own scratch emulation is a good idea or not is something I have pondered over too, though. Since this wouldn't be a feature specific to the MC7000, perhaps it would be better to include it in Mixxx directly?

@Swiftb0y
Copy link
Member

Can you link me to a manual or a video where this acceleration behavior is described / demonstrated? I don't know how popular this feature is. Many controllers already feature a "touch strip" for seeking within a track (even the MC7000 has this).

@daschuer
Copy link
Member

Maybe we can start the acceleration only after a full round of the jog wheel. Normally scratch samples are only ~ 1/2 rotation = 1 s and searching for a beat when cuing a track is also only a meter of a 1/2 rotation. This probably gives enough distance to distinguished between scratching and seeking.

@fwcd
Copy link
Member Author

fwcd commented May 16, 2022

Hm, I am having a hard time finding a video that explicitly demonstrates this feature. https://youtu.be/72hSiPS3yfQ?t=379 shows it very briefly, but I'll see if I can find anything specifically on this. Traktor seems to have a setting named "Rotary acceleration" that lets users map arbitrary MIDI controls with acceleration.

@Swiftb0y
Copy link
Member

Mhmm, the video you sent is a standalone controller though. Its not even related to Serato. Do they not mention this feature anywhere in their manual?

@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Aug 15, 2022
@JoergAtGithub
Copy link
Member

Mhmm, the video you sent is a standalone controller though. Its not even related to Serato. Do they not mention this feature anywhere in their manual?

The Numark NV II is a Serato controller with two embedded displays, not a standalone unit.

@github-actions github-actions bot removed the stale Stale issues that haven't been updated for a long time. label Aug 28, 2023
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Dec 14, 2023
@JoergAtGithub JoergAtGithub added needs review and removed stale Stale issues that haven't been updated for a long time. labels Dec 18, 2023
@JoergAtGithub
Copy link
Member

What's the state of this PR? At least you need to retarget it to 2.4.

@fwcd fwcd changed the base branch from 2.3 to 2.4 April 20, 2024 00:59
@JoergAtGithub
Copy link
Member

Controller settings are ony available in main, not in 2.4. I suggest a follow up PR for main.

@fwcd
Copy link
Member Author

fwcd commented Aug 16, 2024

I'll probably just retarget this to main, since I don't think this will be very useful without controller settings (digging into the JS is likely too inconvenient for most users). Since this is not a large change, I don't expect this to be a big risk for merge conflicts.

@JoergAtGithub
Copy link
Member

Retargeting to 2.5 is enough. My comment about Main was from before we branched 2.5.

@fwcd
Copy link
Member Author

fwcd commented Aug 16, 2024

Fair enough, thanks for noticing that.

@fwcd fwcd changed the base branch from 2.4 to 2.5 August 16, 2024 23:49
@fwcd
Copy link
Member Author

fwcd commented Aug 17, 2024

The jogwheel options are now fully user-configurable:

image

Comment on lines +94 to +99
// Sensitivity factor of the jog wheel (also depends on audio latency)
// 0.5 for half, 2 for double sensitivity - Recommendation:
// set to 0.5 with audio buffer set to 50ms
// set to 1 with audio buffer set to 25ms
// set to 3 with audio buffer set to 5ms
sensitivity: engine.getSetting("jogSensitivity") || 1,
Copy link
Member

Choose a reason for hiding this comment

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

I guess for the jog the input-latency matters. Because for the output-latency we have an undocumented CO: engine.getValue("[App]", "output_latency_ms").

@JoergAtGithub
Copy link
Member

LGTM! Could you please open a manual PR, to describe the new settings, curently we have only: https://manual.mixxx.org/2.5/en/hardware/controllers/denon_mc7000#user-variables

@JoergAtGithub JoergAtGithub added this to the 2.5.0 milestone Aug 18, 2024
@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Could you please open a manual PR, to describe the new settings

Done:

@ronso0 ronso0 changed the title MC7000: Add optional jog wheel acceleration to the controller mapping Denon MC7000: Add optional jog wheel acceleration to the controller mapping Aug 18, 2024
@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Can this be merged? I'm planning on adding more options to the mapping, but to avoid conflicts, I'd base them on this PR.

fwcd added a commit to fwcd/mixxx that referenced this pull request Aug 19, 2024
@JoergAtGithub
Copy link
Member

Thank you!

@JoergAtGithub JoergAtGithub merged commit 6323a69 into mixxxdj:2.5 Aug 19, 2024
13 checks passed
@fwcd fwcd deleted the mc7000-jog-acceleration branch August 19, 2024 11:29
fwcd added a commit to fwcd/mixxx that referenced this pull request Aug 22, 2024
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.

6 participants