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

Pioneer DDJ-200: fix hotcue button release #3742

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

fkbreitl
Copy link
Contributor

@fkbreitl fkbreitl commented Mar 23, 2021

This fix prevents triggering a hotcue when a hotcue button is released.

@ronso0
Copy link
Member

ronso0 commented Mar 23, 2021

there will not be another 2.2 release.
Please rebase onto 2.3

Also it's helpful for reviewers if you a description of the issue and how you solved it.

@fkbreitl
Copy link
Contributor Author

Are you sure you don't want to have version 2.2 or 2.2.4 fixed anyway?
Otherwise this version will remain broken.
At least it would be fixed in the repo and someone could compile it himself.

@Swiftb0y
Copy link
Member

Swiftb0y commented Mar 23, 2021

We're very close to the release of 2.3 so we decided not to do another 2.2.* release. Just rebase on 2.3.
Since its only Javascript anyways, you can put your changes on the forum and people will be able to patch their own installations without having to recompile.

@Holzhaus
Copy link
Member

Holzhaus commented Mar 23, 2021

I don't have a problem with merging it into 2.2 as long as the changes passes our 2.3 CI Linters (we already have unreleased commits in the 2.2 branch that will end up in 2.3). We can just merge 2.2 into 2.3 after merge.

But as @Swiftb0y already said, there won't be a 2.2.5 release (mainly because 2.2 is completely broken on macOS) so the vast majority of users won't notice it because I doubt that they are going to compile the 2.2 branch themselves.

var deckNo = script.deckFromGroup(group);
midi.sendShortMsg(0x90 + deckNo - 1, 0x0B, 0x7F *
engine.getValue(vgroup, "play")); // set play LED
if (value) { // only if button pressed, not releases, i.e. value === 0
Copy link
Member

Choose a reason for hiding this comment

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

I think we should early exit here:

Suggested change
if (value) { // only if button pressed, not releases, i.e. value === 0
if (!value) {
return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Generally this would be an option, but in the rest of the code I was doing it this way.
So it could be a bit inconsistent and confusing if at these two places I change the coding style.
So to go with minimal changes and maximum consistency I would suggest to keep it as is.

Copy link
Member

Choose a reason for hiding this comment

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

Another alternative solution would be to just unbind the note-off midi in the XML.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. How?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Swiftb0y Buttons might be used for different purposes, i.e. for layering. I don't recommend to ignore MIDI signals in the XML, which should unconditionally forward signals to JS. Except those controls that are connected directly to COs. Subsequent filtering in JS is more versatile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, as I understand this discussion, it should be fine either way (Holzhaus or mine).
So I would like to suggest to pull it as is.
Then I will mark this conversation as resolved, to proceed with the fix.
Is this ok?

Copy link
Member

Choose a reason for hiding this comment

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

Yes. We'd still prefer if you could rebase on 2.3 though so the newer linters run. There is no benefit in merging into 2.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but Holzhaus also said it shouldn't hurt to merge it from 2.2.
Since we are talking just about just one line, the linters will run.

Copy link
Member

Choose a reason for hiding this comment

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

Checked it out locally, pre-commit checks passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!

@fkbreitl fkbreitl changed the title Fix for hot cue button release Fix for hotcue button release Mar 23, 2021
@ronso0 ronso0 changed the title Fix for hotcue button release Pioneer DDJ-200: fix hotcue button release Mar 24, 2021
@Holzhaus Holzhaus changed the base branch from 2.2 to 2.3 March 29, 2021 18:30
@Holzhaus Holzhaus merged commit 70c263f into mixxxdj:2.3 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants