Read the actual position in the track (for jogwheel loop)

Hi, i’ve a problem. I’m mapping my cdj and I want to make the jogwheel display working properly also when I enable a loop. (it should return to the start position of the loop like the waveform)
But this seems impossible because there isn’t any control that permits to know when track returns to the loop start position and there isn’t any way to know the actual position if the track. (Or am I wrong?)
Thank you for any help

Hej @fedemille

To get an idea what yo are up to we need a bit more info:

  • which CDJ models do you use?
  • how did you get them connected to Mixxx so far?

It is a modified version of the cdj 800. It communicates with mixxx using midi messages, like any other controller.
I mapped more or less everything but now I miss the jog display. For the normal playing I had no problems, but now with the loop I don’t know when I have to send the midi message to return to the loop start position, so to synchronize mixxx with the jog display

There are contols that tell you the position as well as the loop start position. Start Mixxx with --developer and open the developer tools, then put position into the search bar to find them.

okay, you mean that circular display inside the jogwheel.
yes, as @hlzhs mentioned, that can be calculated. is feasible with only one loop being stored in Mixxx right now, but later on…

We could simply create a control that holds the spinny position, couldn’t we?
@fedemille Did yo have a look at the other CDJ mappings in https://github.com/mixxxdj/mixxx/tree/master/res/controllers or here in the controller forum? Maybe someone else found a solution already.

If it helps, here is the calculation for the Jog LEDs on my Denon MC7000

In the MC7000.init section it is defined to have the JogLEDs connected to the “playposition” control like this, repeat for all channels…

engine.makeConnection("[Channel1]", "playposition", MC7000.JogLed);

the actual position for the LED is calculated as shown here:

/* LEDs around Jog wheel */
MC7000.JogLed = function(value, group) {
    // do nothing before track starts
    if (value < 0) return;

    var deckNumber = script.deckFromGroup(group),
        trackDuration = engine.getValue(group, "duration"),
        position = value * trackDuration / 60 * MC7000.scratchParams.recordSpeed,
        // LED ring contains 48 segments with each LED activated by the next even number
        LEDmidiSignal = 48 * 2,
        activeLED = MC7000.isVinylMode[deckNumber - 1] ? Math.round(position * LEDmidiSignal) % LEDmidiSignal : value * LEDmidiSignal;

    midi.sendShortMsg(0x90 + deckNumber - 1, 0x06, activeLED);
};

I even gave 2 values for the JogLED position. If the VINYL Mode is active then it shows the rpm value like the 33.3 rpm. If VINYL is off then the position inside the track is shown by those LEDs.

You also need to mind the resolution of the Jogwheel because this influences the position as well. I experimented using resolution values so to match the spinny movement from the GUI as well as the LEDs follow the same angle than the Jog while scratching etc.

1 Like