Hercules RMX HID-mapping

XML preset files and script files (.js) for MIDI and other controllers.

Moderators: garth, User Customization Moderators

Hercules RMX HID-mapping

Postby RichterSkala » Wed Mar 05, 2014 5:26 pm

Hi everyone.

I got annoyed having to compile the Hercules MIDI module for every new Linux kernel (happens quite often on Arch) and the need to search patches adapting it to the current kernel now and then. So I finally sat down and wrote a mapping for the Hercules RMX using the native HID.

The mapping I've attatched does most of the stuff you'd expect it to do. To use it, load it for the Hercules RMX HID #5. The script file already includes the basics for 4 shift functions: Holding the "Stop" button, toggling the "Mic On/Off" button and toggling the "Source A" or "Source B" button (I'm not sure if it's safe to use these, I had them go out of function before but couldn't replicate the behaviour). But as of now these functions are unused in the script.

Furthermore I didn't bind the numbered buttons 1 to 6 on each deck yet. You can easily find these functions in the script, because they have a print() call, and adapt them to your needs.

Another thing I have yet to figure out is that the LEDs for deck 2 were sometimes blinking during testing and I couldn't figure out what triggers that.

I guess the most important part are the offsets of the buttons and leds in the script file. I hope you find my documentation readable and can work your way to a HID mapping of your own. The script is mostly based on zestoi's scripts for the Mk2.

If you have questions or suggestions I'm happy to answer them. I'm also looking forward for anybody who knows how to controll blinking of the LEDs in HID-mode, if the Source Buttons are weird or if it's only my controller that behaves that way or who knows, why there are two HID devices for the Hercules RMX.
(18.44 KiB) Downloaded 1099 times
(520 Bytes) Downloaded 1015 times
Posts: 2
Joined: Wed Mar 05, 2014 5:12 pm

Re: Hercules RMX HID-mapping

Postby neale » Tue Mar 11, 2014 7:41 pm

Awesome, I'll check the RMX off the list of things I may support in the userspace driver.

Most Hercules controllers will flash the LED if you add some offset (I think it's 0x80) to the control for the light. It's been a while since I looked at Mixxx, but try twiddling the value you send to the control and the control number. Check the mp3e2 script for a better description than my memory at work :)
User avatar
Posts: 35
Joined: Sun Jun 24, 2012 9:50 pm

Re: Hercules RMX HID-mapping

Postby flossy » Sun Mar 23, 2014 6:58 pm

Hi RichterSkala,

great work! Hopefully your code will be included within the 1.12 release. I made a pull request for that: https://github.com/mixxxdj/mixxx/pull/206
Posts: 3
Joined: Wed Oct 22, 2008 9:44 am

Re: Hercules RMX HID-mapping

Postby chtfn » Thu Apr 17, 2014 2:04 am

Commit is merged - as a RMX user thinking of using my old records in my sets, I am indeed VERY excited! Thank you everyone!!!! :D
Posts: 33
Joined: Wed Feb 09, 2011 1:13 pm

Re: Hercules RMX HID-mapping

Postby RichterSkala » Mon Apr 21, 2014 1:04 pm

Thanks flossy for your work to adapt my crude works to the coding standards and the merge!

I'm thinking if we ship this with the 1.12 release, shouldn't we assign something to the numbered buttons? Any suggestions what they should do?

Regarding the blinking LEDs and the out-of-work "source"-buttons, my suspicion is that this might be due to power consumption by the controller, which my desktop PC can not provide (interestingly enough), on my laptop everything works...
Posts: 2
Joined: Wed Mar 05, 2014 5:12 pm

Re: Hercules RMX HID-mapping

Postby [email protected] » Fri Dec 12, 2014 1:02 pm

Hi everyone, I'm a new member. First of all, please apologize me if I make some mistakes writing, because English is not my first language. :|

I found this script very useful, so a big thank you goes to RichterSkala :D but I also wanted something more, so I decided to add a couple of feature and share with you my work (I don't know if someone is still using Hercules RMX and Mixxx 1.11, but nevermind :mrgreen: ).

Notice that this is a help request, too, because I didn't manage to include all the feature i'd like to; therefore, if somebody see something wrong (or something that could be better) in my code, please let me know.

This is for Mixxx ver. 1.11, which is still the latest stable release.

Here you are the list of what I've done.

    Added soft - takeover for all the faders.
    Added toggle for flanger effect. Source 1 and Source 2 are now used to toggle flanger effect on deck 1 or 2 (LED will light up if effect is active). Stop + high, mid and bass knobs adjust flanger parameters.
    Keypad 1 to 6 are now used to enable some functions
      Keypad 1 and 2 are now two hotcue buttons. First press sets the hotcue, other press goes to the hot cue. Stop + keypad 1 or 2 deletes corresponding hot cue.
      Keypad 3 is the reverse button.
      Keypad 4 and 5 are the loop in/out buttons (manual looping).
      Keypad 6 is the reloop/exit button.
    ut positions
      Stop + keypad 6 activates a loop of 4 beats (auto looping).
      Stop + next/prev buttons doubles/halves loop lenght.
    A little change in CUE behaviour
: if the track ends and you hit cue buttons, player position goes to the previously set cue point, instead of setting a useless cue point at the end of the track (remember this script is for Mixxx 1.11).


Flanger adjustable parameters have weird values in the script. I added these weird values just because in this way knobs position on the controller matches with knobs position on the software, but I think it could be implemented better.

Add soft-takeover on knobs when passing from flanger-parameters adjusting to eq-parameters adjusting.

Add a way to move loop in/out positions (when manually looping).

(maybe) add brake effect with stop + cue :?:

That's all for now, one last thing: I simply added "v2" in script name and "modified by [email protected]" in proprieties, but I don't now if this is the correct way.

Let me know what you think about this.

Bye ;)
(21.84 KiB) Downloaded 489 times
(650 Bytes) Downloaded 561 times
[email protected]
Posts: 19
Joined: Fri Dec 12, 2014 12:31 pm

Re: Hercules RMX HID-mapping

Postby Mankir » Wed Aug 12, 2015 1:57 pm

Great work! I just wonder, why the left CueSelect-button lights constantly and the right one blinks, when they are active? Haven't found something in the code yet...
Here is a version which clears the leds on startup (was just commented out) and on shutdown with this function (works on Mixxx 1.12beta):
RMX.shutdown = function() {
var c = RMX;
// Elvis has left the building...
for (id in c.leds) {
c.send(c.leds[id].group, c.leds[id].name, 0);
(21.97 KiB) Downloaded 342 times
Last edited by Mankir on Thu Jun 16, 2016 8:46 am, edited 1 time in total.
Posts: 25
Joined: Wed Sep 05, 2012 8:52 am

Re: Hercules RMX HID-mapping

Postby [email protected] » Tue Dec 29, 2015 2:51 pm

New Mixxx 2.0 Version is out, so I updated my HID mapping for the Hercules Dj Console RMX (hope someone's still using this old controller :) ).

Let's see some features.

Added soft-takeover for all the faders.

Stop button acts as the "shift" button.

Pressing Shift + cue aligns the beatgrid to the current playing position.

Pitch Reset button lights up when pitch rate is at 0% (no matter if this is done by pressing the pitch reset button, or the sync button, or by moving the pitch slider).

Both of the "Sync" buttons lights up when both of the tracks in the 2 decks have the same BPM (no matter if you pressed the sync button or you manually beatmatched by moving the pitch slider).
Keypads from 1 to 6 have different behaviours, buttons "source 1" and "source 2" chenges this behaviour (and light up when they're active).

When Source buttons are not active:

-Keypad #1 and #2 are two hot cues. If hot cues are not set, pressing the buttons will set the hot cues; once they're set, pressing the buttons will recall them; pressing shift + keypad #1 or #2 will delete the corresponding hot cue.

-Keypad #3 does a beatlooproll of 1/4 beat as long as it's pressed (so releasing the button will stop the roll); shift + keypad #3 does a reverseroll as long as the button is pressed.

-Keypad #4 is the "loop in" button.

-Keypad #5 is the "loop out" button.

-Keypad #6 is the "reloop/exit" button.
When you are into a loop, you can adjust the loop out marker in 3 ways:
-pressing shift + prev or shift + next you can halve/double the loop lenght.
-pressing "prev" or "next" buttons you can move the loop out marker (450 samples per press).
-keeping shift pressed and rotating the jog wheel you can move the loop out marker.

When Source buttons are active:

-Keypad from #1 to #3 activates corresponding effect units; they activates the unit for a specific deck, depending on what side are you pressing the keypad (left or right). Shift + Keypad scrolls among the available effects.
When an effect is ON, the "gain" knob turns into the "super" knob. When you switch off the effect, BUT your "source" button is still ON, the gain knob does nothing: this will let you turn the knob back into the "0" position before using it for gain control (switching "source" off) or for another effect.
Notice that once you activate/deactivate effect #1, the "super" parameter is instantly set to 0.5 - this is because I always use #1 unit for the "filter" effect.

-Keypad from #4 to #6 activates samplers from #1 to #3. For example, pressing keypad #4 on the left-hand side of the controller will:
-set play position at the very beginning of the sample;
-set the "orientation" parameter to the opposite hand side;
-play the sample (of course ;))
The orientation is chosen so that, for example, if you are playng a track from deck #1, you will press keypad from the left-hand side and so your sample is assigned to the right-hand side of the crossfader: this way, you can cut the sample simply moving the crossfader to the left, leaving the song you were playing. I know it's difficult for me to explain, but if you try it will come natural.

When loading a track to deck A or B, corresponding headphone will turn on

I think that's all, the other features are the same of the "basic" configuration.
I have some issues with the LEDs, because the "Beat Lock" and "Source 2" on the right-hand side always blink, instead of remaining still. I tried to add the code posted by Mankir, but with no success. :?

Please, tell me what you think of this mapping and if you have a solution for the LEDs issue.

Thank you.
(629 Bytes) Downloaded 614 times
(34.39 KiB) Downloaded 504 times
[email protected]
Posts: 19
Joined: Fri Dec 12, 2014 12:31 pm

Re: Hercules RMX HID-mapping

Postby MichaelJespersen » Thu Dec 31, 2015 3:28 pm

Thanks for letting our RMX console live a few more years with Mixxx. :)

I'm not able to use my RMX to control Mixxx. I use Mixxx 2.0 x64 on Win 7 x64 with driver package 6.HDJS.2015.

In the controller panel I can see 3 controllers
- Hercules DJ Console RMX _5 (cyrillic looking sign before the underscore)
- Hercules DJ Console RMX _6 (cyrillic looking sign before the underscore)
- Hercules DJ Console Rmx MIDI

I can assign a preset to the controllers in the list, but I cannot active it persistently. Everytime I close and re-open the settings, the checkmark is turned off again.

Can anyone please give me a hint on what to do?
Posts: 22
Joined: Sun Jan 22, 2012 4:27 pm

Re: Hercules RMX HID-mapping

Postby sblaisot » Fri Jan 01, 2016 8:59 pm

Usually, Hercules driver allow you to use MIDI mappings, but don't let you use your controller as HID.
Try uninstalling hercules driver, then use your controller with this HID mapping.
User avatar
Posts: 157
Joined: Thu Apr 30, 2015 3:12 pm
Location: Rennes, France


Return to Controller presets/mappings

Who is online

Users browsing this forum: No registered users and 9 guests