script.crossfaderCurve does not work as desired

Bug #1482163 reported by Daniel Schürmann
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Medium
Unassigned

Bug Description

The code implies that we are able to tweak the xFader independently for each mode.

script.crossfaderCurve = function (value, min, max) {
    if (engine.getValue("[Mixer Profile]", "xFaderMode")==1) {
        // Constant Power
        engine.setValue("[Mixer Profile]", "xFaderCalibration", script.absoluteLin(value, 0.5, 0.962, min, max));
    } else {
        // Additive
        engine.setValue("[Mixer Profile]", "xFaderCurve", script.absoluteLin(value, 1, 2, min, max));
    }
}

Unfortunately the slider in the xFader preferences tweaks xFaderCalibration and xFaderCurve in both modes.
Tweaking the modes independently seams to be desirable. So I consider the CO interface and the preference dialog and the underlying calculation as broken.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

If we fix this this, it should be easy to fix Bug #829538 as well, by shifting the maximum towards a steep cut.

IMHO this is a 1.12 bug, and it should be fixes without any interface changes.

Thoughts?

Changed in mixxx:
milestone: none → 1.12.0
importance: Undecided → Medium
Changed in mixxx:
status: New → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

xFaderCalibration is used in both modes.
The range is now 1 ... 1000

Changed in mixxx:
status: In Progress → Confirmed
assignee: Daniel Schürmann (daschuer) → nobody
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Please note: the xFaderCalibration depends on the value of xFaderCurve to achieve a desired curve.

Fading:
xFaderCalibration 0.5 / 0
xFaderCurve = 1 / 0
Scratching:
xFaderCalibration 0.999307 / 0.998614
xFaderCurve = 1000 / 1

See:
https://github.com/mixxxdj/mixxx/blob/d46433b0ae51edf2ca7529b0889691dd54f2bb90/src/engine/enginexfader.cpp#L10

xFaderCalibration = pow(0.5, 1.0 / xFaderCurve);

Revision history for this message
Dariusz Janik (kejbil) wrote :

Maybe this comment will be helpful:
https://github.com/mixxxdj/mixxx/blob/479c9e15159299667f2f7d16d65a8565f656a376/src/preferences/dialog/dlgprefcrossfader.cpp#L203

So, the xFaderCurve is in the range of 1 to 1000 while 50 % slider results to about 2, which represents a medium rounded fader curve.

Changed in mixxx:
milestone: 2.0.0 → none
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8192

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.