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

controllers: add helper to control "waveform_zoom" with potmeters #12373

Closed
wants to merge 3 commits into from

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Nov 29, 2023

This came up in the forums https://mixxx.discourse.group/t/waveform-zoom-midi-control-on-a-cc-dial/28293

  • first comit is just a cleanup after I failed to find "behaviour"
  • second commit is the script helper: default is a continuous range, set 'round' to true to get discrete integer steps
  • third commit fixes some mappings using the waveform_zoom with the ancient range 0..6

TODO

@mxmilkiib
Copy link
Contributor

mxmilkiib commented Dec 1, 2023

Very nice, thank you, but, ultimately, why not push it down to the C++ level? That way it could be bound to a control via the GUI/wizard.

Maybe I'm wrong, but I'm starting to get the feeling there's a "standard library" of these kinds of level of neat functionality that aren't bindable via the UI? Which as I wordly put on #12337, is an abstraction that's beyond the scope of most users.

@daschuer
Copy link
Member

daschuer commented Dec 1, 2023

Yes, can't we make it a ControlPotmeter?

@ronso0
Copy link
Member Author

ronso0 commented Dec 1, 2023

I've tried that, or rather I tried to make a helper pot.

The issue with waveform_zoom is that the user can set the default value at runtime via the waveform preferences, hence we can of course create a ControlPotmeter (and set a step size of 1 so the GUI zoom buttons still work as before) but as soon as the default is changed the _set_default CO would not be working as expected anymore.
I also looked into creating a ControlPotmeterSimple that does not create all sub-controls (only _up/_down) and keep the _set_default pushbutton separate, but that that was too much just for one control.

We could also connect the preferences combobox to a separate ControlObject waveform_zoom_set_default_value which then triggers a slot in BaseTrackPlayer to zoomCO->setDefault(newDefaultvalue). I didn't check if that is even possible after the control is created and that also felt like a bit too much work.
I can check that again though.

One thing to note: if you want individual zoom levels per deck (to look ahead or tweak cues on a deck while having the overview on another) the current stepped behaviour is good since it is very easy to manually re-sync the zoom levels of multiple decks. With a continuous range that's almost impossible.

@ronso0
Copy link
Member Author

ronso0 commented Dec 3, 2023

We could also connect the preferences combobox to a separate ControlObject waveform_zoom_set_default_value which then triggers a slot in BaseTrackPlayer to zoomCO->setDefault(newDefaultvalue). I didn't check if that is even possible after the control is created and that also felt like a bit too much work.

Okay, that was easier than expected.

Replaced by #12387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants