Getting the position of a Textline
I'm desperately trying to get the position of a Text line (the simple line from the lines pallette)
When selecting the line in the score, i can inspect the values of the so-called TextLineSegment element in the selection.
But this object's position and duration both contain a FractionWrapper with a value of 0/1
Same occurs for other lines like pedal markings and crescendi.
Is there any way to retrieve their position and duration, or is it just not implemented?
(There also seems to be no other way to approach them other than through selection, they don't seem to be contained in an elements array of some parent object... or am i mistaken?)
Any help would be greatly appreciated!
Comments
I would expect textlines to be a type of spanner, so there's a chance that you're looking for spannerTick(s)
In reply to I would expect textlines to… by jeetee
Unfortunately the same goes for all the other fractionWrappers like spannerTick and SpannerTicks... they all contain 0/1
In reply to Unfortunately the same goes… by thomasrutgers
It looks like we need to add a proper support for spanner segments to plugins API, this doesn't seem to be possible currently. This shouldn't be a large change to implement though.
In reply to It looks like we need to add… by dmitrio95
Thanks. Would be great!
In reply to It looks like we need to add… by dmitrio95
Is this possible now? For me it is OttavaSegment