You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, tuplets objects only consist of pointers to the start and end note of the tuplet. There is no way of saying if it is a "3-against-2-eights" triplet for example, or a "5-against-4-sixteenths" quintuplet when iterating over the score and encountering a Tuplet object. To get this information, one would have to explore the notes in between the start and end note, trying to guess this information from their type (which is not straightforward as a type quarter_3/2 could be either a quarter note in an eighth-note triplet or a quarter note in a quarter-note tuplet for example, or for example when parsing nested tuplets).
The actual/normal notes information is sometimes accessible in the MusicXML file. For example, below is an example of a note on which are starting 2 nested tuplets: a 3-against-2-eight triplet and a 3-against-2-sixteenth triplet.
However, this information is not always explicitly provided (in scores exported by MuseScore at least), and is supposed to be inferred from the <time-modification> tags if absent (according to MusicXML spec).
Being able to access this information directly in the tuplet object would be extremely useful:
tuplet=next(score.iter_all(cls=partitura.score.Tuplet)
tuplet.actual_notes# 3 for a 3-against-2-eights tuplettuplet.normal_notes# 2 for a 3-against-2-eights tuplettupet.type# eight for a 3-against-2-eights tuplet
However, while this feature would be very handful, I do not know if this is actually possible as tuplets can get quite complex.
The text was updated successfully, but these errors were encountered:
Currently, tuplets objects only consist of pointers to the start and end note of the tuplet. There is no way of saying if it is a "3-against-2-eights" triplet for example, or a "5-against-4-sixteenths" quintuplet when iterating over the score and encountering a
Tuplet
object. To get this information, one would have to explore the notes in between the start and end note, trying to guess this information from their type (which is not straightforward as a typequarter_3/2
could be either a quarter note in an eighth-note triplet or a quarter note in a quarter-note tuplet for example, or for example when parsing nested tuplets).The actual/normal notes information is sometimes accessible in the MusicXML file. For example, below is an example of a note on which are starting 2 nested tuplets: a 3-against-2-eight triplet and a 3-against-2-sixteenth triplet.
Show XML
However, this information is not always explicitly provided (in scores exported by MuseScore at least), and is supposed to be inferred from the
<time-modification>
tags if absent (according to MusicXML spec).Show XML
Being able to access this information directly in the tuplet object would be extremely useful:
However, while this feature would be very handful, I do not know if this is actually possible as tuplets can get quite complex.
The text was updated successfully, but these errors were encountered: