Shared time signature class that is derived from other classes. (See others::Measure)
More...
#include <CommonClasses.h>
|
| std::pair< util::Fraction, NoteType > | calcSimplified () const |
| | Calculates the simplest form of of this time signature, expressed as a fractional count of NoteType units.
|
| |
|
util::Fraction | calcTotalDuration () const |
| | Calculates the total duration of the time signature as a fraction of a whole note.
|
| |
| util::Fraction | calcBeatValueAt (Edu eduPosition) const |
| | Returns the beat value (duration) at the given EDU position.
|
| |
|
bool | isSame (const TimeSignature &src) const |
| | returns whether the two time signatures represent the same time signature
|
| |
| MusxInstance< TimeSignature > | createComponent (size_t index) const |
| | Creates a time signature corresponding to the component at index.
|
| |
| std::optional< char32_t > | getAbbreviatedSymbol () const |
| | Returns the abbreviated symbol (code point) for this time signature, or std::nullopt if none.
|
| |
|
bool | isCommonTime () const |
| | Returns if this time signature is common time.
|
| |
|
bool | isCutTime () const |
| | Returns if this time signature is cut time.
|
| |
| | DocumentElementNoPart (const DocumentWeakPtr &document) |
| | Constructs the document element (with no meaningful associated part)
|
| |
|
virtual | ~DocumentElement () noexcept(false)=default |
| | Virtual destructor for polymorphic behavior.
|
| |
| DocumentPtr | getDocument () const |
| | Gets a reference to the Document.
|
| |
|
Cmper | getPartId () const |
| | Gets the part id associated with this instance.
|
| |
|
|
class | others::Measure |
| |
|
class | others::OssiaHeader |
| |
|
class | details::IndependentStaffDetails |
| |
Shared time signature class that is derived from other classes. (See others::Measure)
◆ Abbreviation
Specifies whether a time signature is displayed in numeric or abbreviated form.
| Enumerator |
|---|
| NotApplicable | The time signature is not for display, so abbreviation is inapplicable. (Default)
|
| Numeric | Display the numeric time signature (e.g., 4/4 or 2/2).
|
| Abbreviated | Display the abbreviated time signature when available (i.e., common time or cut time).
|
◆ calcBeatValueAt()
Returns the beat value (duration) at the given EDU position.
Each TimeSigComponent is treated as a run of identical beats:
- The beat value is the sum of comp.units (in EDU).
- The number of beats is the sum of comp.counts (as util::Fraction).
- Parameters
-
| eduPosition | Position from the start of the measure, in EDU. |
- Returns
- Beat value at
eduPosition as a fraction of a whole note. Returns 0 if no beat information is available.
◆ calcSimplified()
◆ createComponent()
Creates a time signature corresponding to the component at index.
- Parameters
-
| index | The 0-based component index |
- Exceptions
-
| std::invalid_argument | if index is out of range |
◆ getAbbreviatedSymbol()
| std::optional< char32_t > musx::dom::TimeSignature::getAbbreviatedSymbol |
( |
| ) |
const |
Returns the abbreviated symbol (code point) for this time signature, or std::nullopt if none.
If the musx document lacks music symbol options but abbreviation was requested, the SMuFL values are returned as default substitute values.