whole rest duration

• Dec 28, 2023 - 12:21

I want to get the nominal duration of a whole rest in a plugin. According to the docs, this is the DurationElement.duration property. I expected it to be 1/1 regardless of the measures time signature. Instead, a whole rest in a 3/4 will have 3/4 and in 5/4 it has 5/4 and so on. Nominal means "displayed" correct?


Comments

No, that is actual
And you're apparently not talking about a whole rest (which is always 4 beats/quarters long), but a whole measure rest (which looks the same, but a) is centered to the measure and b) the duration follows the measure duration)

In reply to by Jojo-Schmitz

Yes. I want to retrieve the displayed type (which is always whole rest in these cases) but durationType seems not to be exposed to the API. Is there a way to distinguish these cases in a plugin?
According to your answer DurationElement.actualDuration should then always be 1/1 or 4/4 but this is also not the case

Do you still have an unanswered question? Please log in first to post your question.