Allow transformation of widget connected controls.

Bug #692925 reported by Mark Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
RJ Skerry-Ryan

Bug Description

When writing a custom skin for Mixxx in the <connection> tabs have the ability to reverse a knob or sliders value i.e. rather than gain being increased by turning the knob clockwise instead it decreases.

Tags: easy skin
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
RJ Skerry-Ryan (rryan)
summary: - Ability to reverse a knob in a skins xml file
+ Allow transformation of widget connected controls.
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

We should probably support a general transformation syntax like this:

<Connection>
  <ConfigKey>[Channel1],volume</ConfigKey>
  <Transform>
    <Invert/> <!-- unary minus operator -->
    <Add>5</Add> <!-- add 5 -->
    <Multiply>10</Multiply> <!-- multiply by 10 -->
    <Divide>20</Divide> <!-- divide by 20 -->
  </Transform>
</Connection>

This encodes the operation (-parameter + 5) * 10 / 20

This is a much more restricted expression language than it could be. For example, we could do it like this:
  <Transform>
    <Multiply>
      <Add>
        <ControlParameter/>
        <Constant>5</Constant>
      </Add>
      <Divide>
        <Multiply>
          <ControlParameter/>
          <ControlParameter/>
        </Multiply>
        <Constant>127</Constant>
      </Divide>
    </Multiply>
  </Transform>

Which encodes (parameter + 5) * (parameter^2 / 127).

But this wouldn't be trivially reversible without building a generic equation solver into Mixxx ;). We have to be able to translate from and to the transformed value space.

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

Hi RJ,

I think widget control connection is complicated enough.
For me the value skaling is a core part of Mixxx, not Skins.

The original request is asking jut to reverse the orientation of a control.

So what about this:

<KnobInverse>
<SliderComposedInverse>

Or this:

<Connection>
  <ConfigKey>[Channel1],volume</ConfigKey>
  <Invert>true</Invert>
</Connection>

Do you heave valid use case for other scalings?

Kind regards,

Daniel

tags: added: easy
tags: added: skin
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

The main use case is inversion, so yes an <Invert> would work. Not all controls are normalized from [0, 1] so it may be useful in some cases to do arbitrary functions to them. This would be purely for skin-based customizations.

Of course, if the transformation makes sense at the control level then we should e.g. create a new CO behavior that does the transformation there (so that MIDI will have the same transformation).

Even if <Invert> is the only supported option at first then I'd leave room for future expansion by putting it in a <Transform> block.

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

A <Transform> block is OK to me.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Confirmed → Fix Committed
assignee: nobody → RJ Ryan (rryan)
milestone: none → 1.12.0
RJ Skerry-Ryan (rryan)
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/5724

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.