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-400: Cycle through focused effects #4662

Closed
wants to merge 3 commits into from
Closed

Conversation

etileb
Copy link

@etileb etileb commented Feb 5, 2022

New FX section.

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

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

Please rebase on the 2.3 branch. This should also fix some pre-commit issues.

We prefer to merge fixes and improvements of mappings into the current release version and release them with the next minor version.


engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 3);
var focusfx = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect")+1;
if (engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect")===3){
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a short comment what this code does. I guess cycling through the 2 focused effects 1 and 2?

Please also check the coding style, i.e. add spaces and indentation.

Copy link
Author

Choose a reason for hiding this comment

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

I commented everything now, my first contrib on GitHub, sorry.

@uklotzde
Copy link
Contributor

uklotzde commented Feb 5, 2022

As a First-time contributor please also sign our Contributor License Agreement which allows us to distribute your code in the Apple App Store (in case it is ever needed).

@uklotzde
Copy link
Contributor

uklotzde commented Feb 5, 2022

Naming your PR like "DDJ-400: Cycle through focused effects" would help to guide reviewers.

The same applies to commit messages. Describe what this commit is changing. In imperative voice like I did in the PR title example.


engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 3);
var focusfx = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect")+1;
if (engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect")===3){
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I see, the code is confusing, there are 3 effects.

  • engine.getValue() should only be called once and assigned to variable, e.g. focused_effect
  • if focused_effect >== 3 { focused_effect = 1 } else { focused_effect = focused_effect + 1 }

@Holzhaus Holzhaus changed the title Changed Pioneer-DDJ-400-script.js Pioneer DDJ-400: Cycle through focused effects Feb 5, 2022
@Be-ing
Copy link
Contributor

Be-ing commented Feb 5, 2022

What is the motivation for this change?

@uklotzde
Copy link
Contributor

uklotzde commented Feb 5, 2022

The manual also needs to be updated if the changes in this PR should be merged:

https://manual.mixxx.org/2.3/ca/hardware/controllers/pioneer_ddj_400.html#effect-section-p-9

I agree with @Be-ing that we need to know more about the motivation for making an informed decision how to proceed. We don't own this controller and cannot try it out ourselves.

@uklotzde
Copy link
Contributor

uklotzde commented Feb 5, 2022

The proposed changes would modify the focus behavior inconsistently, i.e. effect 1 and 2 could still be focused by dedicated buttons while effect 3 could only be reached by cycling through all of them.

I actually like the cycling apporach, but then the beat < > buttons would need to be remapped.

Beat FX buttons now change the focused effect, while the FX select button cycles the focused effect.
@etileb etileb changed the base branch from main to 2.3 February 5, 2022 14:04
@@ -44,7 +44,7 @@
// * Keyshift mode

var PioneerDDJ400 = {};

engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 3);
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 this slipped in by accident?
(it's in the wrong place, and also looks like a personal preference since the focused effect is stored in mixxx.cfg)
Please revert.

Copy link
Author

Choose a reason for hiding this comment

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

No, it was like that before, it makes sure that there is an effect selected on startup.

Copy link
Member

@ronso0 ronso0 Feb 5, 2022

Choose a reason for hiding this comment

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

This line didn't exist, that's why it shows up in the diff. Also, it's in the wrong place.
Please revert.

@etileb
Copy link
Author

etileb commented Feb 5, 2022

I found the layout confusing with multiple different Buttons for focusing only 3 effects. I changed it so that there is one button for cycling through the effects. I also was annoyed but having to press shift+beat FX to change the focused effect, so now it works without shift.

@etileb
Copy link
Author

etileb commented Feb 5, 2022

The proposed changes would modify the focus behavior inconsistently, i.e. effect 1 and 2 could still be focused by dedicated buttons while effect 3 could only be reached by cycling through all of them.

The FX select button is the only way of changing the focused effect now,

I actually like the cycling apporach, but then the beat < > buttons would need to be remapped.

That's what I actually did.

@ronso0
Copy link
Member

ronso0 commented Feb 5, 2022

Please rebase onto mixxx/2.3.
Also, please install and run the pre-commit hooks to resolve the code style issues (see https://github.com/mixxxdj/mixxx/blob/main/CONTRIBUTING.md#git-workflow, 5th bullet point). The change set is small so you can simply squash the fixes and force-push.

@ywwg
Copy link
Member

ywwg commented Feb 25, 2022

@etileb , if you're unable to do the rebase, I can take over this PR and clean it up for merge. I don't have a DDJ-400 so I will need someone with that controller to verify that it works

@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@tiesjan
Copy link
Contributor

tiesjan commented Oct 17, 2022

Hi there! Since I own one of these controllers myself and I found the current effects configuration confusing, I've gone ahead and picked up these changes in PR #10912. If someone has the time to have a look, that would be great, thanks! 🙂

@JoergAtGithub JoergAtGithub removed library ui build code quality stale Stale issues that haven't been updated for a long time. labels Apr 6, 2023
@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Aug 29, 2023
@daschuer daschuer changed the base branch from 2.3 to 2.4 June 9, 2024 15:30
@daschuer
Copy link
Member

daschuer commented Jun 9, 2024

I think this was replaced by the already merged #10912 and can be closed. Please file a new PR if aspects are missing.

@daschuer daschuer closed this Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controller mappings stale Stale issues that haven't been updated for a long time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants