Hercules DJControl Starlight

Here is the mapping file for the Hercules DJControl Starlight for the latest version of Mixxx (2.20):

Decks:

Sync = Sync lock // SHIFT + SYNC = Sync master

Cue = Cue point // SHIFT + CUE = Return to beginning of loaded song.

Play = Play/Pause // SHIFT + Play = Cue Stutter

Vinyl = Scratch On/Off (Default: ON)

PADS - Hot Cue:

Set and trigger Hot Cue 1-4 // Shift + Pad = Delete Hot Cue 1-4.

PADS - Loop:

Beatloop 1/2 / 1 / 2 / 4 beats

PADS - FX Mode:

FX 1-3 on/off // Shift + Pad = FX 1-3 Select
PAD 4 = FX Rack 1/2 On/Off (Deck A/B respectively)

PADS - Sample:

Trigger Sampler 1-4 (Deck A)
Trigger Sampler 5-8 (Deck B)

Base LED:

Link to VU Meter for each deck respectively.

Other controls as labeled.
DJControl_Starlight_script.js (5.54 KB)
DJControl_Starlight.midi.xml (34.6 KB)

A little update to the mapping:

  • The Vinyl button now works to enable/disable the scratch on the jogwheels (default is ON)

DJControl_Starlight.midi.xml (34.4 KB)

DJControl_Starlight_script.js (5.43 KB)

Otherwise, a Wiki page has been created:

https://mixxx.org/wiki/doku.php/hercules_dj_control_starlight

Thanks for contributing this! I tested it out and it works great. Looking forward to being able to use MIXXX with my DJControl Starlight :slight_smile:

I noticed a couple of minor issues:

  • I had to name the XML file DJControl_Starlight_MIDI_1.midi.xml in order for MIXXX to recognize it.
  • The first time you press the Vinyl button after MIXXX starts up, it doesn’t do anything (but the second press toggles vinyl mode off as expected).
  • The trim knob values aren’t loaded on startup, only the first time you adjust the trim (but the crossfader and tempo sliders work as expected).
  • The master volume control isn’t reflected in the UI (but it still works).

I’ll take a stab at fixing these and upload a new version of the files if I’m successful.

I fixed the first 3 issues. I’m not sure the 4th issue is a real bug, since it seems like the master volume in MIXXX is intended to be distinct from the master volume knob on the controller (you can adjust both independently and they both affect the output volume).

I also fixed some formatting issues:

I also attached a patch with the only the logic changes (no formatting changes), since it’s hard to diff due to the formatting changes.
changes.patch.txt (2.25 KB)
DJControl_Starlight_script.js (5.55 KB)
DJControl_Starlight_MIDI_1.midi.xml (49.3 KB)

Thanks for the input Kerrick. I was actually fighting with some of these issues, and not being a coder by nature, your changes and suggestions will certainly help with future updates and mapping.

Regarding the Master Volume, the one on the Starlight works directly on the hardware, and although it also sends MIDI data, I don’t really se the point of mapping it and having two layers of level controlled by one knob. I’d rather set it to an appropriate level in software and keep the hardware for what it is.

Re: master volume, sounds good.

I’m going to submit the mapping to the main MIXXX repo so that the DJControl Starlight will work out-of-the-box with MIXXX. Is that OK?

I also noticed a few other potential issues / inconsistencies with Serato, but I need to double-check on Serato when I get home. Will keep this thread updated with anything I find out.

I found a few more issues:

  • Seek mode (with [Shift]) on the jogwheels doesn’t work.
  • Jump to beginning of song ([Shift] + [Cue]) should preserve playing/not playing state, instead of always going into playing state.
  • Cue Master and Cue + Mix don’t work.

Also, I think another change that might be worth making is switching the loop pads to 1, 2, 4, and 8 beat loops. This matches Serato, and I also use 8 beat loops a lot in my mixes so it would help me out :slight_smile:

I’ll take a crack at fixing all these.

I didn’t do a carbon copy of the Serato configuration so:

  • Seek mode (with SHIFT) was not mapped;
  • I used the start_play mapping to jump to the beginning of the song, so this is the expected behavior of the function. If you want to tackle something in the script, be my guest;
  • As for Cue Master and Cue + Mix, they work for me (using SHIFT). I think the default skin does not show these, so I was always testing with latenight.
  • And I agree with the beatloop length. The mapping came from another controller and I forgot to change the length :unamused:

I’ve already submitted the previous changes (github.com/DJPhatso/mixxx/tree/ … _Starlight), but any new and collaborative inputs are welcomed, and will only help me improve on the other mappings I’ve got going.

Nice! So to get the mapping merged into Mixxx, you should move the files into the res/controllers folder, then open a pull request against Mixxx by going to this URL.

To do that first step, I’m not sure you can do it through the website; I think you need to use Git on the command line. You can do that by running these commands:

# The next 3 commands are setup, maybe you've already ran them.
git clone git@github.com:DJPhatso/mixxx.git
cd mixxx
git checkout Hercules-DJC_Starlight

# Move the files
git mv DJControl_Starlight* res/controllers/

# Commit the changes locally
git commit -m 'Move files to res/controllers'

# Push the changes to GitHub
git push

If you haven’t already set up Git on your computer, you can do that by following the instructions here.

Thanks again for the precise information. I was not expecting to go through that many hoops by simply creating mappings, but I’ll have to look into that at some point and be good to the community :slight_smile:

Heya, I’ve got one of these controllers on the way, and am fairly good with git — let me know if I can help with anything, or do the work to get this merged :slight_smile:

Thanks. I did the merge and the pull request (properly I believe :slight_smile: ), so any changes and improvement are up to anyone wanting to get involved now.

Hello,

I am hesitating between the purchase of a DJ2GO2 and this controller. [Any help in choosing is great, but I’ll keep my post precise on a limited question].
What I miss on the Starlight would be a Browse button to scroll through crate lists, enter them, scroll though song lists, and move back up to the crate level.
Can I emulate this ? For instance, can I add code to scroll crates on SHIFT-LEFTJOG and scroll songs on SHIFT-RIGHTJOG ?

Is it either that
[A] Can SHIFT be detected independently on any/all controls ? for instance could I code something specific on SHIFT-TEMPO slider or SHIFT-VOLUME rotative control ?
or
[B] SHIFT is never seen beyond the DJControl. A press on SHIFT is not sent over MIDI. The controller is the only one detecting SHIFT and sending alternate codes only on the controls that were designed to have a SHIFT alternate. ?

Would there be a neat way to implement a file browser using the pads in last resort ?
Thank you.

I know the feeling. I miss browser controls as well, but given that this is something that can done with the keyboard, I take it for what it is rather than a controller that does everything.

That being said, yes, you can map the controls to whichever functions you want. I made the mapping so that it would match the one from Serato as much as possible, but since I don’t personally care about scratching, let’s just say its not a functions I would have included for my personal usage.

As for your question:

  • The SHIFT button sends its own MIDI message;

  • Most controls are affected by the SHIFT, and send the same message on different MIDI channel when activated. For example, PLAY Deck A is 91 07 in normal mode and 94 07 in SHIFT mode.

Thank you. It answered my questions.

First off, thanks to everyone who’s contributed to mapping this controller. I don’t see anyone else having issues with the jogweel configuration but I receive the following error message: “Uncaught exception at line 1 in passed code: ReferenceError: Can’t find variable: DJCStarlight” - any time I touch the jogwheels or vinyl button on my starlight controller. All other mapped controls (volume, bass/filter, hot cues, etc) are working fine… Thanks in advance for any help

Hi,

Glad to help. Actually, the mapping was approved, reworked and will be included in future releases. :slight_smile:

In the meantime, be sure to use the latest files (posted by @Kerrick):

download/file.php?id=2512

download/file.php?id=2511

I just got started with Mixxx and the Starlight controller. I tried the latest preset and most things seem to work fine but the CUE MASTER and CUE + MIX buttons don’t behave the way I would expect.

I thought SHIFT and CUE MASTER would be a toggle that put the master output into the headphones and ignored the headphone output status of both decks. It appears to be a momentary switch that will play the master output into the headphones as long as the buttons are being held down.

I thought SHIFT and CUE + MIX would be a toggle that put the master output as well as any deck that has headphone output enabled. It appears to be a toggle that switches SPLIT CUE on and off.

I thought pressing the SHIFT button would light up CUE MASTER or CUE + MIX if enabled. It appears that it does not do that.

Are these the expected behaviors?

Is it possible to make it function the way I thought it would, which is like it functions in Serato Lite?

Following up on this.

I found that switching the CUE MASTER button from headMix to headMix_minus_toggle made it function like Serato Lite so that is solved.

I tried headMix_toggle for the CUE + MIX button but that toggles the headphone mix between 0 and 1 which is closer but not quite there. If I can find a way to toggle between -1 and 0, that would make it function like Serato Lite.

I don’t have any clue what to do to get the buttons to light up if enabled when the SHIFT button is pressed.

Well, I found a solution. There may be a more elegant way to accomplish this, but it does seem to work like Serato now. Here’s the javascript I came up with.

This is for the CUE MASTER button

DJCStarlight.cue_master = function (channel, control, value, status, group) { if (value === 127) { // toggles headMix between -1 and 1 var headMix_new_value = (engine.getValue("[Master]", "headMix")> 0) ? -1 : 1; engine.setValue("[Master]", "headMix", headMix_new_value); if (headMix_new_value === 1) { // turn on LED midi.sendShortMsg(0x91,0x0C,0x7F); // and turn off other LED midi.sendShortMsg(0x92,0x0C,0x00); } else { // turn of LED midi.sendShortMsg(0x91,0x0C,0x00); } } };

This is for the CUE + MIX button

DJCStarlight.cue_mix = function (channel, control, value, status, group) { if (value === 127) { // toggles headMix between -1 and 0 var headMix_new_value = ~!engine.getValue("[Master]", "headMix") + 1; engine.setValue("[Master]", "headMix", headMix_new_value); if (headMix_new_value === 0) { // turn on LED midi.sendShortMsg(0x92,0x0C,0x7F); // and turn off other LED midi.sendShortMsg(0x91,0x0C,0x00); } else { // turn of LED midi.sendShortMsg(0x92,0x0C,0x00); } } };

And this is for the SHIFT button to light the LED of whichever option is enabled.

[code]DJCStarlight.shift = false;

DJCStarlight.shiftButton = function (channel, control, value, status, group) {
// Note that there is no ‘if (value === 127)’ here so this executes both when the shift button is pressed and when it is released.
// Therefore, MyController.shift will only be true while the shift button is held down
DJCStarlight.shift = ! DJCStarlight.shift; // ‘!’ inverts a boolean (true/false) value

if (DJCStarlight.shift) {		
	switch(engine.getValue("[Master]", "headMix")) {
		 case 0:
		 	// CUE + MIX enabled, turn on right LED
		 	midi.sendShortMsg(0x92,0x0C,0x7F);
		 	// and turn off left LED
		 	midi.sendShortMsg(0x91,0x0C,0x00);
		 	break;
		 case 1:
		 	// CUE enabled, turn on left LED
		 	midi.sendShortMsg(0x91,0x0C,0x7F);
		 	// and turn off right LED
		 	midi.sendShortMsg(0x92,0x0C,0x00);
		 	break;	
		 default:
		 	// neither CUE option enabled, turn off left and right LEDs
		 	midi.sendShortMsg(0x91,0x0C,0x00);
		 	midi.sendShortMsg(0x92,0x0C,0x00);
	}
} else {
	// reset light to current status of PFL
	midi.sendShortMsg(0x91, 0x0C, engine.getValue("[Channel1]", "pfl"));
	midi.sendShortMsg(0x92, 0x0C, engine.getValue("[Channel2]", "pfl"));
}

};[/code]