Add _toggle to controlpotmeter controls and keyboard mappings

Bug #946432 reported by Pascal Bleser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
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:

...
[Channel1]
...
volume_toggle F9
...
[Channel2]
...
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):

...
[Master]
...
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:
https://pmbs.links2linux.org/package/view_file?file=mixxx-add_toggleValue.patch&package=mixxx-unstable&project=Multimedia

Revision history for this message
Pascal Bleser (pascal-bleser) wrote :
Revision history for this message
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)
Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Committed to trunk. Thanks Pascal!

Could you please sign our contributor agreement: https://docs.google.com/a/mixxx.org/spreadsheet/viewform?formkey=dEpYN2NkVEFnWWQzbkFfM0ZYYUZ5X2c6MQ#gid=0

This gives us permission to distribute your change with Mixxx.

Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
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:
_set_one
_set_minus_one
_set_zero
_toggle
_minus_toggle

See http://bazaar.launchpad.net/~mixxxdevelopers/mixxx/trunk/revision/2993

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/6292

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.