![]() |
Verovio
Source code documentation
|
This class is an interface for elements with duration, such as notes and rests. More...
#include <durationinterface.h>
Public Member Functions | |
Fraction | GetInterfaceAlignmentDuration (int num, int numBase) const |
Returns the duration (in Fraction) for the element. More... | |
Fraction | GetInterfaceAlignmentMensuralDuration (int num, int numBase, const Mensur *currentMensur, data_DURATION equivalence) const |
Returns the duration (in Fraction) for the element for mensural notation The level of equality is given in equivalence (brevis, semibrevis or minima) | |
bool | IsFirstInBeam (const LayerElement *noteOrRest) const |
Return true if the note or rest is the first of a beam. | |
bool | IsLastInBeam (const LayerElement *noteOrRest) const |
Return true if the note or rest is the last of a beam. | |
data_DURATION | GetNoteOrChordDur (const LayerElement *element) const |
If the element is part of a chord, return the chord actual duration, otherwise the note actual duration. More... | |
bool | IsMensuralDur () const |
Return true if the value is a mensural (DURATION_longa, brevis, etc.) | |
bool | HasIdenticalDurationInterface (const DurationInterface *otherDurationInterface) const |
Interface comparison operator. More... | |
Constructors, destructors, reset methods | |
Reset method resets all attribute classes | |
DurationInterface () | |
virtual | ~DurationInterface () |
void | Reset () override |
Virtual reset method. More... | |
InterfaceId | IsInterface () const override |
Virtual method returning the InterfaceId of the interface. More... | |
Set and get the default duration | |
void | SetDurDefault (data_DURATION dur) |
data_DURATION | GetDurDefault () const |
Return the duration (in Fraction) for the corresponding level of equivalence | |
Fraction | DurationWithBrevisEquivalence (int num, int numBase, const Mensur *currentMensur, data_DURATION noteDur) const |
Fraction | DurationWithSemibrevisEquivalence (int num, int numBase, const Mensur *currentMensur, data_DURATION noteDur) const |
Fraction | DurationWithMinimaEquivalence (int num, int numBase, const Mensur *currentMensur, data_DURATION noteDur) const |
Return the actual (gestural) duration of the note, for both CMN and mensural durations | |
See data_DURATION For Mensural, it is the same (DURATION_2 == DURATION_minima) | |
data_DURATION | GetActualDur () const |
data_DURATION | GetActualDurGes () const |
void | SetScoreTimeOnset (Fraction scoreTime) |
MIDI timing information. | |
void | SetRealTimeOnsetSeconds (double timeInSeconds) |
void | SetScoreTimeOffset (Fraction scoreTime) |
void | SetRealTimeOffsetSeconds (double timeInSeconds) |
void | SetScoreTimeTiedDuration (Fraction timeInSeconds) |
Fraction | GetScoreTimeOnset () const |
double | GetRealTimeOnsetMilliseconds () const |
Fraction | GetScoreTimeOffset () const |
Fraction | GetScoreTimeTiedDuration () const |
double | GetRealTimeOffsetMilliseconds () const |
Fraction | GetScoreTimeDuration () const |
![]() | |
void | RegisterInterfaceAttClass (AttClassId attClassId) |
Method for registering an MEI att classes in the interface. | |
std::vector< AttClassId > * | GetAttClasses () |
Method for obtaining a pointer to the attribute class vector of the interface. | |
Interface () | |
virtual | ~Interface () |
This class is an interface for elements with duration, such as notes and rests.
It is not an abstract class but should not be instanciated directly.
Fraction vrv::DurationInterface::GetInterfaceAlignmentDuration | ( | int | num, |
int | numBase | ||
) | const |
Returns the duration (in Fraction) for the element.
It returns 0/1 for grace notes. Careful: this method is not overriding LayerElement::GetAlignmentDuration since LayerElement and DurationInterface have no inheritance link.
data_DURATION vrv::DurationInterface::GetNoteOrChordDur | ( | const LayerElement * | element | ) | const |
If the element is part of a chord, return the chord actual duration, otherwise the note actual duration.
Since we need to check what the element is, we need to pass it as parameter.
bool vrv::DurationInterface::HasIdenticalDurationInterface | ( | const DurationInterface * | otherDurationInterface | ) | const |
Interface comparison operator.
Check if the LayerElement has a DurationInterface and compare attributes
|
inlineoverridevirtual |
Virtual method returning the InterfaceId of the interface.
Needs to be overridden in child classes.
Reimplemented from vrv::Interface.
|
overridevirtual |
Virtual reset method.
Needs to be overridden in child classes.
Reimplemented from vrv::Interface.
Reimplemented in vrv::Note, vrv::Rest, vrv::Nc, vrv::Space, and vrv::TabGrp.