Brake effect initial speed and factor

Bug #1571442 reported by elmarikon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
ronso0

Bug Description

1. In the controller's scripts.js the "[float factor]" for the brake effect seems to be ignored. I tried several values.
2. The effect seems to start with the original speed of the track, rather then the actual playing speed.
     So when I have the track pitched down and use the effect, the speed jumps up before slowing down to brake,
     although the initial rate is set to 1.

Tags: effects
Revision history for this message
ronso0 (ronso0) wrote :

whoopsy, just noticed that I worked around this without considering it a bug.
Below is my controller function, that calculates speed factor and passes it to brake().
You can adapt decay rate to your liking.

TerminalMix.brake = function (channel, control, value, status, group) {
    if (value) {
        var deck = parseInt(group.substring(8,9));
        // enable when button is pressed, release is irrelevant. usage:
        // engine.brake(deck, enable/disbale, decay rate, initial playback speed);
        var origBPM = engine.getValue(group,"file_bpm");
        var currentBPM = engine.getValue(group,"bpm");
        var currentSpeed = currentBPM / origBPM;
        engine.brake(deck, 1, 10, currentSpeed);
    }
}

Revision history for this message
elmarikon (unrein-web) wrote :

Thanx for your reply. To be honest, I didn'tt even count on it anymore:-)

I will try the function today and see if it works for me...

SwK

Revision history for this message
ronso0 (ronso0) wrote :

Cool.. Remeber to replace 'TerminalMix' with the script prefix for your controller, so it looks like i.e. Beatpad.brake

Revision history for this message
elmarikon (unrein-web) wrote :

Cheers and thanx again!
I managed to integrate your function and the good news is, the initial speed factor works perfectly now. But the decay rate still seems to be ignored.

        // engine.brake(deck, enable/disbale, decay rate, initial playback speed);

so i tried
        engine.brake(deck, 1, 1, currentSpeed);
to
        engine.brake(deck, 1, 99999, currentSpeed);
with no change of behavior.

SwK

Revision history for this message
elmarikon (unrein-web) wrote :

Sorry, one more: it only works for decks a&b, not for c&d. It the controller is set to decks c&d, still deck a or be will do the brake effect...

Revision history for this message
ronso0 (ronso0) wrote :

Concerning decks a/b and c/d:
I just checked that, it works. Make sure your controller really sends different MIDI signals for the buttons you assigned the function to when you switch channel from A to C (B to D respectively). Same on my controller: some controls do not change when switching channels, i.e. FX buttons send the same signal no matter if on A/B or C/D.
Something like Shift+PlayChannelXY should work, though.

I can't help with the decay rate since I'm not yet contributing to mixxx code, I'm just helping with a workaround until the bug is fixed in the actual program (by anyone else or me).

ronso0 (ronso0)
Changed in mixxx:
assignee: nobody → Ronny Sandig (medontknow)
Revision history for this message
ronso0 (ronso0) wrote :

I just did a PR on this.
@any devs: That issue with decay rate should be another bug, right?
By looking at https://github.com/mixxxdj/mixxx/blob/master/src/controllers/controllerengine.cpp#L1347 I can't find the problem since I'm a total C++ noob.

Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :
Changed in mixxx:
status: New → In Progress
Be (be.ing)
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
elmarikon (unrein-web) wrote :

nice!
Will it be included in the next version?!
I'll give the nightly build a try.

jus (jus)
Changed in mixxx:
milestone: none → 2.1.0
status: Fix Committed → Fix Released
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/8518

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.