-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix #16519: L/R Arrow During Playback Moves From Playhead Current Location #19038
Fix #16519: L/R Arrow During Playback Moves From Playhead Current Location #19038
Conversation
5caad1b
to
dd35901
Compare
dd35901
to
cc61b0a
Compare
@22justinl please rebase this PR. Thanks! |
cc61b0a
to
2a12b95
Compare
I think this change is problematic with repeats Here is a video from the PR video1399164880.mp4 |
Here is a video from current 4.2 video1231836572.mp4 |
fa1f8d3
to
525a11a
Compare
@22justinl Kind reminder about the comments above :) |
c75a8b5
to
591151f
Compare
d1bb114
to
2fadc4a
Compare
d1f5e88
to
ba0a45e
Compare
ba0a45e
to
f3733e1
Compare
e9060ee
to
5fd330f
Compare
5fd330f
to
4ecde07
Compare
17b2211
to
37cb03f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much! Besides fixing the issue, this PR helped uncover quite some problems with PlaybackController!
Playhead gets stuck on time signature change I don't think this is a "show-stopper" but in master, pressing left will take the playhead past the time signature change and in the PR you need to use Cmd+Left Sorry this video is longer than necessary video1423174087.mp4 |
37cb03f
to
1de3ae8
Compare
…from playback cursor location - left/right arrow: move between beats - left/right arrow + ctrl/command: move between measures
1de3ae8
to
a1ca193
Compare
// Set target beat to max beat of previous bar | ||
engraving::TimeSigMap* timeSigMap = currentMasterNotation()->masterScore()->sigmap(); | ||
int targetBarStartTick = timeSigMap->bar2tick(targetMeasureIdx, 0); | ||
targetBeatIdx = timeSigMap->timesig(Fraction::fromTicks(targetBarStartTick)).timesig().numerator() - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the changes I made + #include "engraving/dom/sig.h"
at the top (I thought it might be unclear because I rebased the branch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanPudashkin do you think we should try to extract these lines into a method that can be reused here and in NotationPlayback::beat
? Or is that not worth the effort?
(The question would also be, where to put such a method.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic improvements can be made later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! I have one last stylistic doubt, that I'll ask Roman about:
// Set target beat to max beat of previous bar | ||
engraving::TimeSigMap* timeSigMap = currentMasterNotation()->masterScore()->sigmap(); | ||
int targetBarStartTick = timeSigMap->bar2tick(targetMeasureIdx, 0); | ||
targetBeatIdx = timeSigMap->timesig(Fraction::fromTicks(targetBarStartTick)).timesig().numerator() - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanPudashkin do you think we should try to extract these lines into a method that can be reused here and in NotationPlayback::beat
? Or is that not worth the effort?
(The question would also be, where to put such a method.)
…r_lr Fix musescore#16519: L/R Arrow During Playback Moves From Playhead Current Location
Resolves: #16519
Resolves: #23795
Changed so that left and right arrows during playback move the playback cursor instead of the selection (which causes the playback cursor to move back to the selection)