-
-
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
Kontrol S4 Mk3: add controller mapping #11284
Kontrol S4 Mk3: add controller mapping #11284
Conversation
c05e987
to
8d84015
Compare
Thanks for continuing @Be-ing's work! I appreciate the detailed documentation you added here, including a short description of your motivation. I am happy to give your mapping a test run soon. Due to my inability to use JavaScript effectively I already lost hope to ever use the controller in Mixxx for its purpose. Until now it was just a costly piece of hardware for some USB HID experiments in Rust ;) |
The PR should probably be rebased on and target the |
Thanks for picking this up. A few initial impressions:
|
/// By using this mapping, you confirm that you are not Bob Ham, you are in no | ||
/// way affiliated to Bob Ham, you are not downloading this code on behalf of | ||
/// Bob Ham or an associate of Bob Ham. To the best of your knowledge, information | ||
/// and belief this mapping will not make its way into the hands of Bob Ham. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a joke. You can go ahead and remove this paragraph 😆
The handling of the GRID button is problematic. Shifting the beatgrid when releasing the button makes it difficult to align with the rhythm. I understand that's required to do something different while holding the button down, but nothing seems to happen when holding the button down or holding with shift. I suggest removing the alternative behavior when holding it down and only have an alternative behavior when holding with shift to allow the plain press to take effect on button down. |
Hmmm interesting... Would you mind giving me some details on how I can reproduce it? I did use the motor a few hours ago during a quick set and didn't have any issues, could it be related to different Mixxx version perhaps?
I personally like it but I appreciate it can be irritating for some. I will make it a setting. Sounds like my suggested feature request is getting some traction 😀
I actually like the backlit feature, and like this similarity with CDJ/Pioneer look... I will make that a setting too. Do you think backlit should be something that can be disabled everywhere or just on those buttons? |
What do you mean? While 25 presets is a bit much to use, I don't know what else it would make sense to do with those buttons. |
Just those buttons because it throws off the visual consistency of the colors with the surrounding colors. For the rest of the buttons, I intentionally made use of the dimly lit colored state as the disabled state to strengthen the association with the color of the deck. I don't know why NI put full color LEDs in all the deck buttons except those two 🤷 (or if the hardware is there, why the firmware doesn't react appropriately). |
Ah sorry, I misunderstood the documentation. I assumed holding the GRID button changed the behavior when the jog wheel moved, but it changes the behavior of the left encoder. Both the hold and hold + shift behaviors are useful and I have a suggestion that would allow keeping both of them while allowing the grid alignment to happen on button down. I suggest activating the beatgrid adjustment mode with shift + hold GRID, then use the left encoder for adjusting tempo and the right encoder for adjusting grid alignment (or switch the encoders around, doesn't really matter which is which). |
Activating sync on button release is also a bit odd. How about moving keylock to the currently unused mute button so sync can be activated on button press? |
I must say this is raising my curiosity and perhaps you might be able to help out a bit there! An idea I had to drive the screens was to create a small binary (ideally in Rust, or in C otherwise) that would emulate a HID device (using UHID) and create a dummy mapping on Mixxx to forward bunch of data to it (e.g title, bpm, key, elapsed time, keylock state...) I thought perhaps your experiment involved some of the above, in what case, if you had anything shared, it would be very appreciated as these are both things (uhid, libusb) I've never used before! :)
Sure thing, will do.
I think it is not very intuitive to access all 25 preset easily:
My thought was to:
This would also help with coloring which I find very hard to use at the minute - no way to tell if that "purple" each color is this effect or that one
Fair enough, I will make a setting for that.
Likely a subjective opinion, but one thing I did with the loop encoder was to reduce its assignment to try and do little and all loop-related actions. I do use loops quite a lot and on the first mapping, I kept on making mistakes because of other action it had. Also, the idea of the "Move mode" was to change effect of the move encoder only, but if you think strongly about it, I'm happy to make that configurable!
I was planning on making a second batch later and use the mute button already. You might have notice I did very little regarding to sampling just yet. My idea was something like:
I still need more thought and tests of that. However, shift+master is currently not mapped (only master release and long master), do you think it would be fine for keylocking? |
8d84015
to
9b25131
Compare
Unrelated to Mixxx. We added a generic control loop for handling HID I/O to Moiré and a hard-coded hack for attaching the S4MK3 as a device for testing. Ctrla could provide a starting point for accessing the screens. Sending a static image or pattern to the screens once during initialization would probably be the first step for a PoC. I am unsure if a standalone executable that serves as a reusable driver and protocol adapter (OSC?) is suitable for high-frequency I/O? But it is definitely worth exploring. |
d560c26
to
8b612de
Compare
With this push, unit tests should now pass. It looks like the sampler and effect feature isn't available while running test. Since arguably, this could also happen during runtime, I have made the code more resilient to this, meaning the tests should pass. @Be-ing I have added the three settings as mentioned above. I will update the doc accordingly once you give me feedback on it. Do you think I should go ahead and formulate a feature request to allow easy tweaking in the preferences? (@uklotzde you input would also be appreciated)
Also pushed some refactor as suggested by @Be-ing + some I stumble across while self-reviewing it. |
Holding Shift + GRID is something you have to do intentionally; I don't think you'd be doing that on accident while moving the loop encoder. So I don't think there's a risk of accidents using shift + GRID + loop encoder for an alternative action. |
This is a long standing feature request: #8135 |
I will try it out, and if it's not conclusive, I will make it a setting too. |
Thanks for for heads up @uklotzde . I have implemented screen support for S4 Mk4 in ctlra and using a UHID, I managed to get a Mixxx mapping to "drive" the screen; the image render is handle in that standalone process, but the data comes from Mixxx. Likely not something I can make to a production grade at the minute, but I guess it proves the concept. Here is a small teaser: output.mp4 |
Cool! How does this external tool communicate with the device? I expect a USB bulk transfer -> Did you know, that Mixxx has USB bulk support using libusb. You could create an additional Bulk mapping for the S4, which just controls the displays, while the HID mapping keeps responisble for the controls. PS: I recommend to continue the discussion about displays on the Zulip developer chat, to keep this PRs comments clean from unrelated comments. |
Great, that's awesome 🚀 |
To review a controller mapping, we need a documentation PR, to understand how the mapping is supposed to work. Details are described here: https://github.com/mixxxdj/mixxx/wiki/Contributing-Mappings#documenting-the-mapping |
Sure thing, I just wanted to see first if there was some interest in getting the mapping as-in before doing the documentation. |
098f782
to
3b98cf4
Compare
3b98cf4
to
febccc2
Compare
Thanks @Swiftb0y for that findings and the ES Lint fix. I have rebased the branch and fixed the undefined var. Pre-commit should be fine now. Edit: Should I squash my commit or should I let you guys do it when merging? |
Please don't squash - if necessary we will do it immediately before merging. Otherwise we loose track, what's already addressed. |
LGTM! Thank you for your patience! |
It would be cool if someone could merge 2.4 into main. Minor merge conflict. |
resolved. waiting for CI on my fork to complete before pushing to upstream. |
merged and pushed to upstream. |
Hello! Just popping my head in as i've been following the progress of the S4 Mk3 on Linux for years, Amazing to see it actually working now in recent versions. One thing I have noticed on my end though, when enable the experimental motor function and going in to TT mode, there is a lot of WOW and Flutter (Really no other name for it) I don't experience this in traktor, Im wondering if the motor torque is too light, the readings need averaging out over multiple samples or if i need to get the screwdriver and lubricant out and tackle the bearings in the jog wheels? 😅 Is this a known issue or is my S4 showing its age? I'm not entirely sure how Traktor gets around this, if it even does. |
It is a know issue, no problem with your device :) |
It hasn't not, it's tracked as a the PR linked above. Some initial testing suggests some regression on pads layout so probably not entirely ready to merge but I will hopefully find sometime to sort that out by the end of the week |
Just to confirm - is everything working fine without haptic feedback enabled in settings? |
I did a quick spin on it and everything else seems to work as expected, at least from a preliminary 5 minute 'try to use it' session. |
Howdy Mixxx community!
Some irrelevant context
I have recently acquired some S4 MK3 gears, and like many as I could read online, I was somehow disappointed with the overall Traktor experience and the lack of capability, whilst extremely pleased with the hardware.I decided to try Mixxx, which I had tried many years ago with some Reloop gears, sadly, when I plugged it (and fixed the udev rules...), the controller wasn't recognized out of the box, which was a bit of a bummer.
With this current mapping, I am now fully embracing these controllers again and thought I will share it with the community!
This work is continued from the great one that @Be-ing had started a few months back. A few mappings were changed from his first draft, but most of all, the wheel is now accurate, both in vinyl and turntable mode.
Sadly the screens won't work in the current state of Mixxx as @Be-ing mentioned it on Reddit. After further reverse engineering, I can confirm that the screens are driven by sending a 320x240 pixels matrix using a 16-bits color depth. While it could easily be driven by something external as this is not on the HID class (thus not locked), there is no way to integrate this smoothly within Mixxx (just yet at least, hopefully the team has plans for these additional vendor classes, which isn't unique to NI gears I believe). Perhaps if there is no immediate plans, a socket allowing a third party program to fetch metadata (RO) from Mixxx could be a nice step forward? This way, any vendor specific could be compiled into a third party program that would interact with these specific vendor classes.
Currently, I have kept the 20 quick FX selector, but IMO, it is far too much as there is no way to remember these 20 combinations. Furthermore, now that FX units are easier to interact with, I believe that 5-10 should be the max and I will likely do a different mode.
As it stands, they are a few mild issues limitation due to either missing features or bugs in Mixxx:
These limitations being unrelated to the mapping itself, I believe this could be considered production ready. I had a few sessions with it and it was a blast! It might not be 100% perfect but I believe this would be better than nothing and allow s4 owner to at least have something working at first. If the team thinks this would be acceptable, I will provide more docs as per the contribution guidelines.
I will report the bug (Library browsing), however I will hold for feature requests, as I don't want to overstep boundaries and request features that may be only interesting for me (or S4 MK3 owners). If you think they are fair requests tho, I'm happy to formulate them into issues, and potentially even help with them! :)
Documentation
Here is a very "quick-n-dirty" documentation for anyone that would like to try this mapping. If the Mixxx team would consider this PR for merging, I would be happy to work on this more and submit an other PR to the manual
Wheel mode
Wheel modes define how the wheel reacts when used. Here are all the various modes:
Move mode
Moves modes define how the move encoder reacts when used. Here are all the various modes:
Mapping details