whole rest duration
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 No, that is actual 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
In reply to Yes. I want to retrieve the… by harmony8
If it is the only rest in that measure and there's nothing else in that voice it might be a whole measure rest (it certainly will be if this is voice 1)
In reply to If it is the only rest in… by Jojo-Schmitz
Might also be a modified measure e.g. a dotted half in a 3/4 measure. The displayed type is not exposed in any way to the plugin?