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

"loop_end_position" does not update on eject #12223

Closed
gqzomer opened this issue Oct 26, 2023 · 2 comments · Fixed by #12224
Closed

"loop_end_position" does not update on eject #12223

gqzomer opened this issue Oct 26, 2023 · 2 comments · Fixed by #12224
Labels
Milestone

Comments

@gqzomer
Copy link
Contributor

gqzomer commented Oct 26, 2023

Bug Description

Discovered while writing a mapping for the reloop mixage series

I'm using the loop_start_position and loop_end_position controls to provide users feedback about the status of the loop for a given track. these leds are also updated when a new track is loaded or when a loaded track is ejected. The loop_end_position seems to be returning a incorrect value when a track is ejected.

expected behaviour
The loop_end_position return -1 just like the loop_start_position when a track has been ejected.

Observed behaviour

  • the loop_end_position returns the position of the loop end point of the track that has just been ejected instead of -1)
  • if a track new track is loaded (with no loop present or previously set) the loop_end_position returns the value of when it was last updated. This is usually the loop end point of a previously loaded track

steps to reproduce

  • bind a simple logging function to the eject control, I used the script below
var test = {};

test.controlsToFunctions = {
    "eject": function(v) {
        if (v === 0) { 
            print("start " + engine.getValue("[Channel1]", "loop_start_position"));
            print("end " + engine.getValue("[Channel1]", "loop_end_position")); 
        }
    }
}

test.init = function(_id, _debugging) {
    script.bindConnections("[Channel1]", test.controlsToFunctions);
};

test.shutdown = function() {
    script.bindConnections("[Channel1]", test.controlsToFunctions, remove);
};

  • load a either a new track or a track for which no loop points are present in the data base
    • eject the track, the logging function returns -1 for both loop_start_position and loop_end_position
  • load a track with a loop set or set a new loop
    • eject the track, the function returns -1 for loop_start_position and the loop end point for loop_end_position
  • load another track without any loop points present
    • eject the track, the function returns -1 for loop_start_position and the loop end point of the previous track for loop_end_position

I have tested it with both 2.3.6 and 2.4 and got the same result

Version

2.4-beta-199-g8c925617e3

OS

Fedora 38

@gqzomer gqzomer added the bug label Oct 26, 2023
@ronso0
Copy link
Member

ronso0 commented Oct 26, 2023

Thanks for reporting this.
FYI you can observe control values much easier with Options menu -> Developer Tools (need to start Mixxx with --developer argument).

@ronso0
Copy link
Member

ronso0 commented Oct 26, 2023

Fixed by #12224

@ronso0 ronso0 linked a pull request Oct 26, 2023 that will close this issue
@daschuer daschuer added this to the 2.4.0 milestone Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants