skins/components-js: add a control to highlight focused FX unit

Bug #1760316 reported by ronso0
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
ronso0

Bug Description

With 4 FX units in the skin and a controller with one FX section per side that uses the 2.1 FX mapping with components-js, it's impossible to tell which (collapsed) FX unit has focus. Neither skins nor controllers (I know of) provide visual feedback for this.

Let's find a way to highlight the focused unit when a respective controller is attached. I suppose a combination of skin COs and components-js could work.

Workaround I use: change the components-js' default FX mapping to allow to focus an effect when parameters are hidden on screen. This makes the effect focus buttons appear in skins also for collapsed FX units and helps to distinguish focused/unfocused units.

Tags: gui
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Let's try to outline what we already have and why this does not work.

[EffectRack1_EffectUnitN],focused_effect
0 indicates no effect is focused; >0 indicates the number of the focused effect. Focusing an effect only does something if a controller mapping changes how it behaves when an effect is focused.

[EffectRack1_EffectUnitN],show_focus
Whether to show focus buttons and draw a border around the focused effect in skins. This should not be manipulated by skins; it should only be changed by controller mappings.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I think we can already use <Transform><Not/></Transform> to build widget that indicate that the whole unit has the focus.
Does this work?

Revision history for this message
ronso0 (ronso0) wrote :

Unfortunately none of the available controls suits the need.

[EffectRack1_EffectUnitN],focused_effect can be stored for unfocused units as well, so it tells nothing about which unit has controller focus

[EffectRack1_EffectUnitN],show_focus would (per default) only be available for expanded effect units. Users can initialize effect units with 'bool allowFocusWhenParametersHidden', then this CO would be solve the issue. Downside: it also shows the focus buttons in collapsed effect units which might not be desired.
This is the hack I tried in https://github.com/mixxxdj/mixxx/pull/2012

What looks promising to me is to somehow create a CO 'currentUnit,focused' in
midi-components-0.0.js, I just didn' wrap my head around resetting focus state for the other unit(s), yet.
https://github.com/mixxxdj/mixxx/blob/master/res/controllers/midi-components-0.0.js#L648

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> [EffectRack1_EffectUnitN],focused_effect can be stored for unfocused units as well, so it tells nothing about which unit has controller focus.

This is probably a mapping issue. If you unfocus the unit the focused effect inside the unit also looses the focus. So focused_effect should be set to 0.

Revision history for this message
ronso0 (ronso0) wrote :

[EffectUnitN],focused_effect of unfoccused units is supressd in skins but it's not reset, it's even restored after restart.
So we need something else as unit focus indicator.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

This sounds like a mapping issue. If the mapping changes the focus away from the unit, we can require to set [EffectUnitN],focused_effect zero.

Do you have an example mapping we can discuss?

Revision history for this message
ronso0 (ronso0) wrote :

We should not touch [EffectUnitN],focused_effect. It's valid to store the focused effect as users might have an effect permanently focused, for example to tweak paramters of the Moog filter or the echo effect.

What do you not like about adding [FxUnit],focused?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I am afraid that this could be redundant and by chance ambiguous.

What does it mean if [EffectRack1_EffectUnitN],focused is true [EffectRack1_EffectUnitN],focused_effect is 0?

The other way round is also odd, how can a effect unit be focused if no effect is focused?

> It's valid to store the focused effect as users might have an effect permanently focused, for example to tweak paramters of the Moog filter or the echo effect.

Why is [EffectRack1_EffectUnitN],focused_effect not sufficient for this? In this case it can always point to the moog filter effect.

Or do you wish to have a second focus in the same unit? One for permanent effects and one for changeable effects?

Revision history for this message
ronso0 (ronso0) wrote :

To be clear:
the existing COs are fine for their purpose (focused effect and show focus) and I'd neither extend nor alter them.
'show_focus' for collapsed FX units is disabled by default in the MAPPINGS, and then it's only allowed when parameters are visible which is fine because it reduces mistakes during FX handling in most use cases.

On the other hand, 'focused_unit' would be a GUI helper which should work indepently from individual mappping preferences as it would be activated components-js. It could also be a life saver in case the the user switched the focused FX unit by accident. A bit like a highlight CO for controller decks 1/3 and 2/4.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Is this a use case for focus indicator without a controller?
What do you want to achieve?

ronso0 (ronso0)
tags: added: controller gui
Revision history for this message
ronso0 (ronso0) wrote :

I'm afraid somehow we're not on the same page here.
Of course, this is targeted at the controller use case only.
In #3 I explained the constraints of the currently available COs, in #9 I outlined the benefits of a new control in the GUI.

I'll do some tests with a fresh config, a default mapping and a master build soonish to make sure I didn't miss anything.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Let's try to go on the same page ..

> [EffectRack1_EffectUnitN],focused_effect can be stored for unfocused units as well, so it tells nothing about which unit has controller focus

Maybe this is a bug in the mapping. When loosing the focus, the mapping has to set it to 0 or switch show_focus off.

> [EffectRack1_EffectUnitN],show_focus would (per default) only be available for expanded effect units.

Why do You think that. If a fucused Unit is collapsed in the GUI the focus should remain.

> [EffectUnitN],focused_effect of unfoccused units is supressd in skins but it's not reset, it's even restored after restart.
So we need something else as unit focus indicator.

I think that's because the feature should be disabled when no controller is coming connected. This sounds reasonable to my.
Why is that an issue.

So it sounds like this is only a mapping issue. The mapping must use the COs the right way an than it should work.

Which mapping do you use? What happens if you change focus and collapse effects? What should happen instead?

Revision history for this message
ronso0 (ronso0) wrote :

> Let's try to go on the same page ..

Sure :) Back to square one, I just tested this with a default mapping:

Effects can (by default) only be focused if the respective unit is expanded. Logic is reversed in the actual behaviour: when the focus button on a controller is pressed the unit is automatically expanded.
IMO @be was right to implement this safety switch in https://github.com/mixxxdj/mixxx/pull/1211 so effects can not be focused by accident. There'd be immidiate on-screen feedback.
'focused_effect' is set to 0 (controller knobs = GUI meta knobs) when collapsing and re-set to [previously focused_effect] again when the units is expanded later-on.

Later in the same PR, @be implemented 'allowFocusWhenParametersHidden' (default FALSE) on my request so that users can explecitely allow units to show focused effects WITHOUT showing the parameters.
This is helpful to control 'simple' effects like filters without wasting screen space.

So IMO this is not a mappping issue.

As you can see, neither 'focused_effect' nor 'show_focus' cannot be used to highlight the focused unit in a default 4-fx-unit setup because only users who explicitely enabled 'allowFocusWhenParametersHidden' would see the highlight with collapsed units.

What I wish is a highlight CO that can be connected to both expanded AND collapsed units so that it's useful for ANY mapping, both default ('allowFocusWhenParametersHidden' FALSE) or customized ('allowFocusWhenParametersHidden' TRUE).
As far as I can tell, this would not be dangerous nor would it conflict with any existing controls.

Revision history for this message
ronso0 (ronso0) wrote :

just noticed the 'allowFocusWhenParametersHidden' switch is not documented on the wiki..

Revision history for this message
ronso0 (ronso0) wrote :
Changed in mixxx:
assignee: nobody → ronso0 (ronso0)
status: Confirmed → In Progress
Be (be.ing)
Changed in mixxx:
status: In Progress → Fix Committed
milestone: none → 2.3.0
tags: removed: controller
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9211

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.