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

do not clamp out-of-bounds ControlPotmeter parameters when they are allowed #1237

Merged
merged 1 commit into from
Apr 17, 2017

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Apr 11, 2017

Getting the normalized value should reflect the actual value of the ControlPotmeter if out-of-bounds values are allowed, as discovered in #1227.

This has a weird side effect with WSliderComposed:
slider-out-of-bounds
If this is not desired, I could make WSliderComposed and WKnobComposed clamp parameters.

getting the normalized value should reflect the actual value of the
ControlPotmeter if out-of-bounds values are allowed
@Be-ing
Copy link
Contributor Author

Be-ing commented Apr 11, 2017

Sliders with out of bounds values can still be operated by mouse by clicking on the slider, which makes the value jump in bounds. While it is weird to have the handle disappear, it may be helpful to have this clear visual indication that the value is out of bounds. Thoughts?

@daschuer
Copy link
Member

It works for me. I think it its finally up to the widget/skin to deal with this situation. Without this patch they they can't. LGTM.
Other thoughts?

@Be-ing
Copy link
Contributor Author

Be-ing commented Apr 13, 2017

I think it's okay to go ahead and merge this. If people do not like slider handles disappearing I do not think it will be difficult to later implement clamping the parameter for display purposes in the widget.

@daschuer
Copy link
Member

Thank you!

@daschuer daschuer merged commit 244eaeb into mixxxdj:master Apr 17, 2017
@Be-ing Be-ing deleted the getparameter_out_of_bounds_fix branch May 11, 2017 07:52
@ronso0
Copy link
Member

ronso0 commented Jun 6, 2017

If this is not desired, I could make WSliderComposed and WKnobComposed clamp parameters.

Yes, please!
Just filed a Bug before I found this PR

@ronso0
Copy link
Member

ronso0 commented Jun 28, 2017

@Be-ing Please clamp parameters for sliders!
As I mentioned in on of the Tango PRs, I introduced mixxx to a few guys coming from Traktor who use controllers and only rarely mouse. They sometimes tempo-sync to out-of-range values and tempo slider disappears (screen) and then even lose control over tempo (hardware sliders) and have to reach for the mouse.
Besides that they were really impressed by alpha-pre I installed for them, so it would be a pity to disappoint them with such an important detail. Before this PR hardware tempo control was rock solid.

@Be-ing
Copy link
Contributor Author

Be-ing commented Jun 28, 2017

lose control over tempo (hardware sliders) and have to reach for the mouse... Before this PR hardware tempo control was rock solid.

How do you expect this to work? Previously, when sync caused the tempo to go outside its normal range, if the controller mapping used soft takeover, the hardware slider could be moved to the appropriate limit of its range, but then moving it from there would cause a big tempo jump to the edge of the slider's normal range. I don't think I'd call that rock solid.

It seems to me (and I may be wrong) that the best way to handle this is to make tempo sliders work as relative controls like they can in Traktor with a preference option or like they do in Serato. To implement this in JavaScript as I did in #1227 requires engine.getParameter to return the actual position of the slider even if it is out of its normal boundaries. Perhaps this shouldn't be handled by controller mappings and should be handled by Mixxx?

Personally my controller uses infinitely turning encoders for tempo so this does not become an issue for me.

@ronso0
Copy link
Member

ronso0 commented Jun 29, 2017

Basically I'm accepting the offer you made in the first post -_o
Calling the previous behaviour 'rock solid' maybe over the top but just means the ability to somehow keep control over tempo slider with a default mapping, even if it was out of rate range, even if it jumps.
It was working before, now it's broken.

It seems to me (and I may be wrong) that the best way to handle this is to make tempo sliders work as relative controls like they can in Traktor with a preference option or like they do in Serato.

Sure, sounds great! But I guess(!) it takes longer to implement, and I'm afraid users get disappointed by 'broken features' from 2.0 in the mean time.
Like me for example, except I know the reason and can work around that with a script function...they could quit and go back to Virtual DJ or Traktor because something basic like this isn't working in Mixxx.

Regarding #1227 I agree with @daschuer 's concerns. What you implemented in maybe handy but is far from self-explaining (physical control doesn't match its representation on screen), if then Shift is involved as well it's beyond of what a beginner DJ can/wants to handle, I guess.

@daschuer
Copy link
Member

daschuer commented Jun 29, 2017

This PR is unfortunately only the half way to a solution. The other half was somehow fallen into oblivion.
We need to improve the slider widget. I do not like the Idea to have a relative mode for sliders. That just adds another degree of freedom which is also confusing.

Do we have a bug for this? It looks like it is high prio.

@ronso0 , do you have fun and time to look into it?

We need to stop the handle from disappearing as a first step.
I think this can be done here:
https://github.com/mixxxdj/mixxx/blob/master/src/widget/wslidercomposed.cpp#L152

Extra feature:
We may also change the button in out of bounds situations to a "^" or something.
My idea is to add here
https://github.com/mixxxdj/mixxx/blob/master/src/widget/wslidercomposed.cpp#L61
"HandleAbove" and "HandleBelow"
Saving the handle pixmaps as member variables

Another Extra feature:
If you now move the slider down, to centre we may think of a smart way to interpolate towards the out of bounds position to not suffer a jump

@Be-ing
Copy link
Contributor Author

Be-ing commented Jun 29, 2017

keep control over tempo slider with a default mapping, even if it was out of rate range, even if it jumps.

This is incompatible with the requirement for engine.getParameter returning the actual value for implementing relative control in JavaScript. Changing the skin widget would not change the issue with controllers' tempo sliders losing control. Perhaps the implementation of a relative mode could be done in C++. The existing "rate" Control could become like a facade that implements either the relative mode or soft takeover logic toggled by a preference option. The engine and other parts of Mixxx would be switched to use a true or internal rate that controllers would not interact with.

But this is a considerably more complicated solution. I personally don't feel a pressing need to implement it at the moment, so unless anyone else wants to take that up now, it would probably be best to revert 9ee2d1c, remove the relative mode for Pots from midi-components-0.0.js, and leave it as a wishlist item.

I do not like the Idea to have a relative mode for sliders. That just adds another degree of freedom which is also confusing.

It seems to work well for Traktor and Serato. It is an alternative to dealing with the confusion of soft takeover. IMO the problem is really in the pervasive use of finite range potentiometers for controlling tempo on controllers. It does not make much sense to me to have both a finite range tempo control and a sync button as inevitably that creates this confusing situation that has no perfect solution. But alas I cannot simply change the design of most controllers. There are only a few controllers that have infinite range encoders for tempo (Hercules P32, A&H Xone K2, Kontrol S5, and Kontrol S8 are all that come to mind).

@ronso0
Copy link
Member

ronso0 commented Jun 29, 2017

Do we have a bug for this? It looks like it is high prio.

https://bugs.launchpad.net/mixxx/+bug/1696265

I'm afraid I don't have much time in the next month, and I still don't have a proper IDE, sorry.
I like what @Be-ing suggests, revert 9ee2d1c to restore the basic but buggy (rate jump) behaviour and discuss a smart & intuitive solution for that out-of-bounds situation.

The situation:
Deck1 is at 80 BPM
Deck2 is at 100 BPM.
Rate range is set to 8%

Sync deck2 to 80 BPM, now rate2 is below lower end of rate range, -20%
Rate slider should be at lower end, indicating that is out of its actual range (highlight="1"?)

We may also change the button in out of bounds situations to a "^" or something

@daschuer It's what you're referring to?

Regarding relative mode:
Making out-of-bounds control completely relative wouldn't be intuive. I think this is mainly because center on screen wouldn't match hardware center position.
As an alternative for the described situation (rate is below actual range limits), imagine that the physical slider handle can pick up rate at lower limit. From there to center position it would temporarily calculate and adopt a new rate range. This way, rate can be changed to normal rate without a jump but can also be set to sync'ed out-of-bounds rate again: rate range -20%-0 and 0-8%
This would allow reliable and intuitive control over tempo with traditional sliders
The temporary rate range should be reset when a new track is loaded.

If you now move the slider down, to centre we may think of a smart way to interpolate towards the out of bounds position to not suffer a jump

@daschuer That's what you mean?

@daschuer
Copy link
Member

daschuer commented Jun 29, 2017

@daschuer It's what you're referring to?

Yes

@daschuer
Copy link
Member

The first step just not hiding the slider seams to be a one liner.
If this fixes the biggest issue as well, I like that solution more.
Does it?

@Be-ing
Copy link
Contributor Author

Be-ing commented Jun 29, 2017

No, changing the skin widget would not fix the issue of controllers' tempo sliders losing control when the value goes out of bounds.

Be-ing added a commit to Be-ing/mixxx that referenced this pull request Jun 29, 2017
…lowed"

This reverts commit 9ee2d1c, which
made it so controllers not mapped using the new relative mode Pot
in Components lost control of the tempo fader when sync made it
go out of bounds, as reported here:
mixxxdj#1237 (comment)
Be-ing added a commit to Be-ing/mixxx that referenced this pull request Jun 29, 2017
implementing this in JavaScript required making a change in C++
that broke old controller mappings as discussed on GitHub:
mixxxdj#1237 (comment)
@daschuer
Copy link
Member

Ah Ok, I understand. This means we need to fix softtakover for to not loose control if the parameter cannot reached. Right?

@Be-ing
Copy link
Contributor Author

Be-ing commented Jun 29, 2017

Ah Ok, I understand. This means we need to fix softtakover for to not loose control if the parameter cannot reached. Right?

That could work, but I'm not sure it would be the best solution. I'm not sure what the best solution would be...

Be-ing added a commit to Be-ing/mixxx that referenced this pull request Jul 4, 2017
implementing this in JavaScript required making a change in C++
that broke old controller mappings as discussed on GitHub:
mixxxdj#1237 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants