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

Numark Scratch: add initial mapping #4834

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

NotYourAverageAl
Copy link
Contributor

Add Numark Scratch mapping

@NotYourAverageAl
Copy link
Contributor Author

Documentation PR is here 492

res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

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

@github-actions github-actions bot added stale Stale issues that haven't been updated for a long time. and removed stale Stale issues that haven't been updated for a long time. labels Oct 6, 2022
@NotYourAverageAl
Copy link
Contributor Author

@Swiftb0y I'm having trouble getting my head around Javascript. I'm going to need your help to finish this please 🙏🏾

@Swiftb0y
Copy link
Member

Sure, what exactly do you need help with? I'd be glad to help.

@Swiftb0y
Copy link
Member

Have you tried out Mixxx 2.4 yet? We added a way to change the effects on the filter knob of the mixer. That would match the way this controller controls effects much more closely.

@NotYourAverageAl
Copy link
Contributor Author

Sure, what exactly do you need help with? I'd be glad to help.

My issue is with trying to create components for some of my controls. I think there's unresolved comments from your initial review. The examples I have looked at from other mappings are just too complex for my level I think.

@NotYourAverageAl
Copy link
Contributor Author

NotYourAverageAl commented Mar 14, 2023

Have you tried out Mixxx 2.4 yet? We added a way to change the effects on the filter knob of the mixer. That would match the way this controller controls effects much more closely.

Yep I have had a play around, but I have not seen this new system coded out in a mapping. except maybe the s4 k3 but that mapping is above my paygrade.
Where I'm getting stuck is that I borrowed the effects code from the Mixtrack Platinum FX mapping

The other issue is that there is no mixxx SOP on how to map this.

image
The solution currently in place is
Each fx buttons enable one effect at a time & toggles all other fx buttons off (shift + fx buttons, enables multiple effects)
The Paddle sets super to max and routes both fx units to corresponding deck
this.enablePaddle = function(channel, control, value, _status, _group) {
this.isPaddleHoldOn = value !== 0;
for (var i = 0; i <=2 ; i++) {
engine.setValue("[EffectRack1_EffectUnit" + i + "]", "super1", Math.min(value, 1.0));
engine.setValue("[EffectRack1_EffectUnit" + i + "]", "group_[Channel" + deckNumber + "]_enable", (value !== 0));
}
this.updateEffects();
};
Do you have solutions on how to do this better than what's in my code? I don't know if the new effects system caters for this.
I think we need to come up with consistent way to map these as I have seen on more & more controllers (or maybe it'd just Numark)

**edited (grammar & spelling fix)

res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
Comment on lines 16 to 22
// Default is false. When set to false, the EncoderKnob manages looping. Shift + EncoderKnob scrolls the library/loads track
// If set to true, the EncoderKnob scrolls the library/loads track. Shift + EncoderKnob manages looping.
NumarkScratch.invertLoopEncoderFunction = false;
Copy link
Member

Choose a reason for hiding this comment

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

This is really a necessary feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this encoder in Serato, the only option is to press shift + turn to scroll through the library and shift + push to load tracks, every damn time. The default is changing loop length and turning on loops, who uses loops that much, lol?
It's so unintuitive. and I rarely use loops (or haven't taken the time to learn). Numark should really have just added a browse encoder and load buttons. Rant over
Anyway, for this mapping inverting the encoder functions to non-standard is optional. I think this might be helpful to someone else.

Copy link
Member

@Swiftb0y Swiftb0y Mar 15, 2023

Choose a reason for hiding this comment

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

That's a fair assessment. As long as it doesn't complicate the design too much, its fine.

res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
@Swiftb0y
Copy link
Member

Do you have solutions on how to do this better than what's in my code? I don't know if the new effects system caters for this.
I think we need to come up with consistent way to map these as I have seen on more & more controllers (or maybe it'd just Numark)

The problem is that each manufacturer has their own opinion on how many and what effects should be accessible (compare Pioneer, Numark and Denon Prime Hardware). For now, IIUC you can use the "[QuickEffectRack1_[Channel" + i + "]]" loaded_chain_preset CO. IIUC you're supposed to set it to the index of the button. The downside is that the labels of the controller likely don't correspond to the effect actually being used by mixxx (partly stemming from the fact that these differ between manufacturers) but the upside is that you can manually configure your own effects and chains to be used by mixxx instead.

@NotYourAverageAl
Copy link
Contributor Author

Do you have solutions on how to do this better than what's in my code? I don't know if the new effects system caters for this.
I think we need to come up with consistent way to map these as I have seen on more & more controllers (or maybe it'd just Numark)

The problem is that each manufacturer has their own opinion on how many and what effects should be accessible (compare Pioneer, Numark and Denon Prime Hardware). For now, IIUC you can use the "[QuickEffectRack1_[Channel" + i + "]]" loaded_chain_preset CO. IIUC you're supposed to set it to the index of the button. The downside is that the labels of the controller likely don't correspond to the effect actually being used by mixxx (partly stemming from the fact that these differ between manufacturers) but the upside is that you can manually configure your own effects and chains to be used by mixxx instead.

@Swiftb0y To double check the mixer's effects are separate & independent from the filter. Will the Quick Effect CO system work still for this use case?

@Swiftb0y
Copy link
Member

To double check the mixer's effects are separate & independent from the filter. Will the Quick Effect CO system work still for this use case?

Can you elaborate? I'm afraid I don't quite understand what you mean.

@NotYourAverageAl
Copy link
Contributor Author

To double check the mixer's effects are separate & independent from the filter. Will the Quick Effect CO system work still for this use case?

Can you elaborate? I'm afraid I don't quite understand what you mean.

From my limited understanding I thought QuickEffects relate to the Filter and the new effect system allows changing the effect for the Filter knob to some other effect for controllers like the s4 mk3 and prime 4.

I'm having a hard time wrapping my head on how I can use QuickEffects for the Numark's standalone effects section.

Thanks for the help again.

@Swiftb0y
Copy link
Member

Ah I see the problem. Numarks concept of FX sections don't map cleanly to either the QuickEffects nor the separate EffectsUnits...

I think it would be best to just use the FX Select Buttons do specify the loaded_chain_preset of the first effects unit. The paddles should then just enable routing to that one fx unit.

What do you think?

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

last couple nitpicks

res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

last nitpick comment.

res/controllers/Numark-Scratch-scripts.js Outdated Show resolved Hide resolved
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

LGTM. thank you for your patience and contribution.

@Swiftb0y
Copy link
Member

Can you do me a favor and squash all the commits down into a single one before I merge?

@NotYourAverageAl
Copy link
Contributor Author

NotYourAverageAl commented Jun 12, 2024

One last thing @Swiftb0y
case 0x7F: // Picnic Bench/Fast Cut
engine.setValue("[Mixer Profile]", "xFaderMode", 0);
engine.setValue("[Mixer Profile]", "xFaderCalibration", 0.9);
engine.setValue("[Mixer Profile]", "xFaderCurve", 7.0);

How far can I push these values? This is meant to be a scratch mixer with the fastest cut possible. Looking at the mixer settings & developer tools, I can set xFaderCalibration to 0.999307 and xFaderCurve to 999.6

@Swiftb0y
Copy link
Member

I'm actually not sure. These controls are suboptimal anyways. We really need a hybrid setting that combines both modes in Mixxx to a single slider so it can be mapped to the single knob present on most hardware.

Co-Authored-By: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
@NotYourAverageAl
Copy link
Contributor Author

NotYourAverageAl commented Jun 12, 2024

Squashed. Thanks for the review and the lessons @Swiftb0y

I'll investigate the xfadercurve & calibration values and issue another pr if it helps. I also want to introduce settings now that it is available in main.

manual is here pr 492

@Swiftb0y
Copy link
Member

Squashed. Thanks for the review and the lessons @Swiftb0y

Thanks for your patience ;)

I'll investigate the xfadercurve & calibration values and issue another pr if it helps.

I filed #13363 for the crossfader issue. I'd be very grateful if you'd look into options solving that from the C++ side.

I also want to introduce settings now that it is available in main.

👍

manual is here mixxxdj/manual#492

Yup, saw that. Thank you.

@Swiftb0y Swiftb0y merged commit c541148 into mixxxdj:2.4 Jun 12, 2024
14 checks passed
@NotYourAverageAl NotYourAverageAl deleted the NumarkScratch branch June 12, 2024 21:52
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.

4 participants