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

Create option for control objects to be issued repeatedly if a keyboard key is held. #11572

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented May 20, 2023

Fixes #11569

Applies to:

  • beats_adjust_faster, beats_adjust_slower
  • beats_translate_earlier, beats_translate_later
  • beat_next, beat_prev
  • beatjump_size_halve, beatjump_size_double
  • beatjump_forward, beatjump_backward
  • loop_halve, loop_double
  • beatjump_X_foward, beatjump_X_backward
  • rate_perm_down, rate_perm_down_small, rate_perm_up, rate_perm_up_small

@ywwg ywwg requested a review from daschuer May 20, 2023 17:13
ywwg and others added 2 commits May 20, 2023 15:46
…rd key is held.

Fixes mixxxdj#11569

Applies to:
* beats_adjust_faster, beats_adjust_slower
* beats_translate_earlier, beats_translate_later
* beat_next, beat_prev
* beatjump_size_halve, beatjump_size_double
* beatjump_forward, beatjump_backward
* loop_halve, loop_double
* beatjump_X_foward, beatjump_X_backward
* rate_perm_down, rate_perm_down_small, rate_perm_up, rate_perm_up_small
use std::any_of instead of old foreach

Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
@ronso0
Copy link
Member

ronso0 commented May 20, 2023

Shouldn't this apply to all potmeter _up, _down, _up_small & _down_small controls?

@ronso0 ronso0 added keyboard control objects Issues and bugs specifically in regard to mixxx `ControlObjects` labels May 20, 2023
@ywwg
Copy link
Member Author

ywwg commented May 21, 2023

yup I can do that

@daschuer
Copy link
Member

The code looks good for me and I can confirm the issue.

I just wonder if this is a good approach, because until now, the keyboard keys are treated very similar as the controller keys and as GUI buttons. A press event becomes a NoteOn and the release events a NoteOff. The keyboard repetition has been intentionally disabled to keep that model working.

After merge, a keyboard button has a special exclusive behavior. I think form this point of view a repetition logic inside the CO, that works independent from the source of the control event is the preferred solution. The user does probably not understand that we rely on the OS's repetition settings, that is only available for keyboards

A case where these settings are miss-configured for Mixxx might be another setting.

Do you have interest to make this feature also work for controller and GUI buttons?

src/control/control.h Outdated Show resolved Hide resolved
@ywwg
Copy link
Member Author

ywwg commented May 22, 2023

Do you have interest to make this feature also work for controller and GUI buttons?

I see what you mean -- if perhaps someone has linked the beatjump parameter to a button on a controller, they might want this behavior. But I would prefer to write features in response to concrete need rather than hypothetical situations or abstract logical notions of consistency. In my experience I have never wanted this repeat behavior on a controller nor have I seen a feature request for it -- beatjump is usually bound to a clicking knob that is easy to spin. I would want to see a concrete example where this might be a useful feature before coding it.

Whereas, when I am gridding and preparing my library with just my keyboard, or doing keyboard-only mixing, I definitely have wanted this keyboard repeat behavior, so I wanted to write this.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you.

@ronso0
Copy link
Member

ronso0 commented Dec 29, 2023

Umm, why did this go to main?
It's nice usability improvement. Will check if this can be backported without hazzle.

daschuer added a commit that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control objects Issues and bugs specifically in regard to mixxx `ControlObjects` keyboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard repeat option for certain ControlObjects
4 participants