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

Slip button, tap tempo, strip search, FX button extras #1

Merged
merged 11 commits into from
Apr 12, 2018

Conversation

eigengrau
Copy link
Collaborator

Add support for slip button, tap tempo button, jog wheel strip search.

@eigengrau
Copy link
Collaborator Author

I was gonna reply to you on the forums for some additional discussion, but I’m still waiting for the activation mail. So here’s what I got for now.

Tap tempo is a bit unexpected, since Mixxx expects at least 8 taps before it will set the tempo. I was always tapping four and got unexpected results, so bear that in mind.

@eigengrau
Copy link
Collaborator Author

Incidentally, is there a specific reason the XML bindings are limited to deck 1? For consistency’s sake the commits also only add deck 1 for now.

@Lykos153
Copy link
Owner

Lykos153 commented Apr 9, 2018

Thank's a lot! I hope I'll be able to look into it today or tomorrow.

Incidentally, is there a specific reason the XML bindings are limited to deck 1? For consistency’s sake the commits also only add deck 1 for now.

It was actually just laziness. I wanted to keep the XML file short while I was still experimenting with it, so I had to apply modifications only once. I was planning to just copy everything for the second deck when I'm finished.

@Be-ing
Copy link

Be-ing commented Apr 9, 2018

Could one of you open a pull request for the upstream mixxxdj/mixxx repository? It's okay if the mapping is not complete yet, just put "[WIP]" (work in progress) in the title of the pull request. This will make it easier for other people to find the discussion.

@Lykos153
Copy link
Owner

Lykos153 commented Apr 9, 2018

Done: mixxxdj#1595

@Lykos153 Lykos153 self-requested a review April 9, 2018 21:19
@eigengrau
Copy link
Collaborator Author

Have some free commits!

I don’t usually do any JS, so any nits welcome.

Since the shift button applies both to the FX racks as well as the decks, the
button is now a property of the controller instance.

- Shift+FX₁{1…4} ⇒ Cycle selected effect
- Shift+Level-knob ⇒ Control FX rack super knob
@eigengrau eigengrau changed the title Slip button, tap tempo, strip search Slip button, tap tempo, strip search, FX button extras Apr 10, 2018
- Shift+Cue (“tap tempo”), short ⇒ tap tempo, align beat grid to play-back
  position
- Shift+Cue (“tap tempo”), long ⇒ align beat grid to other deck
@eigengrau
Copy link
Collaborator Author

eigengrau commented Apr 11, 2018

So, the two last commits are ideas I had on some behavior that isn’t directly labeled on the controller.

  • Beat grid (0bd482c)

    1. This dual-binds the tap tempo button. Since I expect you’d normally tap BPM in sync with the beat, this will also align the beat grid with your tap. The caveat is that if you want to align the grid without tapping a new BPM, you need to wait 2 seconds until you can do it again, in order to not make it register as a BPM-tap. We might be able to improve this.
    2. Long holding tap tempo will align the beat grid to the other deck.
  • Key shift (067e97f) – Since the key lock button is comfortably close to the param-buttons and is already associated with musical key, the idea is to long hold key lock and press up/down to shift musical key. Long hold and press both up/down together to reset the key.

Note that 067e97f also commits my current work-around for the Keylock-LED reset issue and doesn’t yet use the components framework. We could refactor that later if we want to keep this behavior.

WDYT?

@eigengrau eigengrau force-pushed the Mapping-DJ-202 branch 2 times, most recently from 7c694b3 to 037cd2b Compare April 11, 2018 15:26
@@ -62,6 +62,34 @@ DJ202.Deck = function (deckNumbers, offset) {
},
});

this.paramUp = function (channel, control, value, status, group) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since the MIDI control is supplied, paramUp and paramDown could probably be merged into one binding.

Copy link
Owner

Choose a reason for hiding this comment

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

For now that's true. We'd probably have to rethink this in case we want to use them for layering the performance pads #5

@eigengrau
Copy link
Collaborator Author

eigengrau commented Apr 11, 2018

Key shift (037cd2b) – Since the key lock button is comfortably close to the param-buttons and is already associated with musical key, the idea is to long hold key lock and press up/down to shift musical key. Long hold and press both up/down together to reset the key.

Actually, I failed to notice that the param buttons send another note when the pad section is in another state. So these should be bound, too. Edit: amended.

- Key-Lock (long) + Param{Up,Down} ⇒ Shift musical key
- Key-Lock (long) + ParamUp + ParamDown ⇒ Reset musical key
As per the wiki, ‘SelectTrackKnob’ is deprecated.
• Push ⇒ Move focus forward
• Shift+Push ⇒ Move focus backward
@eigengrau eigengrau force-pushed the Mapping-DJ-202 branch 2 times, most recently from dddd386 to ebf6278 Compare April 11, 2018 20:12
@eigengrau
Copy link
Collaborator Author

eigengrau commented Apr 11, 2018

3b2e934 is a wart for now. Since components.SyncButton doesn’t have double tap, and since we need to fudge around with the LEDs, this brings in a lot of code that should be generalized and put somewhere else. Everything not related to the LEDs and double Tap is the same logic used in components.SyncButton.

• Sync-Button (double-tap) ⇒ Reset deck BPM to file BPM
Copy link
Owner

@Lykos153 Lykos153 left a comment

Choose a reason for hiding this comment

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

nvm

Copy link
Owner

@Lykos153 Lykos153 left a comment

Choose a reason for hiding this comment

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

nvm

@@ -547,6 +547,15 @@
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>slip_enabled</key>
Copy link
Owner

Choose a reason for hiding this comment

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

For our aim to stay as close as possible to the labeling, I would like to map this inside the script so we can have both vinyl/slip. We could add a variable like "invertVinylSlipButton" for the user to configure the default (unshifted) behaviour.

script.triggerControl(group, isShifted ? 'ScrollDown' : 'MoveDown');
}
break;
case 0x9F: // Push.
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe we could add a way to open/close tree leaves. Eg. Push: Move focus
Shift+Push in tree view: Open leaf
Shift+Push in playlist view: Load track into preview deck

Or we could use the load buttons, as they're not used in the tree view.

this.isDoubleTap = false;
}, true);
} else {
engine.setValue(this.group, 'sync_enabled', 0);
Copy link
Owner

Choose a reason for hiding this comment

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

I just experienced a glitch after a double tap while sync was enabled. Can't reproduce it right now, so just leaving a note to maybe investigate this later.

});

this.tapBPM = function (channel, control, value, status, group) {
if (value == 127) {
bpm.tapButton(script.deckFromGroup(this.currentDeck));
Copy link
Owner

Choose a reason for hiding this comment

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

You're right. I got some unexpected results, too. Let's improve this later on.

@Lykos153
Copy link
Owner

Lykos153 commented Apr 12, 2018

Sorry for getting back to you so late. Was on the road, to I didn't have the controller to check it out. Good work! Just added some comments where I think we could still improve.

Thinking of your initial question, I guess it's time to map the right side as well. Now that it starts to be actually usable, it's very unsatisfying to only have the left half of it ;) . Did you already map it in your local xml? If not, I'm gonna do this tomorrow.

I don’t usually do any JS, so any nits welcome.

Neither do I, so same goes for you ;)

@Lykos153 Lykos153 merged commit 2c866cd into Lykos153:Mapping-DJ-202 Apr 12, 2018
@eigengrau
Copy link
Collaborator Author

Sorry for getting back to you so late. Was on the road, to I didn't have the controller to check it out.

No worries, there’s no rush.

Did you already map it in your local xml? If not, I'm gonna do this tomorrow.

Most of them, except for the pads, iirc. I noticed I messed up the indentation though, because I had Emacs’ nXML-mode set to the default of two spaces, not four.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants