Herc dj control inpulse 500#14722
Conversation
|
Welcome at Mixxx! |
|
Please explain in the PR description, what the problem is, that you try to fix with this PR! |
|
Mapping fixes/updates always go to the stable branch (2.5 in this case) (unless they require features only available in newer versions), so please rebase onto mixxx/2.5, force-push and change the target branch here accordingly. |
1bd91e9 to
8ba4c1d
Compare
Signed and sent |
| // The parameter k determines how sharp is the curve shape | ||
| // lower values will give gentler curves | ||
| let k = 0.975; | ||
| let scaled = k * Math.PI / 2 * script.absoluteLin(value, -1, 1, 0, 127); | ||
| result = Math.tan(scaled) / Math.tan(k * Math.PI /2); | ||
| result = (result + 1) / 2; |
There was a problem hiding this comment.
Let's not do this in the mapping, this is clearly a personal preference.
The crossfader curve can be set in Preferences -> Mixer.
Btw DJCi500.crossfaderSetCurve could simply set the crossfader curve via
[Mixer Profile],xFaderMode
[Mixer Profile],xFaderCurve
(for "Additive" mode it's not necessary to set [Mixer Profile],xFaderCalibration)
Unfortunately these controls are not yet documented in the manual, but you can take a look how they are used in other mappings, eg. Traktor Kontrol S4 mk3.
Btw, since #14124 (Mixxx 2.6-alpha) you'll also see the real current values in the Crossfader preferences when you move the xfader switch on the controller.
There was a problem hiding this comment.
The crossfader curve in Preferences -> Mixer is the standard curve, and this code snippet doesn't have any effect on the normal crossfader use. The normal crossfader value is set in line 1160, outside of this snippet, and it is 100% linear.
This snippet is used only for the scratch mode, and in 2.5 I can't see anything in the UI to edit the curve of the scratch mode, it only edits the normal mode.
I can remove these lines and leave the previous code for the scratch mode, if that allows this PR to be merged.
There was a problem hiding this comment.
Sorry, I didn't try to understand what that snippet does. (I'm bad with math..)
Can you please explain what "Eventine's crossfader scratch mode" is supposed to do?
And how you changed that?
Unfortunately the documentation (preview, pending PR) doesn't explain that.
For my understanding, "sharp" scratching can be achieved by setting the curve as desired (that's done in Preferences -> Mixer, and the desired scratch curve can be customized in the mapping js file).
There was a problem hiding this comment.
Yes, it can be achieved by setting a new curve. This requires going to Preferences -> Mixer.
Unfortunately the documentation (preview, pending PR) doesn't explain that.
I see. You are right. The documentation doesn't show the actual switch that enables the scratch mode.
In the Hercules Inpuse 500 the scratch mode can be enabled with a selector switch in the controller itself:
This is similar to the TRAKTOR KONTROL S4 MK3 when the selector goes fully to the right. I'm reading the manual of the MK3, and it is described as a "sharp curve".
When the switch is at the left, the reported position of the crossfader is linear, and then it corresponds to the curve set in Preferences.
This snippet is used when the Inpulse 500 selector switch is in the middle, and it also activates what can be described as a sharp curve.
What both this new code and the current code are doing is: they achieve this scratch result by modifying the reported position of the crossfader in Mixxx, instead of the crossfader curve itself.
The difference in the PR is that my code doesn't produce values that are outside of the range [-1, 1], the curve is otherwise almost the same as before.
If I understand correctly, what you propose is to actually change the curve of the crossfader when changing the selector switch to scratch, instead of the reported position. It is surely a more elegant solution, but I need to learn how it all works, and test the changes, etc.
There was a problem hiding this comment.
Thank you!
I knew it was about that switch, I just didn't understand why the 'scratch' mode is handled so special compared to other mappings.
So IIUC the current mapping uses two curves for the xfader?
- the one set with the switch (engine curve)
- one for the input values, which is then interpreted by the engine curve
The goal (applies to any mapping) is to make the xfader switch adjust the curve as labeled, without any magic (ie. having to read the manual to understand it).
Btw to get the 'real' scratch experience, the xfader mode should be 'Additive' (not 'Constant Power'), right?
So this also needs to be set in crossfaderSetCurve.
I think some confusion was caused by the fact that the Mixer preferences don't necessarily reflect the real crossfader curve. Therefore, for testing the curve functions during development, I suggest to build main (includes #14124), then switch back to your Inpulse500 branch and test the mapping.
I don't want to hold up this (initially) small fix, so if you like to get this merged quickly, I suggest to reduce this PR to the 127/128 fix and work on the curve in another PR.
Otoh, Mixxx 2.5.1 has just been released so there's probably more than enough time to make sure this mapping is in the next release. (unless of course we introduced a horrible regression in 2.5.1, then we'd have to release 2.5.2 with a fix asap)
There was a problem hiding this comment.
Done. Now it is a small fix.
I am reading about #14124 and it seems it is totally related to this snippet, good moment to learn how this works.
There was a problem hiding this comment.
FYI I have also created #14361 which might be helpful in this case (and in general).
…ader was not reaching 100% to the right end
8ba4c1d to
2b503b5
Compare
|
Thanks @Poyeyo. I like to add your name to the contributor list in the Mixxx about box. |
Please add my name as Nicolay Leiva. |
|
Done, sorry for the delay. |

The previous formula assumes a range of 0–128 for the values provided by the controller.
The actual range is 0–127. As a result, the crossfader did not reach 100% when moved all the way to the right, only reaching 98%. This made it impossible to switch to the next track in Auto DJ mode using the crossfader when the left deck was playing.
This fix also changes the method from engine.setValue to engine.setParameter, as suggested by Eve.