Custom MIDI Mapping: Hercules RMX 2 (0.1.3)

Latest Version: 0.1.3 ///
Results of MIDI Wizard: … 2YzTU5vR2c

Current Goals:
Version 1.0: Headphones/Loading/Pitch Bending/Fast Seeking buttons: Work. Outputs through master channel.

My current project is using Mixxx to overpower the living shit out of the Hercules RMX 2. If I can make what I want to happen into a reality, the open source program will get more out of the mixer than the commercial-grade software by a huge landslide. The following is not a promise, but a set of plans for features for the mixer. We have many more possibilities. The versions go like this.

0.1 = Everything we have right now.
1.0 = Most of everything we SHOULD have right now. Basic Stable Mode. It would be included in Mixxx until 2.0 and 3.0 were developed. After that, releases named “3.x” would be included because some people don’t want to deal with quad mixers.
2.0 = Combinations of shift+buttons, a lot of stuff gets rewritten.
3.0 = Slip Mode is introduced, thus existing controls gain more functionality.
4.0 = Quad Decks are introduced. There will be lots of limitations that may require you to purchase a secondary mixer for tracks 3 and 4.
4.1 = A big fuckton of work just to make workarounds for if we NEED to have functionality for both tracks on this mixer.
4.S = Slicing Mode is introduced. It is here because it hasn’t been programmed, yet. 3.0 will also get a slicing mode, “3.S”.

Jog Wheels:

Version 0.1: Fuck, can’t USE the jog wheels! :frowning:
Version 1.0: The jog wheels aren’t just for scratching, you can rotate them without pressure to slightly change its speed temporarily.
Version 2.0: If you press the VINYL button (it is the button underneath the middle main Gain knob), the jog wheels will have a third function, “Jog Mode,” where yes you can scratch but the non-pressure rotation will actually adjust the song’s playing speed. It’s just another option for DJs. Disabling Jog Mode will reset the playing speeds of both/all tracks.
Version 3.0: Slip Mode (Shift+VINYL) keeps you from losing your place if you accidentally touch the wheels.
Version 4.0: I will attempt to make the RMX 2 a quad track controller some time in the future. To switch between the tracks, hold SHIFT and press the fast-forward/fast-rewind seeking buttons. They will enable/disable tracks 1 and 3. The limitation compared to DDJ-SX is that you will have to press two buttons to activate both tracks, not just 1.


Version 0.1: The play, cue, and sync buttons work as expected. The Sync button will match the beatgrids of one song with the other.
Version 2.0: Shift+Play will play the song in reverse at the established speed.
Version 3.0: Shift+Play will be Slip Mode compatible.
Version 4.0: Shift+Sync will be the BPM tap for the selected track of the corresponding platter. The cue button will preview the secondary track, as well. Therefore, Shift+Cue remains free, for now.
Version S.0: Shift+Cue activates Slicer Mode for the deck of the corresponding Cue button. The shift button you choose affects which track on the corresponding deck we enter Slicer Mode into, regardless of the currently selected track. Choosing the shift button on the other side of the deck will cause the cue button to correspond with tracks 3 or 4. The sequence is pressed again to exit out of Slicer Mode.

Faders and Equalizers:

Version 0.1: They operate normally, except the kill buttons do not work.
Version 1.0: EQ Kill buttons are operational.
Version 2.0: Shift+Kill will affect the secondary track of each platter. The knobs and faders will not affect the secondary tracks. It is advised that you should get a cheap standalone midi mixer for tracks 3 and 4.
Version 4.1: Version 2.1 is for those who don’t wish to invest in a separate MIDI controller to work in conjunction with RMX 2. It naturally takes a fuck ton of work to pull off. The RMX 2 was not designed to handle four tracks but I believe I have a solution. The EQ and fader controls will be built from the ground up, more or less; Both of the mixer sliders (“faders”) will control the volumes of all four tracks. Each side will control two independently. To control the faders and equalization of JUST track #1, first hold shift. Holding shift will be programmed so that none of the faders or equalizer knobs will affect the sound no matter how you twist it. While holding shift, push the mixer slider to a place where it won’t cause a jump in volume when you release the shift button, and also, adjust the EQ knobs so that there won’t be a sudden change in song EQ. If we were to be playing track #3 while we did this, its volume and equalization settings would be unaffected. Don’t release Shift, though, because you still have track #3 selected, so it would change the EQ and volume settings! Instead, DESELECT track 3, and then SELECT track 1. Let go of Shift and now you can freely tweak track 1’s volume and EQ!

Headphones/Loading/Pitch Bending/Fast Seeking buttons:

Version 0.1: All but pitch bending work.
Version 1.0: Pitch bending works.
Version 2.0: Holding shift will affect the secondary tracks, except for the fast seeking buttons, because they select the track. Instead, just deselect the track you don’t want to quick-seek and then use the button normally.

Tempo Sliders:

Version 0.1: They work.
Version 4.0: Shift+Tempo slider will correspond to the deselected track(s).

Microphone, Cue/Mix, HeadVol, Source 1 / Source 2 and Dials:

Version 0.1: Don’t work.
Version 1.0: Work. Outputs through master channel.

Velocity Pads: The most complicated section of the list.

Version 0.1: Partially work. None of the loop functions work. Samples and Cues can activate but cannot be removed. There is only one shared effect in Mixxx, so there leaves a lot of room to use these buttons for other purposes.
Version 1.0: No attempt will be made to add Shift+Button functionality. Loops will have activate/deactivate (top-left=quarter note and cuts in half as we go down the four squares). Effects function as usual aka slightly broken. Samples and cues can be played but not removed.
Version 2.0: A shit ton of functionality comes out of these buttons. Since each of the two shift buttons are independent, we actually have 96 velocity pads. We effectively have more velocity pads than the DDJ-SX has. Just braggin’ it up, here.
Version 2.0 for Looping: Without holding shift, you will just have four buttons for the standard looping. When holding Shift, one deck will be free to use all 8 velocity pads. We’ll number then 1-8, top-left to bottom-right. 1=Enable/Disable a 4-beat loop. 2=Enable/Disable a 2-beat loop. 3=Start-loop flag. 4=End-loop flag. 5=Halve the loop, 6=Double the loop, 7=Cancel loop, 8=Keylock button for the track(s) being looped. The shift button you use will correspond to the other deck, so if you use the Right Shift button, the quads of buttons will switch places (they won’t be backwards, though, so it’ll be like 5 6 7 8 and not 6 5 7 8 from top-left to bottom-right on the left side of the mixer).
Version 2.0 for Effects: Again, there is only one effect to process, so we might have some free buttons available to be assigned to other uses. 1=Turn on Flanger effect, 2=Activate Period, 5=Activate Depth, 6=Activate Delay. The FX knobs above the quads of pads will control all the activated parameters. Holding shift will give us more buttons to work with in the future. If there are more effects/parameters, we will add them when they are developed.
Version 2.0 for Samples: Holding shift will allow you to stop the corresponding sample playing on the corresponding deck. It’s a sampler, there are four samples, it doesn’t need to be any more complicated than that. As for the last few buttons, we can turn on headphones mode for the samples, since if they’re loud then they can really jut out of the mix. We should be able to correct it before we punch our audience with ripped audio.
Version 2.0 for Cues: You can set them and use shift to take them off. The four remaining buttons are going to be left alone, for now.
Version 3.0 for Loops: In Slip Mode, leaving the loop will put you back where you would have been had you not entered loop mode.
Version 3.0 for Cues: Cues are held, not pressed. When you release the Cue pad, the mixer will return to the theoretical place of the song. Shift operates as usual.
Version 4.0 for Cues, Loops, and Effects: The selected track will be affected by the pads associated with each mode.
Version 4.S for all: When entering Slicer Mode, all velocity pads are overridden by slicer pads.

Slicer Mode (3.S/4.S+):

This version won’t happen until the developers code it out, so it may never happen, honestly. The next 8 beats will be given temporary individual cues for the corresponding track(s) of a corresponding deck.
Activated by Shift+Cue. In 4.S there will be four combinations for each track since each shift is an individual button and not sharing the same button ID#.
Overrides all velocity pads until Slicer mode is deactivated. When this happens, the 8 cues are also erased.
If you pass through the 8th beat in Slicer Mode, the crosshair enters the beginning of the region of the next 8 beats to be sliced. Basically, the cues are reassigned to the new 8 beats.
Holding shift+velocity pad plays the song in reverse, starting from the beat after the corresponding velocity pad’s beat.

LED system: Numerous variables and tests will probably do the trick but essentially this is a visual feedback system separate from the controls.

And that’s what I have planned for uhhh a really long time haha but yeah let’s make as much of this happen as possible woo

Sup again. I’m gonna be mapping out those buttons but here is a result of the debugging!

The velocity pads can come a little later after these parts are hammered out. They not only are touch-sensitive, they have four modes and a Shift key for each mode, so I have 842=64 velocity pads to work with!

Gonna have to assign functions to each MIDI button state. Thanks for the documentation so far y’all.

i’ve got Buffer overflow in Jog Wheel:

Yeah, it has kinda been a bitch and a half to get the jog wheels working.

//The wheel that actually controls the scratching DJCRMX2.wheelTurn = function (channel, control, value, status, group) { // See if we're scratching. If not, skip this. //if (!engine.isScratching(DJCRMX2.currentDeck)) // [FUT] if (DJCRMX2.scratching[group]) { var jogValue=0.0; // Spinning backwards = 127 or less (less meaning faster) // Spinning forwards = 1 or more (more meaning faster) if (value-64.0 > 0.0) jogValue = (value-128.0); else jogValue = value; engine.setValue("[Channel"+group+"]", "jog", jogValue/3); // Returns NULL??? engine.scratchTick(group,jogValue); } return; }

For whatever reason, I can’t get a variation of this part of the function to do what I want it to do. Basically it’s simple, just rotating the jog wheel without any pressure applied (so ScratchEnabled is false) so that the speed of the song dips as you spin the wheel. 0.1.0 had it working, but as you can see in 0.1.1, I got scratching to work properly but not jogging. So confusing.

So approximately how close to working is this preset? If someone with an RMX2 loaded it up would it mostly work or mostly be broken? I’m trying to get a sense for whether I should include it as a beta in 1.11.0 or if we should hold off till 1.11.1?

Well you just gave me a huge incentive to push to figure it all out! It is gonna work at a barebones level at its current state. It’s confirmed to be 95% usable.

If I can figure out the jog wheels, this current problem I have right now, it would be satisfactory to include in the next beta, but I would still be adding features after that, so I would check in on your next release to see what else I got working.

At the time of writing this here is what works:

  • Basic buttons like Play, Cue, Sync, File browsing, Fast seeking, headphones listening, load-to-deck, etc.
  • More basic sliders like Tempo sliders, crossfader, mixer sliders,
  • Scratching (gonna perfect it soon!)
  • EQ dials.
  • Effects Mode buttons.
  • Cues work, but you can’t reset them yet.

Here’s what I want to get right before your next release:

  • Jogging (relative speed slowing down and everything) <- Current project.
  • EQ Kill buttons
  • Pitch buttons
  • If I have time, some stuff involving the pads like disabling cues and setting up loops.

Fry here, just came saw and kicked some bug ass. It was hella ridiculous. It was mad proppin’ biznasty cap-poppin’ good insect squashin’ here in my creative dome hive. Aw shit I feel so accomplished it’s like surgery on a blind son of a bitch miracles everywhere man aw shit yeah.

Okay now that I’ve gotten my feet and nailed this bug, I’m confident that I can now make the rest of that exhaustive list of features happen bit by bit. It’s gonna be hella tight everyone will be like “pfft I ain’t gonna lay a grand and a half on a DDJ SX (great as it is) and accompanying software when $300 can get me close enough to the same thing and a wicked sick ass open source DJing program shit yeah cowabunga radical ass delirious flip top upper hip hop piledriver in the dirt for a cat nap it’s so good fresh hollaBACK BABY”

— ok wut —

Anyway guys you gotta do something about the scratching and jogging functions. One takes an int input for the current channel / deck / whatever, the other takes a String input. I had to do so mad unnecessary if/else statements to flip the “on” switch for the scratching while jogging was super simple. This is why the jog wheels are so confusing to map, it’s because the sets of commands for jogging and scratching have inconsistent arguments and the results include cumbersome, clock cycle wasting workarounds. Nag nag nag bitch bitch bitch etc.

If I were more versed in your dev tools, tho, I’d totally lend a hand with it, cuz it’d help latency a smidge imo. Well maybe I actually can with my current knowledge, I just have some low self confidence idk I don’t want to sound like a tool here I’m just saying that I’d like to pretty much fuck over everyone’s current midi mapping scripts sometime in the future for the sake of fulfilling my sick uniformity fetishes.

Haha – nice enthusiastic post :slight_smile:. I hear what you’re saying – the script APIs could definitely be more uniform and less confusing. Furthermore the int-based scratch arguments won’t work if you wanted to e.g. scratch a sampler so we should fix that in the future. The 1.11.0 release is coming very soon, there are just a few more bugs to go and then some blog posts to write / etc.

i did some mapping for the eq_kills using this if you have not done it yet…

0x90 0x28 [Channel1] filterHighKill 0x90 0x39 [Channel2] filterHighKill 0x80 0x28 [Channel1] filterHighKill 0x90 0x29 [Channel1] filterMidKill 0x80 0x39 [Channel2] filterHighKill 0x90 0x3a [Channel2] filterMidKill 0x80 0x29 [Channel1] filterMidKill 0x90 0x2a [Channel1] filterLowKill 0x80 0x3a [Channel2] filterMidKill 0x90 0x3b [Channel2] filterLowKill 0x80 0x2a [Channel1] filterLowKill 0x80 0x3b [Channel2] filterLowKill

I was trying to MIDI script it for the longest time and then realized the dumb reality that you could just do it the normal way.

            	<description>High Left Kill</description>
            	<description>Mid Left Kill</description>
            	<description>Low Left Kill</description>
            	<description>High Right Kill</description>
            	<description>Mid Right Kill</description>
            	<description>Low Right Kill</description>

… This doesn’t work, though. I don’t know why. It really should be working! The MIDI debugger is giving me those exact results when I use the kill buttons, and I believe the numbers here are being set right. The ctrl value should go to midino. The status is totally right, otherwise the jog wheels wouldn’t work. I can’t figure out why it’s not working.

Kill Treble Deck B 9x 39 Value Button-Toggling Output “7F” : Pressed – “00” : Released
Kill Medium Deck B 9x 3A Value Button-Toggling Output “7F” : Pressed – “00” : Released
Kill Bass Deck B 9x 3B Value Button-Toggling Output “7F” : Pressed – “00” : Released

whereas u have used 38, 39 and 3A i guess which is why its not working.
the midi nos for deck A are 28, 29, and 2A but for deck B are 39, 3A, and 3B.

Hope changing them like thi works out for you. :slight_smile:

Woah, heads up – None of it worked in the new beta, but it works in 1.10.x

Thanks, hellbrock, lemme fix that.

Progress Update: I am going to be uploading 0.1.3 now. It has gone under an organization overhaul in the MIDI department and it is near 1.0.0 release.

The only things left to add at this point are Microphone, HeadVol, Source 1 / Source 2 and Dial controls.

I am having difficulty activating/deactivating the Microphone with the button. Currently, its MIDI mapping is set to:

<control><!-- Microphone --> <status>0x90</status> <!-- ??? --> <midino>0x48</midino> <group>[Microphone]</group> <key>DJCRMX2.micSwitch</key> <description>Utilize Microphone</description> <options> <Script-Binding/> </options> </control>

Because the output of " amidi -p hw:0,0,0 -d " and pressing the Mic On/Off button is:

However, the --midiDebug output is giving me this output as it stands:

Here is the weirdest part: It sometimes works, sometimes does not. As in pressing the button will have a 50% chance of working or failing, every single time. This line here:

Occasionally appears after the always appearing

. So what if I replaced my current faulty mapping with some sort of adaptation of the sequence of bytes that appears every time?

I gotta go to work for like 7 hours, anybody want to test these bytes for LEDs?

B0 3A 7F B0 46 3F B0 47 09 B0 48 37 B0 49 59

I registered this account just to say thank you for your dedication on creating this custom mapping!
I have no experience with creating a mapper for this, but if i can help you out with anything i would be glad to assist.

I run Mint 13.

Keep up the good work!

Thanks, man.

Oh, look what I found in their provided controller manual.

They said they didn’t HAVE this available for me THOSE LYING BASTARDS I could have saved SO much time ajfslkfsa

Auch! Having this, maybe some code refactoring needed? Or is your work, up till now, solid enough ?

And here’s another case of “It’s just not fucking working?!”

MIDI Mapping:

<control><!-- LC1 Clear --> <status>0xB0</status> <midino>0x09</midino> <group>[Channel1]</group> <key>hotcue_1_clear</key> <description></description> <options> <normal/> </options> </control> <control><!-- LC2 Clear --> <status>0xB0</status> <midino>0x0A</midino> <group>[Channel1]</group> <key>hotcue_2_clear</key> <description></description> <options> <normal/> </options> </control> <control><!-- LC3 Clear --> <status>0xB0</status> <midino>0x0b</midino> <group>[Channel1]</group> <key>hotcue_3_clear</key> <description></description> <options> <normal/> </options> </control> <control><!-- LC4 Clear --> <status>0xB0</status> <midino>0x0C</midino> <group>[Channel1]</group> <key>hotcue_4_clear</key> <description></description> <options> <normal/> </options> </control>

–midiDebug Output:

So although I got a warning message for holding the shift button, Mixxx should theoretically still be receiving the proper signals from the pads. Basically, if you select Cue mode and press any of the pads ordinarily, the hotcues are set. This works. However, you should be able to hold shift and press the buttons again to remove the cues. This should also work, and everything appears to be registering, but for some reason, it just doesn’t! The cues are never cleared! This is stuff I can’t figure out. I don’t know how to utilize the Microphone button, the shift button, or the alternative pads! If I can’t take control of these pads, then I’m going to be hitting this controller’s limit really soon. The only thing I can control now are the LEDs.

Haha it’s fine, dude. Everything listed in this picture is already mapped out. It’s the stuff that’s NOT in the picture that I need help with.

Oke. I’ll be going on a vacation next week and after that I would like to help you out with this stuff. I’ll be using the rest of this week to get to understand how to create a custom mapper and how to debug this all.
Maybe I can be of any help :wink:.