Clarification: Authoritative Cursor Anchor Position for Beats with Ornaments (PH, bends) in 1.8.x #2570
Replies: 1 comment
-
The default alphaTab behavior is to place the cursor with a fixed width, centered at https://alphatab.net/docs/reference/api/boundslookup gives some good insight in the sizes but unfortunately has no element . Centering across the whole width feels generally wrong. from some quick tests:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So this is not a bug, it's a custom cursor alignment fix that I don't know if there is a solution for.. a purely cosmetic
This PH <17> / <15> cursor skew is pure geometry + bounds model behavior.
So on beats like:
5 <17>
3 <15>
custom cursor appears slightly right-shifted compared to the native cursor.
Appears This is strictly:
Beat container bounds ≠ note head bounds
We observed that BeatBounds.visualBounds includes ornament width (e.g., PH <17>), which causes slight rightward cursor skew in custom cursor implementations.
The native cursor aligns correctly.
Which property represents the authoritative rhythmic anchor?
Is BeatBounds.onNotesX the intended coordinate for custom cursor positioning?
What is the authoritative anchor coordinate for a beat, I believe we tried both of these:
For beats with ornaments (PH <17>, bends, slides, etc.), should custom cursor implementations anchor to:
• BeatBounds.visualBounds.x
• BeatBounds.onNotesX
• NoteBounds.visualBounds.x
• Or another internal property?
In the image I shared it does not happen anywhere but the PH <17> and not so much in a (5) bend situation.
Beta Was this translation helpful? Give feedback.
All reactions