Add _toggle to controlpotmeter controls and keyboard mappings

Bug #946432 reported by Pascal Bleser on 2012-03-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pascal Bleser

Bug Description

(this is a feature, not a bug)

The following patch (against trunk, rev 2988) adds a few useful _... extensions to ControlPotMeter controls (volume, crossfader, ...).
Adds the following functions and control bindings:
* X_zero: sets the value to 0.0
* X_one: sets the value to 1.0
* X_minus_one: sets the value to -1.0
* X_toggle: sets the value to 0.0 if the value was > 0.0, and to 1.0 if the value was 0.0
* X_minus_toggle: sets the value to -1.0 if the value was > -1.0, and to 1.0 if the value was -1.0

What you can effectively use this for:
* in your custom keybindings (~/.mixxx/Custom.kbg.cfg) bind a key to e.g. "volume_toggle" in [Channel1] and to another key in [Channel2], like this:

volume_toggle F9
volume_toggle F10

* use those keys to cut off or one once of the tracks while you're playing two tracks (mixed)

It's a classic trick used by DJs ;)

Another trick I'm using this for is to switch the crossfader from left track to right track (also while playing both):

crossfader_minus_toggle F12
crossfader_zero Shift+F12

With F12 I can tilt the crossfader from left (-1.0) to right (1.0), and press Shift+F12 to put it in the middle (0.0) again.

Ideally, the "toggle" ones would remember the previous value and switch back to that, but that would introduce a few changes I wasn't comfortable doing as I don't know the codebase very well. And as long as you're using the gain to change the volume rather than the per-channel volume sliders, it works perfectly well this way.

Latest state of the patch can also be tracked here:

RJ Skerry-Ryan (rryan) wrote :

This is a perfect use-case for keyboard-script since we could add special controls like this all day -- but to help people do this today I'm for adding this in 1.11. It also fits in alongside our current _up/_up_small and _down/_down_small controls.

I like the general approach (works on all ControlPotmeters) and the patch looks good. Thanks Pascal!

Changed in mixxx:
assignee: nobody → Pascal Bleser (pascal-bleser)
status: New → Confirmed
importance: Undecided → Low
importance: Low → Wishlist
milestone: none → 1.11.0
RJ Skerry-Ryan (rryan) on 2012-03-06
Changed in mixxx:
status: Confirmed → In Progress
RJ Skerry-Ryan (rryan) wrote :

Committed to trunk. Thanks Pascal!

Could you please sign our contributor agreement:

This gives us permission to distribute your change with Mixxx.

Changed in mixxx:
status: In Progress → Fix Committed
jus (jus) wrote :

Just in case anyone is reading this and wonders (like i did :-) why some controls wont work as listed in the original post.

Some controls simply need a "_set" prefix:


RJ Skerry-Ryan (rryan) on 2013-05-09
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers