Hercules DJ Console RMX 2 mapping overhaul

I like this controller (already working with it for quite a long time using a customized mapping) and I would like to do an official much more feature-contained and Mixxx 2.1 support mapping for it.

But I’m stuck in the very beginning of this process as soon as I try to use the following lines in the xml-file:

            <file filename="lodash.mixxx.js"/>
            <file filename="midi-components-0.0.js"/>
            <file functionprefix="DJCRMX2" filename="Hercules-DJ-Console-RMX-2-scripts.js"/>

If I start Mixxx by the terminal using ./mixxx --controllerDebug I get the following error message (occurs even before using the new Deck() function in the script file):

"ERROR! new Deck() called without specifying any deck numbers" 

My init part of the script code looks exactly like described here: https://www.mixxx.org/wiki/doku.php/components_js.

Now when I try to use the play button, for example, I get the following error message:

ControllerEngine: "Nicht abgefangene Ausnahme bei Zeile 1 in übergebenem Code: TypeError: Result of expression 'DJCRMX2.leftDeck' [undefined] is not an object.

I think these two errors cohere with each other?! What’s the problem here?
I’m using a MacBook Air with MacOS 10.13.4 and the latest Mixxx 2.1 release from here: http://downloads.mixxx.org/builds/2.1/release/

The strange thing is that I get the error messages using @Be.'s Hercules P32 mapping, too (without physically owning this controller).

You can safely ignore that first error. You’re not the first to be confused by it; it should be removed to prevent more confusion.

As for the second error, I can’t tell what’s going wrong without seeing the code.

Ah ok, thank you for that hint!

I now wanted to post the relevant code parts and extracted them into separate files. I tested these files (.xml and .js) and they worked…seems like there was something wrong in the xml file as I just edited the existing mapping file. By extracting the relevant code I created new files.

So at the moment it seems to be fine and I can start programming.

Thank you @Be.

Two questions concerning components effectUnit part:

  1. Is there a way to easily modify the components effectUnit part from my script file without rewriting everything?
    I want to implement the velocity pads in a kind of useful way (using the standard effectUnit components leads to strange behavior pressing a velocity pad mapped to an enableButton for example)

  2. Using the dryWetKnob controls the ‘mix’ control only…using SHIFT and the dryWetKnob controls the ‘super1’ and the ‘mix’ control at the same time (I thought only ‘super1’ would be controlled)…how can this happen?

At the moment I have the following code part in my script file (it is implemented into the deck component -> seen at Be’s Hercules P32 mapping):

    this.effectUnit = new components.EffectUnit(deckNumbers);
    this.effectUnit.enableButtons[1].midi = [0x90, DJCRMX2.padLedGroups.effect + DJCRMX2.channelGroupsPad[this.currentDeck] + 0x00];
    this.effectUnit.enableButtons[2].midi = [0x90, DJCRMX2.padLedGroups.effect + DJCRMX2.channelGroupsPad[this.currentDeck] + 0x01];
    this.effectUnit.enableButtons[3].midi = [0x90, DJCRMX2.padLedGroups.effect + DJCRMX2.channelGroupsPad[this.currentDeck] + 0x02];
    this.effectUnit.effectFocusButton.midi = [0x90, DJCRMX2.padLedGroups.effect + DJCRMX2.channelGroupsPad[this.currentDeck] + 0x03];
    this.effectUnit.dryWetKnob.input = function(channel, control, value, status, group) {
        this.inSetParameter(this.inGetParameter() + DJCRMX2.getRotaryDelta(value) / 40);
    // here I tried to modify the shift behavior only for the first enableButton as a testing purpose, but it is ignored after a fresh start of Mixxx (velocity controls meta):
    this.effectUnit.enableButtons[1].shift = function () {
    	this.input = function (channel, control, value, status, group) {
    		if (value === 0x00) {
                    this.blockEffectPad = false;
            if (this.isPress(channel, control, value, status)) {
            	if (!this.blockEffectPad) {
            	    engine.setValue(this.group, 'enabled', 1);
                this.blockEffectPad = true;
            } else {
            	engine.setValue(this.group, 'enabled', 0);
    	    engine.setValue(this.group, 'meta', value / 0x7F);

Ok, the second question is now irrelevant. I was able to answer it myself. There was a dedicated “left over” control definition for the ‘mix’ control in the xml file.

By the way, the mentioned code part which was added for testing is not working well. It destroys the unshift/shift behavior of all other components.
But I would really like to know if there’s an easy way to modify the effectUnit part of the components lib without rewriting everything in my script file and change the relevant code parts, for example the enableButtons behavior. Thank you in advance!

No. I tried to make this clear on the wiki:

Here is how I suggest mapping effects on this controller:
When an effect is focused, the encoder above the pads would control the focused effect’s metaknob. When no effect is focused, it would control the effect unit’s mix knob (we’re moving away from calling it “dry/wet” because in 2.2 there will be a new mode for adding wet to dry instead of crossfading between them; this is already in the master branch). 3 of the pads would focus one of the effects and the 4th would unfocus (switch the encoder back to the mix knob). Pressing the pads with shift could toggle the enable buttons of the effects.

I just opened up a pull request for my new mapping.
I made a lot of thoughts about the effects mapping and I still want to do some additional descriptions using the pads now in the different modes. I made a basic description in the wiki.
It works for me for about a week now without any issues.

Here’s a short description about the effects mapping:

Basic functions:
When you go into the Effect-Mode and press pad 1…3 you enable/disable the effect 1…3 of the EffectUnit1 (left deck) or of the EffectUnit2 (right deck). By turning the encoder knob you control the dry/wet/mix function. By pressing SHIFT and turning the encoder knob you control the super1 function.

EffectFocusMode functions:
When you press pad 4 shortly you open up or close the effect focus panel. When you press pad 4 longer you enable the EffectFocusMode and can focus effect 1…3 by holding pad 4 and additionally pressing pad 1…3.
When an effect is focused (EffectFocusMode) the pads 1…3 control the effect button parameters (as in the default components mapping). The encoder still controls the dry/wet/mix function or with SHIFT the super1 function.

ParameterEditMode functions:
If you now press pad 1…3 longer you enter the ParameterEditMode and the pressed pad starts blinking, signaling the effect parameter number which will be controlled now by the encoder. Press the concerned/blinking pad again to leave the ParameterEditMode. The pads and the encoder behave just as mentioned before the ParameterEditMode.

Another special feature is inside the Sample-Mode:
If you turn the encoder in this mode, you can change the pad assignment to the sampler numbers. Default is pad 1…4 = [Sampler1…4] (index 1). By turning the encoder clockwise the pad lights go off and only the pad number with the actual index is blinking. The second pad should blink now which means that you switch the pad assignment to [Sampler5…8]. You can do that again until you reached the index 4. You can turn the encoder counter-clockwise to decrease the index and go back to, for example [Sampler1…4]. After three seconds the pads stop blinking and you can toggle the new assigned samplers to play.

I feel as if I’m late to the game on this subject, but I just bought a Herc RMX2 (upgrading from the venerable Console RMX). The Console RMX uses a HID script. If I’m understanding correctly, the RMX2 uses a midi script.

Is there anything I will need to do anything to change to this controller? I’m assuming there are new scripts I need to put in the controller folder.

Also, can I use the incredibly awesome Midi Mapping Wizard with this one? I was able to use the wizard with the Console RMX, back in the day (1.12 and earlier), but that moved to a HID script, which I always found to be a little wonky.

Anyway, I’m excited to start using the RMX2 and am seeking any tips, tricks, hints, and words of wisdom regarding this controller with Mixxx 2.13

(oh, I should state that I’m using Linux Mint KDe spin 18.3)

Hi DJversion666,

There’s a script file for the RMX2 controller mapping, that’s correct. There’s already a mapping which comes with Mixxx so you just have to choose it from the controller list in the controller settings. After that the mapping files will be copied to the controller folder and you can modify them if you want.

I’m still working on a new mapping for the controller. So if you have any hints or ideas just let me know here. The wiki for the controller is in a updated but temporary state.

I never used the midi mapping wizard so I cannot give you any information on that.

Awesome! Yes, I’ve been using one of the scripts, but I did use the mapping wizard to designate 2 pads on each side to effects. I’m not entirely sure how to map the effect knobs to more than the one pad (that would be really cool, to control whichever effects happen to be pressed ON at the time). If I ever get a chance, I’d like to try and mess with that, but outside the Midi Mapping Wizard, I’m pretty clueless. I’ve opened the scripts to controllers and, while there is the reference guide to the various, supported controllers, I get nervous thinking about changing anything, even with a backup (irrational, I know).

I’m really loving this controller, though. It’s amazing, compared to the first Hercules DJ Console RMX, which I have used for years, now, with Mixxx.

Thank you for your response :slight_smile:

I have had an issue with Mixxx crashing when I shut down, which didn’t used to occur with the old Hercules DJ Console RMX. I’ve been killing the process with the System Monitor, when I’m done with the software. I’m really no sure why it might be doing so. It is every time, though.

Edit: No longer crashes. Switched from the Dark Metal skin to Later Night. Also removed the HID scripts from my old DJ Console RMX. I don’t know if either of these two things were the issue, but it no longer crashes and hangs, so…

Another edit: Spoke too soon. crashed when I tried to shut it down, today.

I don’t think that this has something to do with the existing Hercules DJ Console RMX 2 mapping. I have both controllers, the RMX and the RMX 2 and I never had that behavior since I’m running Mixxx. Which Mixxx version do you use now and which OS do you have?

Currently, version 2.1.4 with Linux Mint KDe spin 18.3 this issue appears to be intermittent. It also, upon startup, often doesn’t recognize the controller is connected, until I go in to reconfigure and it’s right there, ready to be selected.

Mixxx 2.2 and the current mappings (effects, specifically- still testing other parts) are wonky. I know, I’m being technical, here. I apologize. I’m currently running Linux Mint KDe 18.3 x64

Also, I’ve notices flickering with the waves and the library (preview). It doesn’t seem to cause issues with the audio, but it is incredibly hard to look at lol (I don’t think this is a Hercules issue, actually, but a GUI issue)- edit (update): I took the preview out of the library section and the flickering seems to stop. There is a visual glitch (an “artifact”, I think it may be called) that shows up (disappears when I minimize and then bring Mixxx back up)

I’m using the Dark Metal skin, currently, as it’s the only one currently working, at all, with the effects Super knob (or whatever the hell it’s called). That knob stopped working, entirely, with the Later Night skin. The right effects knob still works as it did before. It’s just the left one. I tried using the Midi Wizard, but didn’t have any luck.

Mixxx 2.2 looks like a great idea on paper, but it threw my configurations off. Help! I use Mixxx several times a week, for work. I wish I knew more about coding, but it’s not my forte’. :frowning:

Hey- at least it’s working well with the Dark Metal skin and it’s technically not flickering anymore! I just hope other skins will work with it, eventually. I do like the Dark Metal skin, though. :slight_smile:

Another edit: Started glitching (audio and GUI) and eventually crashed, after about 3 hours of nonstop playing. Rebooted. Not sure what is causing that. Hopefully, it’s something that will be fixed, shortly.

The video glitching happens a lot less, now, but still occasionally happens. I think it may actually have to do with video, though. It happens so rarely, though, I really have no idea what may be causing it. I haven’t had a chance to switch skins to see if the other skins are working (as I said in the previous post, I’m using the Dark Metal skin, which does work well with this version of Mixxx. I haven’t switched a skin since this update, because I use Mixxx for work).

I was just wondering if anyone else has had issues with the new update and the Herc RMX2, or if this is a configuration thing on my end.

I miss other skins because my eyes are not bionic and some of those skin features are incredibly tiny.