-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add a beats_translate_move? Like beats_translate_earlier and beats_translate_later, but can be used with a single CC SelectKnob style bind #12337
Comments
I think this is quite a specific case. Maybe this would better be mapped in JS? |
Having to write a script to bridge between the way universal aspects of how a MIDI controller can work and the functions Mixxx allows MIDI controllers to affect seems detrimental as it adds a needless hurdle of complexity to the average user. I mean, moving the grid left and right with a rotary encoder? That's imho really not that far out! |
Finally "source code wins". Since we already have a bunch of beats_translate_.... controls on more does not make a big difference. I would not object, if one contributes such a solution. |
Would it be something like this? |
Yes, mxmilkiib@d4f5e90 would work. |
Do we have a control type for it? It looks a bit hack to have the midi key value in our engine code. |
I think it is "ControlEncoder" |
Even though mixxx/src/control/controlbehavior.h Lines 32 to 34 in 91c1869
mixxx/src/control/controlbehavior.cpp Lines 34 to 40 in 91c1869
|
So move the code from slotTranslateBeatsEarlier and slotTranslateBeatsLater into slotTranslateBeatsMove and have an if based on the value there, and change https://github.com/mxmilkiib/mixxx/blob/beats_translate_move/src/engine/controls/bpmcontrol.cpp#L83 to point to slotTranslateBeatsMove (changing false to this)? And also change the control type of ControlPushButton to ControlEncoder on not just 90 but 80 and 85 also? Or leave 80 and 85, given it can still be bound to a button? And change 83 and 88 to just point to slotTranslateBeatsMove? |
yes. Both COs are connected to their respective slot, both slots call
No.
This indicates you didn't build the sketch you posted ;) since |
Yeah, I just edted it in the Github editor. Now I've setup VSCodium, haven't had the time to get my Neovim setup as unannoying as my Vim setup yet.. I changed it to;
but then I get;
I'm not a programmer, I get emotionally (and physically) dysregulated when I can't get something to work, a symptom of some with ADHD+ASD (along with PoTS). I've done one C++ bit of work before, that was a copy and paste pattern matching hack PR on Carla to create a MIDI switch internal plugin, and it took a lot of handholding from falkTX. I get the gist of the build error saying that later use of the variable is not good because it possibly would not be defined for that "lower"(?) scope (actually, no, I don't understand it, because it's either 63 or below or 64 and above), but moving the later uses inside of each side of the if just reproduces the duplicated code scenario, no? |
Alright, no worries, I can take over. I hoped that with a little guidance you get hooked and would become a regular : ) Re the compiler error: Anyway, I can take over if you like. Also, we don't use the MIDI values as in controller scripts (btw |
Maybe I can manage. I've been suffering from fatigue the last 48 hours, sleeping lots and finding it hard to keep my eyes open. My genetic constitution and its expressions can be quite frustratin! Thanks for the feedback. So I've moved the logic and sorted definitions, etc. But after building and binding to an encoder, it only goes one way and not the other. It was going the wrong way too, so I flipped the 0.01 and -0.01. Now it's not going either way! Time to rest. Also, I get this warning on build;
|
Okay, great. I suggest you open a (draft) PR against the mixxx repo so we can discuss the code changes much easier (inline comments etc.) |
I also suggest to set up some IDE. This simplifies looking up definitions, code paths etc. mixxx/src/control/controlencoder.h Line 9 in 2c2e706
This indicates the second argument (if present) must be a bool (defaults to true if absent). |
I setup VSCodium with various plugins, but my problem is that, when I run the Arch N ah yes, the argument type was mentioned previously. |
I don't think you need to install, you can run the build directly from the build directory. Or is this different on Arch? I'm not familiar with it.
A directory? If yes, you can add stuff like that to your private .gitignore file (not the one in the mixxx source directory) |
I just prefer to have the debug version as the one that's in $PATH, cos I'm never going to find bugs if I don't dogfood use the bleeding edge, so to do that I create a package using the Maybe I should indeed just not install and run separately, just the autistic part of me doesn't like change if it can be helped. |
Fixed by #12376 |
Feature Description
My Akai MPD218 rotary encoders give out "ctrl 0x0E, val 0x01" when turned clockwise and "ctrl 0x0E, val 0x7F" when turned anti-clockwise.
Having looked at the code, this is two's complement, and is that the SelectKnob option is for, AFAIU.
But to move the beatgrid, there is only beats_translate_earlier and beats_translate_later, and it is required that these are bound to two separate/different CCs, so only one direction of movement can assigned to a rotary encoder as it stands.
If there were a generic beats_translate_move that could act upon a SelectKnob style input, that would be very handy.
(This relates to #7557 in that the two's complement SelectKnob system is using different values of the same CC, so this is arguably somewhat a subset of that issue)
The text was updated successfully, but these errors were encountered: