Spanners can attach to arbitrary rhythmic positions
Resolves: #16796
This is a first step. Let's start collecting all the related bugs and the necessary refinements.
I know how I'm spending my break...
Had a play around with this. I think it'd be more productive to hop on a call and figure out next steps, given that this is obviously a very early implementation.
In particular, the pre-existing dragging behaviour with anchors is quite bad. I routinely keep ending up in situations where the anchor is pointing way too far to the left or right of my current cursor position.
(Position of my cursor is on the right anchor of the hairpin in this case)
We'd need to solve this problem, along with a few others before I could give more concrete feedback.
Incidentally, I just love the blue anchor colours. They're so helpful.
In particular, the pre-existing dragging behaviour with anchors is quite bad. I routinely keep ending up in situations where the anchor is pointing way too far to the left or right of my current cursor position.
(Position of my cursor is on the right anchor of the hairpin in this case)
We'd need to solve this problem, along with a few others before I could give more concrete feedback.
✅ Fixed! @Tantacrul
Incidentally, I just love the blue anchor colours. They're so helpful.
Awesome, thank you! For the colors themselves I've randomly eyeballed two shades of blue. If we want to keep them, let's actually spec out the color choice :)
A rather more destructive issue is this one:
Some objects do not survive application restart (See video).
To the extent that it's helpful, here is the score I'm using (although I'm not sure you'll find any trace of those objects in it...)
- Ottava line lengths don't adjust incrementally according to anchor point subdivisions when using keyboard shortcuts (they do when click+dragging).
✅ Fixed. Or rather, @oktophonie and I have decided to disallow time-anchoring for ottavas (for now), given that the start/end of an ottava always refers to a note and very rarely does it make musical sense to anchor an ottava to a duration. That's also because the current default for ottavas is to end right after their last note, which contradicts the idea of anchoring to a point in time. When we introduce an options for ottavas to end "at the end of the duration" we will come back to this.
2. The "A" key on my QWERTZ keyboard does not trigger note entry for that note (this build only). See video.
Unlinkely to be due to my PR, but let's see if it persists.
A rather more destructive issue is this one:
Some objects do not survive application restart (See video).
✅ Fixed. But let's keep paying attention to these save/reload bugs cause that's one of the tricky areas.
@bkunda
Just spent some more time with this PR. The issue of elements not surviving save-reopen does seem to have been resolved. My "A" key remains a problem (but it is, I think, also a problem in master).
FWIW :-) I just realised I could not achieve this as a result of the decision regarding ottava lines:
(But this is, admittedly, a pretty hardcore stress-test case, and certainly not a common situation).
@RomanPudashkin all done, thank you!
Ideally, we should do something about the commits in this PR. You can squash many of them and keep only the most important ones
@RomanPudashkin if you think it's good, I think it's ready!
File 永远的照亮.mscz from https://musescore.org/en/node/362439 Staff 1, Measure 84. rit. will not survive save/reopen. It doesn't happen in master and 4.3.0
Also pedal lines look different, but the same happen in master. Probably, not related.
Screen recording:
https://github.com/musescore/MuseScore/assets/919446/0a2dd693-c648-41da-892b-60f283403b02
File 永远的照亮.mscz from https://musescore.org/en/node/362439 Staff 1, Measure 84. rit. will not survive save/reopen. It doesn't happen in master and 4.3.0
Also pedal lines look different, but the same happen in master. Probably, not related.
Screen recording:
Please log this as a separate issue. We will stabilize and refine the feature after we merge this first step :)
(Position of my cursor is on the right anchor of the hairpin in this case)