A Few General Questions about Controller Mappings

I’m working on a new mapping, and have some questions that I could not find answers to in the docs…

  1. When I edit the JavaScript file, Mixxx updates, but when I edit the XML file, nothing happens, and I have to completely restart Mixxx. Why?

  2. The docs say to use ECMAScript and link to the spec, but it’s the latest spec, not the old version used in Mixxx. The link to QTScript is broken, and there’s no version information to look the information up manually. Which JS spec does Mixxx support?

  3. My controllers directory (within my home directory) has a few controller mapping files for Apple keyboards and mouses. Can I delete them?

  4. Does anyone have a link to the conversation about the new JavaScript API (that replaces the bulk of the XML file)? I’m interesting in testing it.

  5. Can the XML file map the same status and midino bytes to more than one control element?

  6. Why does Mixxx rewrite custom XML files? It reorders the control elements (which is very confusing), and enforces its own style rules, which makes the code harder to read for the person that maintains it.

  7. Why do we call them mappings? I already use mapping to describe the relationship between physical controls and the MIDI channels and notes they map to. It should be a driver.

I won’t go into the details here, but we’re working on a new controller mapping system without XML.

Here’s a working link: https://doc.qt.io/qt-5/qtscript-index.html
It’s some custom ECMAScript-3-like version of JS. On the development branch we already switched to QJSEngine which supports ECMAScript 6 I think.

Yes. The unnecessary copying and creation of controller mapping files in the user directory should be fixed with Mixxx 2.3.

It’s not ready for testing yet. Development discussion usually happens on Zulip, e. g. https://mixxx.zulipchat.com/#narrow/stream/113295-controller-mapping/topic/C.2B.2B.20controller.20system.20refactoring

I don’t think so, just pass it to a JS function and you can set as many controls as you like.

No idea.

I think the “official” naming was “preset” but nobody uses it and mapping fits IMHO (because it describes the relationship between midi signals and Mixxx controls) and I think other DJ software also calls them “mappings”. The term “driver” would be even more confusing, because drivers are usually associated with the OS level, e. g. the controller’s audio interface driver, etc.

1 Like

Thank you @hlzhs. Much appreciated. That’s about the most useful answer I’ve ever got, in any forum.

Support for an ES6ish scripting language would be nice. That link is all I need for now though.

If the new JS API will do away with the XML file (more or less), then the issue with it not reloading and with it being automatically rewritten will no longer matter.

Thanks for the Zulip link. That’s also really useful to have. I don’t want to make promises so early on, but I am very interested in Mixxx, and would like to help out, once I’m more familiar with everything.

Your point on mapping vs driver is good enough that I’m willing to leave it at that. I was only curious to begin with.

Again, thank you, @hlzhs.