33#include "musx/util/EnigmaString.h"
34#include "musx/util/Fraction.h"
35#include "BaseClasses.h"
36#include "EnumClasses.h"
243 bool m_sizeIsPercent;
300 {
return isLinear() ? int(int8_t(
key & 0xff)) + getAlterationOffset(ctx) : 0; }
316 return isSameConcert(src) && m_alterationOffset == src.m_alterationOffset && m_octaveDisplacement == src.m_octaveDisplacement;
386 std::optional<int> actualAlteration = std::nullopt)
const;
397 std::optional<std::vector<int>>
calcKeyMap()
const;
403 std::unique_ptr<music_theory::Transposer>
createTransposer(
int displacement,
int alteration)
const;
409 MUSX_INTEGRITY_ERROR(
"Key signature has invalid key value: " + std::to_string(
key));
416 std::vector<unsigned> calcTonalCenterArrayForSharps()
const;
417 std::vector<unsigned> calcTonalCenterArrayForFlats()
const;
418 std::vector<unsigned> calcTonalCenterArray(
KeyContext ctx)
const;
419 std::vector<int> calcAcciAmountsArray(
KeyContext ctx)
const;
420 std::vector<unsigned> calcAcciOrderArray(
KeyContext ctx)
const;
422 int m_octaveDisplacement{};
423 int m_alterationOffset{};
487 std::string
text()
const;
496 std::vector<std::pair<std::string, util::EnigmaStyles>> m_chunks;
548 MusxInstanceWeak<texts::LyricsTextBase> m_owner;
549 std::vector<StyleSpan> m_enigmaStyleMap;
551 friend class texts::LyricsTextBase;
594 {
return !(*
this == other); }
608 {
return *
this < other || *
this == other; }
615 {
return other < *
this; }
622 {
return other <= *
this; }
669 {
return start <= point && point <=
end; }
680 std::optional<MusicPoint>
nextLocation(
const std::optional<StaffCmper>& forStaff = std::nullopt)
const;
718 {
return std::accumulate(
units.begin(),
units.end(),
Edu{}); }
743 { return acc + (comp.sumCounts() * comp.sumUnits()); }
745 return result /
Edu(NoteType::Whole);
783 void checkIndex(
size_t index)
const
786 throw std::invalid_argument(
"Index out of range. The time signature has " + std::to_string(
components.size())
787 +
" elements. The index requested was " + std::to_string(index) +
".");
792 explicit TimeSignature(
const DocumentWeakPtr& document,
int beats,
Edu unit,
bool hasCompositeTop,
bool hasCompositeBottom,
804 friend class others::Measure;
805 friend class others::OssiaHeader;
806 friend class details::IndependentStaffDetails;
845 :
OthersBase(document, partId, shareMode, cmper) {}
884 Cmper cmper = 0, std::optional<Inci> inci = std::nullopt)
885 :
OthersBase(document, partId, shareMode, cmper, inci)
913 std::optional<MusicPoint>
nextLocation(
const std::optional<StaffCmper>& forStaff = std::nullopt)
const
938 :
OthersBase(document, partId, shareMode, cmper) {}
EnigmaBase class for classes that are commonly used among others, details, entries,...
Definition BaseClasses.h:158
CommonClassBase(const DocumentWeakPtr &document)
Constructs a CommonClassBase object.
Definition BaseClasses.h:167
Base for DOM classes that belong to a Document.
Definition DocumentElement.h:103
DocumentElementNoPart(const DocumentWeakPtr &document)
Constructs the document element (with no meaningful associated part)
Definition DocumentElement.h:112
DocumentPtr getDocument() const
Gets a reference to the Document.
Definition DocumentElement.h:58
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:95
virtual void integrityCheck(const std::shared_ptr< EnigmaBase > &ptrToThis)
Performs a final consistency check after population.
Definition BaseClasses.h:116
Wraps a frame of shared_ptr<const EntryInfo> and an index for per entry access. This class manages ow...
Definition Entries.h:555
Represents the default font settings for a particular element type.
Definition CommonClasses.h:110
static constexpr uint16_t EnigmaStyleHidden
Hidden text bit.
Definition CommonClasses.h:168
static constexpr uint16_t EnigmaStyleItalic
Italic style bit.
Definition CommonClasses.h:164
FontInfo(const DocumentWeakPtr &document, bool sizeIsPercent=false)
constructor
Definition CommonClasses.h:117
static constexpr uint16_t EnigmaStyleStrikeout
Strikeout style bit.
Definition CommonClasses.h:166
bool calcIsSymbolFont() const
Calculates if this is a symbol font. (See others::FontDefinition::calcIsSymbolFont....
Definition CommonClasses.cpp:339
static constexpr uint16_t EnigmaStyleUnderline
Underline style bit.
Definition CommonClasses.h:165
uint16_t getEnigmaStyles() const
Returns the font styles as an nfx bitmask.
Definition CommonClasses.h:201
static constexpr uint16_t EnigmaStyleAbsolute
Fixed-size (absolute) bit.
Definition CommonClasses.h:167
static constexpr uint16_t EnigmaStyleBold
Bold style bit.
Definition CommonClasses.h:163
bool strikeout
Strikeout effect.
Definition CommonClasses.h:127
void setFontIdByName(const std::string &name)
Sets the id of the font from a string name.
Definition CommonClasses.cpp:227
Cmper fontId
Font identifier. This is a Cmper for others::FontDefinition.
Definition CommonClasses.h:122
static std::vector< std::filesystem::path > calcSMuFLPaths()
Returns the standard SMuFL font folder.
Definition CommonClasses.cpp:347
bool calcIsSMuFL() const
Calculates whether this is a SMuFL font.
Definition CommonClasses.cpp:280
std::string getName() const
Get the name of the font.
Definition CommonClasses.cpp:219
bool calcIsSameTypeface(const FontInfo &src) const
Return true if the two fonts specify the same typeface, ignoring size and effects.
Definition CommonClasses.cpp:239
static const xml::XmlElementArray< FontInfo > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool getSizeIsPercent() const
If true, the size of this font is calculated as a percent of the preceding font size (in an Enigma st...
Definition CommonClasses.h:158
bool isSame(const FontInfo &src) const
Return true if the two fonts represent the same font.
Definition CommonClasses.cpp:252
void setEnigmaStyles(uint16_t efx)
Set style effects based on a bitmask. This is mainly useful for capturing text styles from enigma str...
Definition CommonClasses.h:190
bool italic
Italic effect.
Definition CommonClasses.h:125
bool hidden
Hidden effect.
Definition CommonClasses.h:129
bool calcIsDefaultMusic() const
Calculates if this is the default music font.
Definition CommonClasses.h:214
int fontSize
Font size or percent (where 100 is 100%) of preceding font size. (See getSizeIsPercent....
Definition CommonClasses.h:123
bool underline
Underline effect.
Definition CommonClasses.h:126
bool absolute
Fixed size effect.
Definition CommonClasses.h:128
std::optional< std::filesystem::path > calcSMuFLMetaDataPath() const
Returns the filepath of the SMuFL font's metadata json file, if any.
Definition CommonClasses.h:225
bool bold
Bold effect.
Definition CommonClasses.h:124
Shared key signature class that is contained in other classes. (See others::Measure)
Definition CommonClasses.h:251
void integrityCheck(const std::shared_ptr< EnigmaBase > &ptrToThis) override
Performs a final consistency check after population.
Definition CommonClasses.h:405
Cmper getKeyMode() const
Returns the key mode.
Definition CommonClasses.h:294
bool isSame(const KeySignature &src) const
returns whether the two key signatures represent the same key signature, taking into account transpos...
Definition CommonClasses.h:314
int getAlteration(KeyContext ctx) const
For linear keys, returns the number of sharps or flats from -7..7 (if any).
Definition CommonClasses.h:299
bool hideKeySigShowAccis
Instead of a key signature, show accidentals for the key on the notes where they occur.
Definition CommonClasses.h:278
int calcScaleDegree(int displacement) const
Calculates the scale degree for the given displacement, where 0 is the tonic.
Definition CommonClasses.cpp:609
bool isLinear() const
whether this is a linear key
Definition CommonClasses.h:302
int calcEDODivisions() const
Calculates the number of EDO division for the key. (The standard value is 12.)
Definition CommonClasses.cpp:693
bool isBuiltIn() const
whether this is a built-in key
Definition CommonClasses.h:304
KeyContext
Indicates whether to compute key signature values in concert or written pitch.
Definition CommonClasses.h:265
@ Written
Use written pitch (with transposition)
@ Concert
Use concert pitch (untransposed)
music_theory::Pitch calcPitch(int displacement, int alteration, KeyContext ctx) const
Converts a key-relative pitch representation into a spelled pitch.
Definition CommonClasses.cpp:578
int calcTonalCenterIndex(KeyContext ctx) const
Calculates the tonal center index for the key, where C=0, D=1, E=2, ...
Definition CommonClasses.cpp:535
int getOctaveDisplacement(KeyContext ctx) const
The octave displacement if this key is a transposed key.
Definition CommonClasses.h:390
music_theory::Pitch calcPitchFromStaffPosition(int staffPosition, ClefIndex clefIndex, KeyContext ctx, std::optional< int > actualAlteration=std::nullopt) const
Converts a staff position into a spelled pitch using the specified clef and key context.
Definition CommonClasses.cpp:592
uint16_t key
16-bit value intepreted as follows:
Definition CommonClasses.h:276
std::unique_ptr< music_theory::Transposer > createTransposer(int displacement, int alteration) const
Creates a transposer for this KeySignature instance.
Definition CommonClasses.cpp:701
std::optional< music_theory::DiatonicMode > calcDiatonicMode() const
If this key specifies a diatonic mode, returns the mode. This value is independent of EDO divisions....
Definition CommonClasses.cpp:706
void setTransposition(int interval, int keyAdjustment, bool simplify)
Transposes the key by the specified amounts. Set them to zero to remove transposition.
Definition CommonClasses.cpp:620
int calcAlterationOnNote(unsigned noteIndex, KeyContext ctx) const
Calculates the amount of alteration on a note int the key.
Definition CommonClasses.cpp:546
bool isMinor() const
whether this is a built-in minor key
Definition CommonClasses.h:306
bool isNonLinear() const
whether this is a non-linear key
Definition CommonClasses.h:303
static const xml::XmlElementArray< KeySignature > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool isSameConcert(const KeySignature &src) const
returns whether the two key signatures represent the same concert key signature, ignoring transpositi...
Definition CommonClasses.h:320
bool isMajor() const
whether this is a built-in major key
Definition CommonClasses.h:305
std::optional< std::vector< int > > calcKeyMap() const
Calculates the key's diatonic key map.
Definition CommonClasses.cpp:655
bool keyless
Indicates the absence of a key signature.
Definition CommonClasses.h:277
Contains information about a line of lyrics on a system.
Definition CommonClasses.h:439
std::string_view lyricsType
the type of lyric ("chorus", "verse", or "section", corresponding to the xml tags for lyrics text)
Definition CommonClasses.h:453
MusxInstanceList< details::LyricAssign > assignments
The lyric assignments on this line. They all share the same lyricNumber value.
Definition CommonClasses.h:455
Evpu baselinePosition
baseline position of this line on this system, relative to the staff's reference line
Definition CommonClasses.h:452
Cmper lyricNumber
the text number for all lyric assignments on this line.
Definition CommonClasses.h:454
LyricsLineInfo(const DocumentWeakPtr &document, Cmper requestedPartId, std::string_view type, Cmper lyricNo, Evpu baseline)
Constructor function.
Definition CommonClasses.h:447
One text run produced by splitting a syllable's text at an embedded Finale elision marker....
Definition CommonClasses.h:480
bool iterateStyles(util::EnigmaString::TextChunkCallback callback) const
Iterates this run's already-resolved style chunks. In the common case (one style throughout the run) ...
Definition CommonClasses.cpp:1048
bool hasHyphenBefore
See LyricsSyllableInfo::hasHyphenBefore.
Definition CommonClasses.h:483
std::string text() const
This run's text (all style chunks concatenated).
Definition CommonClasses.cpp:1039
bool hasHyphenAfter
See LyricsSyllableInfo::hasHyphenAfter.
Definition CommonClasses.h:484
std::optional< char32_t > joinMarker
The codepoint joining this run to the previous one; absent for the first run.
Definition CommonClasses.h:482
Contains the syllable information for a single syllable. (See texts::LyricsTextBase)
Definition CommonClasses.h:463
bool iterateStyles(util::EnigmaString::TextChunkCallback callback) const
Parse this syllable into chunks with EnigmaStyles for that chunk. In the most common case,...
Definition CommonClasses.cpp:1034
bool hasHyphenAfter
indicates the syllable if followed by a hyphen.
Definition CommonClasses.h:503
std::vector< ElisionRun > calcElisionRuns() const
Splits syllable at embedded Finale elision markers, redistributing hasHyphenBefore and hasHyphenAfter...
Definition CommonClasses.cpp:1058
int strippedUnderscores
indicates the number of trailing underscores stripped (because smart word extensions convert them to ...
Definition CommonClasses.h:504
std::string syllable
the syllable text with no hyphenation or font information.
Definition CommonClasses.h:501
bool hasHyphenBefore
indicates the syllable is preceded by a hyphen.
Definition CommonClasses.h:502
Utility class that represents a single location in musical time.
Definition CommonClasses.h:566
constexpr bool operator>=(const MusicPoint &other) const
Greater-than-or-equal-to comparison operator.
Definition CommonClasses.h:621
constexpr bool operator!=(const MusicPoint &other) const
Inequality comparison operator.
Definition CommonClasses.h:593
constexpr bool operator<=(const MusicPoint &other) const
Less-than-or-equal-to comparison operator.
Definition CommonClasses.h:607
util::Fraction position
Position within the measure, where 1/4 is a quarter note value.
Definition CommonClasses.h:580
constexpr bool operator>(const MusicPoint &other) const
Greater-than comparison operator.
Definition CommonClasses.h:614
constexpr MusicPoint()=default
Constructs a MusicPoint at measure 1, position 0.
constexpr bool operator==(const MusicPoint &other) const
Equality comparison operator.
Definition CommonClasses.h:586
constexpr MusicPoint(MeasCmper measId, util::Fraction pos)
Constructs a MusicPoint object.
Definition CommonClasses.h:574
MeasCmper measureId
Measure ID of the point.
Definition CommonClasses.h:579
constexpr bool operator<(const MusicPoint &other) const
Less-than comparison operator.
Definition CommonClasses.h:600
Utility class that represents of a range of musical time.
Definition CommonClasses.h:635
MusicPoint end
Ending point in the range.
Definition CommonClasses.h:658
MusicRange(const DocumentWeakPtr &document, MeasCmper startMeasId, util::Fraction startPos, MeasCmper endMeasId, util::Fraction endPos)
Constructs a MusicRange object.
Definition CommonClasses.h:643
std::optional< MusicPoint > nextLocation(const std::optional< StaffCmper > &forStaff=std::nullopt) const
Returns the next metric location following the music range.
Definition CommonClasses.cpp:724
MusicPoint start
Starting point in the range.
Definition CommonClasses.h:657
bool contains(MeasCmper measId, util::Fraction position) const
Returns true of the given metric location is contained in this MusicRange instance.
Definition CommonClasses.h:663
bool contains(const MusicPoint &point) const
Returns true if the given metric location is contained in this MusicRange instance.
Definition CommonClasses.h:668
MusicRange(const DocumentWeakPtr &document, MusicPoint startPoint, MusicPoint endPoint)
Constructs a MusicRange object.
Definition CommonClasses.h:652
Provides optional per-type extension methods for MusxInstanceList.
Definition MusxInstance.h:118
EnigmaBase class for all "others" types.
Definition BaseClasses.h:263
Shared time signature class that is derived from other classes. (See others::Measure)
Definition CommonClasses.h:688
bool isSame(const TimeSignature &src) const
returns whether the two time signatures represent the same time signature
Definition CommonClasses.cpp:838
Abbreviation
Specifies whether a time signature is displayed in numeric or abbreviated form.
Definition CommonClasses.h:693
@ 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).
util::Fraction calcBeatValueAt(Edu eduPosition) const
Returns the beat value (duration) at the given EDU position.
Definition CommonClasses.cpp:926
bool isCutTime() const
Returns if this time signature is cut time.
Definition CommonClasses.cpp:857
std::vector< TimeSigComponent > components
the components in the time signature
Definition CommonClasses.h:730
util::Fraction calcTotalDuration() const
Calculates the total duration of the time signature as a fraction of a whole note.
Definition CommonClasses.h:739
std::optional< char32_t > getAbbreviatedSymbol() const
Returns the abbreviated symbol (code point) for this time signature, or std::nullopt if none.
Definition CommonClasses.cpp:810
bool isCommonTime() const
Returns if this time signature is common time.
Definition CommonClasses.cpp:849
MusxInstance< TimeSignature > createComponent(size_t index) const
Creates a time signature corresponding to the component at index.
Definition CommonClasses.h:765
std::pair< util::Fraction, NoteType > calcSimplified() const
Calculates the simplest form of of this time signature, expressed as a fractional count of NoteType u...
Definition CommonClasses.cpp:896
Represents independent time and key signature overrides for a staff.
Definition Details.h:1219
Contains assignment data for a lyric assignment (a single syllable)
Definition Details.h:1310
Represents the enclosure settings for text expressions.
Definition CommonClasses.h:818
bool notTall
"Enforce Minimum Width": don't let shape get taller than it is wide
Definition CommonClasses.h:856
Enclosure(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID, ShareMode shareMode=ShareMode::All, Cmper cmper=0)
Constructs an Enclosure object.
Definition CommonClasses.h:844
Evpu yAdd
Center Y offset - offsets text from center (in EVPU).
Definition CommonClasses.h:848
bool roundCorners
Whether the enclosure has rounded corners.
Definition CommonClasses.h:858
Efix lineWidth
Line thickness in 64ths of an EVPU (EFIX).
Definition CommonClasses.h:851
static const xml::XmlElementArray< Enclosure > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool opaque
Whether the enclosure is opaque.
Definition CommonClasses.h:857
Shape
Enumeration for enclosure shapes.
Definition CommonClasses.h:825
@ NoEnclosure
No enclosure.
Evpu yMargin
Half height - extra space on top/bottom sides (in EVPU).
Definition CommonClasses.h:850
Shape shape
Enclosure shape (default: NoEnclosure).
Definition CommonClasses.h:852
bool fixedSize
Whether the enclosure is fixed size (ignore text bounding box)
Definition CommonClasses.h:854
bool equalAspect
"Match Height and Width"
Definition CommonClasses.h:855
Efix cornerRadius
Corner radius (in EFIX).
Definition CommonClasses.h:853
Evpu xMargin
Half width - extra space on left/right sides (in EVPU).
Definition CommonClasses.h:849
Evpu xAdd
Center X offset - offsets text from center (in EVPU).
Definition CommonClasses.h:847
The representation of a range of music used by Enigma files.
Definition CommonClasses.h:873
MeasCmper startMeas
Starting measure in the range.
Definition CommonClasses.h:889
std::optional< MusicPoint > nextLocation(const std::optional< StaffCmper > &forStaff=std::nullopt) const
Returns the next metric location following the music range.
Definition CommonClasses.h:913
MeasCmper endMeas
Ending measure in the range.
Definition CommonClasses.h:891
MusicRange createMusicRange() const
Creates a MusicRange instance corresponding to this instance. The MusicRange uses util::Fraction for ...
Definition CommonClasses.h:905
Edu startEdu
Starting EDU (Elapsed Durational Unit) in the range.
Definition CommonClasses.h:890
Edu endEdu
Ending EDU (Elapsed Durational Unit) in the range.
Definition CommonClasses.h:892
EnigmaMusicRange(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID, ShareMode shareMode=ShareMode::All, Cmper cmper=0, std::optional< Inci > inci=std::nullopt)
Constructs a EnigmaMusicRange object.
Definition CommonClasses.h:883
bool contains(MeasCmper measId, Edu eduPosition) const
Returns true of the given metric location is contained in this EnigmaMusicRange instance.
Definition CommonClasses.h:897
static const xml::XmlElementArray< EnigmaMusicRange > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
The name and font characteristics of fonts contained.
Definition Others.h:564
Represents the attributes of a measure.
Definition Others.h:1155
Contains horizontal and vertical offsets, alignment, and expansion settings for name positioning.
Definition CommonClasses.h:927
bool indivPos
Indicates that this positioning overrides the default positioning. (Not used by options::StaffOptions...
Definition CommonClasses.h:943
NamePositioning(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID, ShareMode shareMode=ShareMode::All, Cmper cmper=0)
Constructs an NamePositioning object.
Definition CommonClasses.h:937
bool hidden
Inverse of "Show": it hides the name.
Definition CommonClasses.h:946
bool expand
"Expand Single Word"
Definition CommonClasses.h:945
Evpu horzOff
Horizontal distance from staff in Evpu.
Definition CommonClasses.h:940
AlignJustify hAlign
Horizontal alignment for the name text. (xml node is <halign>)
Definition CommonClasses.h:944
AlignJustify justify
Justification for the name text.
Definition CommonClasses.h:942
Evpu vertOff
Vertical offset from staff in Evpu.
Definition CommonClasses.h:941
static const xml::XmlElementArray< NamePositioning > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Represents the definition of a Finale staff.
Definition Staff.h:54
Base class for lyrics text.
Definition Texts.h:123
std::function< bool(const std::string &text, const EnigmaStyles &styles)> TextChunkCallback
Iteration function type that the parser calls back when the font has changed or when recursively pars...
Definition EnigmaString.h:340
A class to represent fractions with integer m_numerator and m_denominator, automatically reduced to s...
Definition Fraction.h:38
static constexpr Fraction fromEdu(dom::Edu edu)
Constructs a Fraction from edu.
Definition Fraction.h:93
A dependency-free, header-only collection of useful functions for music theory.
DiatonicMode
Represents the seven standard diatonic musical modes.
Definition music_theory.hpp:110
int16_t MeasCmper
Enigma meas Cmper (may be negative when not applicable)
Definition Fundamentals.h:66
int32_t Efix
EFIX value (64 per EVPU, 64*288=18432 per inch)
Definition Fundamentals.h:62
std::shared_ptr< const T > MusxInstance
Defines the type of a musx instance stored in a pool.
Definition MusxInstance.h:40
std::string normalizeFontName(std::string_view name)
Normalizes a font name for comparison by removing ASCII whitespace and folding ASCII case.
Definition CommonClasses.cpp:95
constexpr Cmper SCORE_PARTID
The part id of the score.
Definition Fundamentals.h:81
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:59
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:57
uint16_t ClefIndex
Index into options::ClefOptions::clefDefs.
Definition Fundamentals.h:70
int32_t Edu
"Enigma Durational Units" value (1024 per quarter note)
Definition Fundamentals.h:63
std::pair< NoteType, unsigned > Duration
Expresses a duration as a NoteType and a number of dots (unsigned)
Definition CommonClasses.h:62
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition DocumentElement.h:37
std::function< void(const EnigmaBase &)> ImportObjectCallback
Receives each document-pool object newly created by an import helper.
Definition BaseClasses.h:150
std::shared_ptr< Document > DocumentPtr
Shared Document pointer.
Definition DocumentElement.h:35
AlignJustify
Alignment and justification options for staff and group names.
Definition EnumClasses.h:30
std::optional< Cmper > importFontDefinitionInto(const DocumentPtr &target, const MusxInstance< others::FontDefinition > &source, const ImportObjectCallback &onImported)
Copies a font definition into another document, reusing an equivalent one when present.
Definition CommonClasses.cpp:179
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:133
object model for musx file (enigmaxml)
Definition BaseClasses.h:38
A spelled pitch, expressed relative to C4.
Definition music_theory.hpp:83
A single time signature component.
Definition CommonClasses.h:701
std::vector< util::Fraction > counts
Definition CommonClasses.h:702
std::vector< Edu > units
Definition CommonClasses.h:704
util::Fraction sumCounts() const
Compute the sum of all counts.
Definition CommonClasses.h:713
TimeSigComponent normalizeCompound() const
Returns a copy of this component normalized for compound meter. For example, 2 dotted quarters become...
Definition CommonClasses.cpp:881
static std::pair< util::Fraction, Edu > normalizeCompoundUnit(util::Fraction count, Edu unit)
Normalizes a single time signature count and unit to a power-of-two unit.
Definition CommonClasses.cpp:865
Edu sumUnits() const
Compute the sum of all units.
Definition CommonClasses.h:717
bool operator==(const TimeSigComponent &src) const
Test if two TimeSigComponent values are the same.
Definition CommonClasses.h:709