mixxx icon indicating copy to clipboard operation
mixxx copied to clipboard

Fix controller mapping for Pioneer DDJ-SB

Open tonell-m opened this issue 1 year ago • 5 comments

Hi all,

I'm using Mixxx with a Pioneer DDJ-SB but the built in controller mapping was not fully working properly so I've fixed the following issues in this PR:

  • When clicking the rotary selector to preview a track an error message was showing up because the script was missing a rotarySelectorClick handler.
    • Clicking the encoder now loads and starts the selected track in the preview deck.
    • Clicking it a second time without changing the selected track will pause playback.
    • Preview playback now starts by default in the middle of the track similarly to DDJ-SB2 behaviour. The playback start position can be edited in the script's user options.
  • The FX selection buttons were not working (clicking them did nothing), so the FX knobs could only control the Mix knob of each unit
    • For that I've removed the existing code for handling the FX units and replaced that with an implementation using the Components library

I've tested this updated script on Mixxx 2.3, 2.4 and 2.5 (all built from source) on macOS 12.6.7 (Monterey) using my DDJ-SB-L and it all seems to be working smoothly.

This is my first time contributing so let me know if some things are missing / need to be changed 🙂

tonell-m avatar Nov 09 '23 19:11 tonell-m

Welcome at Mixxx! As a first-time contributor we need you to sign the Mixxx Contributor Agreement and comment here when you have done so. It gives us permission to distribute your contribution under the GPL v2 or later license and the Apple Mac App Store. It is also helpful for us to have contact information for contributors in case we may need it in the future.

JoergAtGithub avatar Nov 09 '23 19:11 JoergAtGithub

Done!

tonell-m avatar Nov 09 '23 19:11 tonell-m

Thanks for your contribution. I changed the base branch to 2.4, as we won't do another 2.3 release. Could you please check if the mapping still matches the behavior documented in manual (https://manual.mixxx.org/2.4/en/hardware/controllers/pioneer_ddj_sb) and file a PR for the manual repository if changes are needed?

Holzhaus avatar Nov 10 '23 19:11 Holzhaus

@Swiftb0y @ronso0 I've updated my implementation to take all your comments into consideration, I would recommend you look at the final result instead of going commit per commit as there has been a bit of trial and error 😅

The final mappings are the following:

  • Browser:
    • Turning rotary selector: [Library] MoveVertical
    • Clicking rotary selector: [Library] GoToItem
    • Shift clicking rotary selector: [PreviewDeck1] LoadSelectedTrackAndPlay
    • Shift turning rotary selector: moves [PreviewDeck1] playposition around to allow scrolling through the previewed track
    • Clicking BACK button: [Library] MoveFocusBackward (I think it makes more sense than MoveFocusForward as it directly selects the tree view when the focus is on the track list, which is usually what we want)
    • Shift clicking BACK button: toggles [Skin] show_maximized_library (as the BACK button shift label on the controller is "PANNEL")
  • Effect units:
    • Clicking FX buttons: toggles [EffectRack1_EffectUnitX_EffectX] enabled
    • Shift clicking FX buttons: changes [EffectRack1_EffectUnitX] focused_effect
    • Holding the shift button updates the FX buttons LEDs to show the currently selected effect

If you're okay with these mappings I'll submit a PR for updating manual to reflect those changes.

I've also took the opportunity of making this PR to update various usages of deprecated functions / control names. Let me know if you have further comments / questions!

tonell-m avatar Nov 17 '23 16:11 tonell-m

Oh sorry to not review this in time. Now I see a conflict has developed. @Swiftb0y how is the state here?

daschuer avatar Feb 11 '24 10:02 daschuer