-
-
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
Update Novation Launchpad controller scripts #2600
Conversation
This doesn't depend on any new 2.3 features does it? If not, we can merge this to the 2.2 branch. If you want to implement support for hotcue colors for 2.3, that would be cool. |
Oops, looks like the wiki documentation for cue colors is outdated... |
No it doesn't. It uses reloop_andstop introduced in 2.1.0, but that's safely old.
|
Also I wanted to add support for sampler grids too, that could use LED colors as well. |
Samplers don't have a color in Mixxx, although tracks do in 2.3. Track colors are not yet exposed to the scripting environment (see #2541 which hasn't been reviewed yet). |
I updated the documentation for hotcue colors. If the Launchpad supports full RGB colors, you wouldn't need to use the new ColorMapper class. |
Oh, this is nice. I could also build a palette of RGB colors to make the rest of the controls a bit more colorful, and use the ColorMapper to translate to values understood by the controllers. Nice stuff. |
AFAIK You don't need to use the ColorMapper class anywhere. For the other controls, you could use the launchpads integrated palette and for the RGB hotcues, you can set the color components via Sysex with 6-bit precision per channel. |
@Swiftb0y, not really. While Mk2's color palette could be directly used, I would still need to translate that to Mk1, which is complety different (and limited). And it's easier to map from RGB to that. Also I could send the RGB values directly to Mk2. It's better to have a common language for colors (RGB) than some arbitrary controller palette that can be changed between versions. |
I'm not quite sure about the limitations of the mapping code in regards to the MK1, but I recommend to send the Hotcuecolors directly via Sysex, since hotcues in mixxx can also have arbitrary colors. You can of course use the color mapper for everything else. |
Why is the mapping that complicated btw? 70.000 added/deleted lines for a controller script, custom Makefiles, it's own eslint.json, etc? Isn't it possible to implement a mapping that is more like other mappings we have (i.e. one XML + one JS file)? |
@Holzhaus |
Yes, @Swiftb0y is correct, that's was the reason. It was also any experiment whether Javascript toolchains are flexible enough to handle this situation. It turned out they are. The only thing I regret in hindsight is adding Flow to the mix. It's not used that much today, the rest is pretty conventional JS stack. Basically i wanted to use JS best practices, like I discussed in that blogpost. |
Does this mean we can throw all of the transpilation stuff away when we switch to QJSEngine and Qt 5.12? |
There are a bunch of external dependencies that would still have to be included and the XML is also generated automatically. It would be nice if we could implement this until then as well: |
@Holzhaus note that we would need an embedding that can handle ES6 imports as well and a lots of other stuff. Currently the source is transpiled and bundled. That makes us able to generate separate bundles for the different controllers without duplicating the source code. I created a workflow in which I am comfortable working in, ie. modular, uses npm, linter, etc. I'm sure there have been already a lot of discussion on how the controller scripts should be reformed to achieve this, but it is not only about using ES6-7-8 |
This ColorMap thing hasn't landed in any releases yet, right? I see it was added in November. I think I could replicate the behavior in JS for the time being. |
It turns out it is unusable when one of the main components are missing. E.g it will choose black over any color for blues. I'd still want some color with the same brightness |
Don't pass #000000 as a color to ColorMapper. On/Off states should be handles separately. Doesn't the Launchpad support all RGB colors? In that case there is no need to ColorMapper at all, just implement |
Depends on the kind of launchpad. The project generates mappings for launchpads that do have RGB Leds and for launchpads that don't. So we'd still use ColorMapper for launchpads that don't support arbitrary colors. |
There are merge conflicts now. |
Is this ready for merge now? |
I can't review this, because it's transpiled code and clashes with our mapping system IMHO. If @dszakallas says it works, I'm okay with merging this. |
Does this still work with master since #2682 was merged? |
Shouldn't this be retargeted to 2.3 anyway? Do we even know if the current Launchpad mapping works with Master? |
Okay. |
@dszakallas: I really like to get rid of the security warnings. If this is not ready yet, can you prepare a commit, that just updates the packages? |
This is (was?) ready. I specifically tested this version against #1795. Don't know how #2682 affects this, but my guess is if the previous version worked, this will work too (changes are kind of trivial). The only dependencies of the app are
which are relatively safe, however a new one is detected every other week in the build dependencies of the project. If you get security vuln warnings in this project because of my package.json files, we can get rid of them once and for all by deleting the controller sources. |
Ok, what we need to do for it? |
Let's see.
Sounds good? |
IMO only the final, ready-to-use .xml/.js mapping file belong into the mixxxdj/mixxx repo, but nothing else. I don't see a reason why to maintain a custom generator framework for a single controller model? No one of us is able to take care of it or verify if it still works with the current version of Mixxx. This code should be managed and versioned in a separate repo. This could be hosted within the mixxxdj organization if desired. |
Ready with the changes. |
Thank you for the update. Can update the wiki page too? We recently moved the wiki to GitHub. This was merged to the master branch. Should it be backported to 2.2 and/or 2.3 too? We are working on a new controller scripting system using JS modules without the annoying XML file now that we have ES6 support. If you'd like to help us design that, we've been discussing it on Zulip: |
If you eventually get rid of flow and external dependencies, we could even integrate your original JS code without the transpilation step. |
@Be-ing what is the preferred way of updating the documentation? I don't think the script needs to be backported, as the control usages are compatible with >=2.1.0, and I don't use any new features on the JS side (Components or ColorMapper). |
You can just copy and paste the markdown code (we're using GitHub wiki now). |
I'd be glad to help designing a new scripting environment, but I've been steering away from JS for quite a long time now, and I'm not sure if I was much of a help. |
Sure. |
I just meant updating the other branches with these changes, not changing the mapping. |
Oh, that can be done, sure.
… On 2020. Jul 8., at 0:00, Be ***@***.***> wrote:
I don't think the script needs to be backported, as the control usages are compatible with >=2.1.0, and I don't use any new features on the JS side (Components or ColorMapper).
I just meant updating the other branches with these changes, not changing the mapping.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2600 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABMJZWSF637M5T77FJIPZU3R2OLI7ANCNFSM4LTU7JNA>.
|
Release Notes
Builds on top of the version included in #1795 (2.2.6), and the scope of changes is fairly limited:
See diff
Manual checks: