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

fix ToggleSelectedSidebarItem control of the Numark Mixtrack (Pro) II #13543

Open
wants to merge 1 commit into
base: 2.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion res/controllers/Numark Mixtrack 2.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
</control>
<control>
<group>[Playlist]</group>
<key>NumarkMixTrackII.toggleDirectoryMode</key>
<key>NumarkMixTrackII.toggleSelectedSidebarItem</key>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another toggleDirectoryMode binding above (0x77), is that the Back button?

That could use [Library],MoveFocus

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idd, 0x77 is the back button, 0x76 is pressing the big browse button.

<status>0x90</status>
<midino>0x76</midino>
<options>
Expand Down
9 changes: 8 additions & 1 deletion res/controllers/Numark-Mixtrack-2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//
// Known Issue:
// - Cue Point Led address is missing
// - ToggleSelectedSidebarItem control is not working
// - After activating brake, Play button is not working

// 10/26/2016 - Changed by Shaun O'Neill
Expand All @@ -24,6 +23,8 @@
// Low frequency filter now doubles as filter effect control via shift key.
// 03/02/2018 - Changed by ninomp
// Adapt the mapping for Mixxx 2.1
// 08/07/2024 - Changed by timkuijsten
// fix the ToggleSelectedSidebarItem control


function NumarkMixTrackII() {}
Expand Down Expand Up @@ -158,6 +159,12 @@ NumarkMixTrackII.selectKnob = function(channel, control, value, status, group) {
}
}

NumarkMixTrackII.toggleSelectedSidebarItem = function(channel, control, value) {
if (value) {
engine.setValue("[Playlist]", "ToggleSelectedSidebarItem", 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [Playlist] controls are deprecated, but they still work
It's recommende to use the [Library] instead.

IIUC the Back button should move focus between the library widgets (search, sidebar, tracks).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting me know. I might be able to look into this at some point in the future, but not right away.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see with the propsed changes the 'directory mode' won't work as before. Now it would trigger move focus (like Tab key) and call updateDirectoryAndFileLeds which uses directory_mode.

Nowadays we have [Library],focused_widget
I.e. directory_mode is not required anymore and updateDirectoryAndFileLeds could use [Library],focused_widget: FOLDER whould be lit if it's 2 and FILE if it's 3.

Are yo motivated to do that refactoring?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might like to do that at some time in the future but I can't promise. Maybe we can get this simple fix in so that controller based navigation works again? Without this fix the mouse or keyboard has to be used to go into a directory/folder when browsing the library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oka, given my experience that "might like to do that at some time in the future" likely never happens due to shifted prios etc. (myself included ; ) and the fact that it'll take some weeks or months until 2.4.2 with the fixed mapping will be released (shortly before 2.5 I guess), we might as well try to fix it now.

If you don't have time/motivation to fix it yourself (potentially with another round of review) I may provide a commit this week, but I need you to test it (I don't have access to a Mixtrack Pro II).

Copy link
Author

@timkuijsten timkuijsten Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I just bought a Pioneer DDJ-FLX4 so I won't be creating the patch for the Mixtrack. But, as long as I have not given back the Mixtrack to my friend, I can test a patch if you have it.

p.s. I see the behaviour I implemented for the Mixtrack differs from the DDJ, if you press the browse button on the DDJ it toggles between files, search, folders. So for the DDJ I also don't have a way on the controller to open/collapse a folder in the folder view.

}
};

NumarkMixTrackII.toggleDirectoryMode = function(channel, control, value, status, group) {
// Toggle setting and light
if (value) {
Expand Down