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

No range limits for beatjump_size #11203

Closed
JoergAtGithub opened this issue Jan 15, 2023 · 4 comments
Closed

No range limits for beatjump_size #11203

JoergAtGithub opened this issue Jan 15, 2023 · 4 comments
Labels

Comments

@JoergAtGithub
Copy link
Member

Bug Description

While there is a list of allowed values for the beatloop_size, there is no limitation for the beatjumpsize in loopingcontrol.cpp.

If I set the beatjump_size from my controller I can set values, which the UI can't display, e.g. if I double 512, the cotroller display shows 1024 and the UI still 512.

I could change this, but I need to know, what is the intended behaviour:

  • A list of dedicated values from 1/32 to 512 as for beatloop_size
  • or a limitation to 3 digits (1/99 to 999)

Version

2.4

OS

Windows 11

@ronso0
Copy link
Member

ronso0 commented Jan 16, 2023

I'd say adopt the beatloop range for consistency.
The display limit is set in WBeatSpinBox

WBeatSpinBox(QWidget* parent, const ConfigKey& configKey, int decimals = 5,
double minimum = 0.03125, double maximum = 512.00);

@JoergAtGithub
Copy link
Member Author

I wonder what is the correct behaviour for SpinBox Up and Down buttons. Currently they doesn't clamp. For example, if I enter 300 and press Up in the GUI, the value remains 300:

newValue = editValue * pow(2, steps);
if (newValue < minimum() || newValue > maximum()) {
// don't clamp the value here to not fall out of a measure
newValue = editValue;
}

This is different to loop_halve/loop_double COs used by the controllers. I personally prefer the clamping behaviour of the COs, because this bring me back to normal potencies of 2 values.

@ronso0
Copy link
Member

ronso0 commented Feb 4, 2023

I agree both buttons and COs should be consistent.

I personally prefer the clamping behaviour of the COs, because this bring me back to normal potencies of 2 values.

I presume a reset is 100% safe only when the deck is stopped or no loop is set.
Otoh pressing loop_double/_halve might happen in an active loop by accident, so the meaasure argument is correct IMO.
I have beatloop_4_activate in my mapping, so that'd be my way to reset to 2^n beats, though not all mappings and skins have that control.
So do we actually need such a reset control? Reset to what? Default loop size (4 beats), or round to nearest 2^n beats?

@JoergAtGithub
Copy link
Member Author

The behavior for loop_size is now:
GUI-Widget: 300->PressDouble->300
Controller: 300->loop_double->512

The behavior for beatjump_size is now:
GUI-Widget: 300->PressDouble->300
Controller: 300->loop_double->600

I think there should be only one rule, implemented in loopingcontrol.cpp, which applies for both.
My personal favorite would be the behaviour of the loop_double CO, because I never want other values than 2^n and it's easy to apply by a rotary loop encoder. But others might use non 2^n loop and beatjump sizes. Therefore I will adapt the current GUI widget rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants