Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numark Mixtrack (Pro) 3 controller mapping - smartPFL incorrect LED behaviour and library browsing focus bug #14165

Open
endcredits33 opened this issue Jan 12, 2025 · 0 comments
Labels

Comments

@endcredits33
Copy link

endcredits33 commented Jan 12, 2025

Bug Description

Reporting 2 bugs with the Numark Mixtrack (Pro) 3 controller mapping. This is my very first time doing this so apologies if the formatting is off. Please note I am using an updated scripts.js file from a recent pull request with other fixes (#13659)

First bug: smartPFL is a configurable variable to automatically activate the Cue/PFL button on a deck when a track is loaded and deactivate it on the other deck (https://manual.mixxx.org/2.5/en/hardware/controllers/numark_mixtrack_pro_3#load). This also controls the LED of the PFL button on the controller itself.

If the variable is set to false, the PFL button within Mixxx is not activated (correctly), however the corresponding LED still lights up on the controller itself. This should not be happening and the LED should remain unlit if smartPFL is disabled, unless it has been manually activated.

I believe the solution is as follows:

Delete lines 1989-2004 below. Loading a track should not turn on the headphones LED as this interferes with normal usage of PFL.

NumarkMixtrack3.OnTrackLoaded = function(value, group, control) {
    var deck = NumarkMixtrack3.deckFromGroup(group);

    if (value !== 0) {
        if (!deck.faderstart) {
            // Light up the PFL light indicating that a track is loaded
            deck.LEDs["headphones"].onOff(ON);
        } else {
            // Flash up the PFL light button indicating that a track is loaded with fader start
            deck.LEDs["headphones"].flashOn(300, ON, 300);
        }
    } else {
        // Switch off the PFL light indicating that a track is ejected
        deck.LEDs["headphones"].onOff(OFF);
    }
};

Delete line 973 as it's now an unused control
"track_samples": "NumarkMixtrack3.OnTrackLoaded",

Delete line 1163 as it switches on the PFL led unconditionally
deck.LEDs["headphones"].onOff(ON);

Second bug: The current browse knob behaviour allows scrolling through the sidebar if Shift is held down. If the browse knob is pushed when Shift is held, the selected sidebar item is expanded. The problem is if you attempt to expand the Tracks, Auto DJ or Playlists element then the focus is shifted to the Tracks table and you have to refocus on the sidebar with your mouse/keyboard. Adding engine.setParameter("[Library]", "focused_widget", 2); and engine.setParameter("[Library]", "focused_widget", 3); improves the behaviour as it refocuses the sidebar when using shift+Browse:

NumarkMixtrack3.BrowseKnob = function(channel, control, value, status, group) {
    var shifted = (
        NumarkMixtrack3.decks.D1.shiftKey || NumarkMixtrack3.decks.D2.shiftKey ||
        NumarkMixtrack3.decks.D3.shiftKey || NumarkMixtrack3.decks.D4.shiftKey
    );

    // value = 1 / 2 / 3 ... for positive //value = 1 / 2 / 3
    var nval = (value > 0x40 ? value - 0x80 : value);

    // SHIFT+Turn BROWSE Knob : directory mode --> select Play List/Side bar item
    if (shifted) {
        engine.setParameter("[Library]", "focused_widget", 2);
	engine.setValue("[Playlist]", "SelectPlaylist", nval);
    } else {
        engine.setParameter("[Library]", "focused_widget", 3);
	engine.setValue("[Playlist]", "SelectTrackKnob", nval);
    }
};

Version

2.5.0

OS

macOS 15.2

@endcredits33 endcredits33 changed the title Numark Mixtrack (Pro) 3 controller mapping - disabling smartPFL variable causes incorrect LED behaviour Numark Mixtrack (Pro) 3 controller mapping - smartPFL incorrect LED behaviour and library browsing focus bug Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant