MUSX Document Model
Loading...
Searching...
No Matches
CommonClasses.h
1/*
2 * Copyright (C) 2025, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#pragma once
23
24#include <numeric>
25#include <filesystem>
26#include <array>
27
28#include "musx/util/Fraction.h"
29#include "BaseClasses.h"
30
31namespace music_theory {
32class Transposer;
33enum class DiatonicMode : int;
34} // namespace music_theory
35
36namespace musx {
37namespace dom {
38
39namespace details {
40class IndependentStaffDetails; // forward delcaration
41} // namespace details
42
43namespace others {
44 class Measure; // forward declaration
45 class Staff; // forward declaration
46} // namespace others
47
48// This file contains common classes that are shared among Options, Others, and Details.
49
55enum class NoteType : Edu
56{
57 Maxima = 0x8000,
58 Longa = 0x4000,
59 Breve = 0x2000,
60 Whole = 0x1000,
61 Half = 0x0800,
62 Quarter = 0x0400,
63 Eighth = 0x0200,
64 Note16th = 0x0100,
65 Note32nd = 0x0080,
66 Note64th = 0x0040,
67 Note128th = 0x0020,
68 Note256th = 0x0010,
69 Note512th = 0x0008,
70 Note1024th = 0x0004,
71 Note2048th = 0x0002,
72 Note4096th = 0x0001
73};
74
80{
81 Treble = 0,
82 Alto = 1,
83 Tenor = 2,
84 Bass = 3,
85 Percussion = 4,
86 Treble8vb = 5,
87 Bass8vb = 6,
88 Baritone = 7,
89 FrenchViolin = 8,
90 BaritoneC = 9,
91 MezzoSoprano = 10,
92 Soprano = 11,
93 AltPercussion = 12,
94 Treble8va = 13,
95 Bass8va = 14,
96 Blank = 15,
97 Tab1 = 16,
98 Tab2 = 17
99};
100
104enum class ShowClefMode
105{
106 WhenNeeded,
107 Never,
108 Always
109};
110
119{
120public:
122 int fontSize{};
123 bool bold{};
124 bool italic{};
125 bool underline{};
126 bool strikeout{};
127 bool absolute{};
128 bool hidden{};
129
131
136 std::string getName() const;
137
143 void setFontIdByName(const std::string& name);
144
151 void setEnigmaStyles(uint16_t efx)
152 {
153 bold = efx & 0x01; // FONT_EFX_BOLD
154 italic = efx & 0x02; // FONT_EFX_ITALIC
155 underline = efx & 0x04; // FONT_EFX_UNDERLINE
156 strikeout = efx & 0x20; // FONT_EFX_STRIKEOUT
157 absolute = efx & 0x40; // FONT_EFX_ABSOLUTE
158 hidden = efx & 0x80; // FONT_EFX_HIDDEN
159 }
160
163 { return fontId == 0; }
164
166 bool calcIsSymbolFont() const;
167
169 std::optional<std::filesystem::path> calcSMuFLMetaDataPath() const;
170
174 bool calcIsSMuFL() const { return calcSMuFLMetaDataPath().has_value(); }
175
181 static std::vector<std::filesystem::path> calcSMuFLPaths();
182
184};
185
191{
192public:
194
205 enum class KeyContext {
206 Concert,
207 Written
208 };
209
216 uint16_t key{};
217 bool keyless{};
219
234 Cmper getKeyMode() const { return isLinear() ? key >> 8 : key; }
235
240 { return isLinear() ? int(int8_t(key & 0xff)) + getAlterationOffset(ctx) : 0; }
241
242 bool isLinear() const { return (key & 0xC000) == 0; }
243 bool isNonLinear() const { return (key & 0xC000) != 0; }
244 bool isBuiltIn() const { return isLinear() && getKeyMode() <= 1; }
245 bool isMajor() const { return getKeyMode() == 0; }
246 bool isMinor() const { return getKeyMode() == 1; }
247
251 std::optional<music_theory::DiatonicMode> calcDiatonicMode() const;
252
254 bool isSame(const KeySignature& src)
255 {
256 return isSameConcert(src) && m_alterationOffset == src.m_alterationOffset && m_octaveDisplacement == src.m_octaveDisplacement;
257 }
258
261 {
262 return key == src.key && keyless == src.keyless && hideKeySigShowAccis == src.hideKeySigShowAccis;
263 }
264
281 void setTransposition(int interval, int keyAdjustment, bool simplify);
282
284 void setTransposition(const std::shared_ptr<const others::Staff>& staff);
285
289 int calcTonalCenterIndex(KeyContext ctx) const;
290
294 int calcAlterationOnNote(unsigned noteIndex, KeyContext ctx ) const;
295
299 { return ctx == KeyContext::Written ? m_octaveDisplacement : 0; }
300
302 int calcEDODivisions() const;
303
305 std::optional<std::vector<int>> calcKeyMap() const;
306
311 std::unique_ptr<music_theory::Transposer> createTransposer(int displacement, int alteration) const;
312
313 void integrityCheck() override
314 {
316 if (key >= 0x8000) {
317 MUSX_INTEGRITY_ERROR("Key signature has invalid key value: " + std::to_string(key));
318 }
319 }
320
322
323private:
324 std::vector<unsigned> calcTonalCenterArrayForSharps() const;
325 std::vector<unsigned> calcTonalCenterArrayForFlats() const;
326 std::vector<unsigned> calcTonalCenterArray(KeyContext ctx) const;
327 std::vector<int> calcAcciAmountsArray(KeyContext ctx) const;
328 std::vector<unsigned> calcAcciOrderArray(KeyContext ctx) const;
329
330 int m_octaveDisplacement{};
331 int m_alterationOffset{};
332
333 int getAlterationOffset(KeyContext ctx) const
334 { return ctx == KeyContext::Written ? m_alterationOffset : 0; }
335
336};
337
338namespace texts {
339class LyricsTextBase; // forward delcaration
340} // namespace texts
341
347{
348public:
349
350 std::string syllable;
353
354private:
360 LyricsSyllableInfo(const DocumentWeakPtr& document, const std::string text, bool before, bool after)
361 : CommonClassBase(document), syllable(text), hasHyphenBefore(before), hasHyphenAfter(after)
362 {
363 }
364
365 friend class texts::LyricsTextBase;
366};
367
373{
374public:
375
378 {
379 std::vector<util::Fraction> counts;
381 std::vector<Edu> units;
384
386 bool operator==(const TimeSigComponent& src) const
387 { return counts == src.counts && units == src.units; }
388
391 { return std::accumulate(counts.begin(), counts.end(), util::Fraction{}); }
392
394 Edu sumUnits() const
395 { return std::accumulate(units.begin(), units.end(), Edu{}); }
396 };
397
398 std::vector<TimeSigComponent> components;
399
404 std::pair<util::Fraction, NoteType> calcSimplified() const;
405
408 {
409 util::Fraction result = std::accumulate(components.begin(), components.end(), util::Fraction{},
410 [](const util::Fraction& acc, const TimeSigComponent& comp)
411 { return acc + (comp.sumCounts() * comp.sumUnits()); }
412 );
413 return result / Edu(NoteType::Whole);
414 }
415
417 bool isSame(const TimeSignature& src)
418 {
419 return components == src.components && m_abbreviate == src.m_abbreviate;
420 }
421
425 std::shared_ptr<TimeSignature> createComponent(size_t index) const
426 {
427 checkIndex(index);
428 return std::shared_ptr<TimeSignature>(new TimeSignature(getDocument(), components[index], m_abbreviate));
429 }
430
435 std::optional<char32_t> getAbbreviatedSymbol() const;
436
438 bool isCommonTime() const;
440 bool isCutTime() const;
441
442private:
443 void checkIndex(size_t index) const
444 {
445 if (index > components.size()) {
446 throw std::invalid_argument("Index out of range. The time signature has " + std::to_string(components.size())
447 + " elements. The index requested was " + std::to_string(index) + ".");
448 }
449 }
450
455 explicit TimeSignature(const DocumentWeakPtr& document, int beats, Edu unit, bool hasCompositeTop, bool hasCompositeBottom,
456 std::optional<bool> abbreviate = std::nullopt);
457
462 explicit TimeSignature(const DocumentWeakPtr& document, const TimeSigComponent& timeSigUnit, std::optional<bool> abbreviate)
463 : CommonClassBase(document), m_abbreviate(abbreviate)
464 {
465 components.push_back(timeSigUnit);
466 }
467
468 std::optional<bool> m_abbreviate;
469
470 friend class others::Measure;
471 friend class details::IndependentStaffDetails;
472};
473
474namespace others {
475
476// The following classes are defined here because they are shared by multiple subclasses and container classes.
477
482class Enclosure : public OthersBase
483{
484public:
489 enum class Shape : uint8_t
490 {
491 NoEnclosure = 0,
492 Rectangle = 1,
493 Ellipse = 2,
494 Triangle = 3,
495 Diamond = 4,
496 Pentagon = 5,
497 Hexagon = 6,
498 Heptagon = 7,
499 Octogon = 8
500 };
501
509 explicit Enclosure(const DocumentWeakPtr& document, Cmper partId = 0, ShareMode shareMode = ShareMode::All, Cmper cmper = 0)
510 : OthersBase(document, partId, shareMode, cmper) {}
511
519 bool fixedSize{};
520 bool equalAspect{};
521 bool notTall{};
522 bool opaque{};
524
526};
527
535class MusicRange : public OthersBase
536{
537public:
546 explicit MusicRange(const DocumentWeakPtr& document, Cmper partId = SCORE_PARTID, ShareMode shareMode = ShareMode::All,
547 Cmper cmper = 0, std::optional<Inci> inci = std::nullopt)
548 : OthersBase(document, partId, shareMode, cmper, inci)
549 {
550 }
551
556
560 bool contains(MeasCmper measId, Edu eduPosition) const
561 {
562 return (startMeas < measId || (startMeas == measId && startEdu <= eduPosition)) &&
563 (endMeas > measId || (endMeas == measId && endEdu >= eduPosition));
564 }
565
572 std::optional<std::pair<MeasCmper, Edu>> nextLocation(const std::optional<InstCmper>& forStaff = std::nullopt) const;
573
575};
576
585{
586public:
587
595 explicit NamePositioning(const DocumentWeakPtr& document, Cmper partId = SCORE_PARTID, ShareMode shareMode = ShareMode::All, Cmper cmper = 0)
596 : OthersBase(document, partId, shareMode, cmper) {}
597
599 enum class AlignJustify
600 {
601 Left,
602 Right,
603 Center
604 };
605
609 bool indivPos{};
611 bool expand{};
612
614};
615
616} // namespace others
617} // namespace dom
618} // namespace mux
DocumentPtr getDocument() const
Gets a reference to the Document.
Definition BaseClasses.h:85
virtual void integrityCheck()
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition BaseClasses.h:132
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:68
Base class for classes that are commonly used among others, details, entries, and/or texts....
Definition BaseClasses.h:178
CommonClassBase(const DocumentWeakPtr &document)
Constructs a CommonClassBase object.
Definition BaseClasses.h:185
Represents the default font settings for a particular element type.
Definition CommonClasses.h:119
bool calcIsSymbolFont() const
Calculates if this is a symbol font. (See others::FontDefinition::calcIsSymbolFont....
Definition Implementations.cpp:1169
bool strikeout
Strikeout effect.
Definition CommonClasses.h:126
void setFontIdByName(const std::string &name)
Sets the id of the font from a string name.
Definition Implementations.cpp:1141
Cmper fontId
Font identifier. This is a Cmper for others::FontDefinition.
Definition CommonClasses.h:121
static std::vector< std::filesystem::path > calcSMuFLPaths()
Returns the standard SMuFL font folder.
Definition Implementations.cpp:1177
bool calcIsSMuFL() const
Calculates whether this is a SMuFL font.
Definition CommonClasses.h:174
std::string getName() const
Get the name of the font.
Definition Implementations.cpp:1133
static const xml::XmlElementArray< FontInfo > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
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:151
bool italic
Italic effect.
Definition CommonClasses.h:124
bool hidden
Hidden effect.
Definition CommonClasses.h:128
bool calcIsDefaultMusic() const
Calculates if this is the default music font.
Definition CommonClasses.h:162
int fontSize
Font size.
Definition CommonClasses.h:122
bool underline
Underline effect.
Definition CommonClasses.h:125
bool absolute
Fixed size effect.
Definition CommonClasses.h:127
std::optional< std::filesystem::path > calcSMuFLMetaDataPath() const
Returns the filepath of the SMuFL font's metadata json file, if any.
Definition Implementations.cpp:1153
bool bold
Bold effect.
Definition CommonClasses.h:123
Shared key signature class that is contained in other classes. (See others::Measure)
Definition CommonClasses.h:191
Cmper getKeyMode() const
Returns the key mode.
Definition CommonClasses.h:234
int getAlteration(KeyContext ctx) const
For linear keys, returns the number of sharps or flats from -7..7 (if any).
Definition CommonClasses.h:239
bool hideKeySigShowAccis
Instead of a key signature, show accidentals for the key on the notes where they occur.
Definition CommonClasses.h:218
bool isLinear() const
whether this is a linear key
Definition CommonClasses.h:242
int calcEDODivisions() const
Calculates the number of EDO division for the key. (The standard value is 12.)
Definition Implementations.cpp:1829
bool isBuiltIn() const
whether this is a built-in key
Definition CommonClasses.h:244
KeyContext
Indicates whether to compute key signature values in concert or written pitch.
Definition CommonClasses.h:205
@ Written
Use written pitch (with transposition)
@ Concert
Use concert pitch (untransposed)
int calcTonalCenterIndex(KeyContext ctx) const
Calculates the tonal center index for the key, where C=0, D=1, E=2, ...
Definition Implementations.cpp:1713
int getOctaveDisplacement(KeyContext ctx) const
The octave displacement if this key is a transposed key.
Definition CommonClasses.h:298
uint16_t key
16-bit value intepreted as follows:
Definition CommonClasses.h:216
std::unique_ptr< music_theory::Transposer > createTransposer(int displacement, int alteration) const
Creates a transposer for this KeySignature instance.
Definition Implementations.cpp:1837
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 Implementations.cpp:1842
bool isSameConcert(const KeySignature &src)
returns whether the two key signatures represent the same concert key signature, ignoring transpositi...
Definition CommonClasses.h:260
void setTransposition(int interval, int keyAdjustment, bool simplify)
Transposes the key by the specified amounts. Set them to zero to remove transposition.
Definition Implementations.cpp:1756
int calcAlterationOnNote(unsigned noteIndex, KeyContext ctx) const
Calculates the amount of alteration on a note int the key.
Definition Implementations.cpp:1724
bool isMinor() const
whether this is a built-in minor key
Definition CommonClasses.h:246
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition CommonClasses.h:313
bool isSame(const KeySignature &src)
returns whether the two key signatures represent the same key signature, taking into account transpos...
Definition CommonClasses.h:254
bool isNonLinear() const
whether this is a non-linear key
Definition CommonClasses.h:243
static const xml::XmlElementArray< KeySignature > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool isMajor() const
whether this is a built-in major key
Definition CommonClasses.h:245
std::optional< std::vector< int > > calcKeyMap() const
Calculates the key's diatonic key map.
Definition Implementations.cpp:1791
bool keyless
Indicates the absence of a key signature.
Definition CommonClasses.h:217
Contains the syllable information for a single syllable. (See texts::LyricsTextBase)
Definition CommonClasses.h:347
bool hasHyphenAfter
indicates the syllable if followed by a hyphen.
Definition CommonClasses.h:352
std::string syllable
the syllable text with no hyphenation or font information.
Definition CommonClasses.h:350
bool hasHyphenBefore
indicates the syllable is preceded by a hyphen.
Definition CommonClasses.h:351
Base class for all "others" types.
Definition BaseClasses.h:223
Shared time signature class that is derived from other classes. (See others::Measure)
Definition CommonClasses.h:373
bool isCutTime() const
Returns if this time signature is cut time.
Definition Implementations.cpp:3781
std::vector< TimeSigComponent > components
the components in the time signature
Definition CommonClasses.h:398
bool isSame(const TimeSignature &src)
returns whether the two time signatures represent the same time signature
Definition CommonClasses.h:417
util::Fraction calcTotalDuration() const
Calculates the total duration of the time signature as a fraction of a whole note.
Definition CommonClasses.h:407
std::optional< char32_t > getAbbreviatedSymbol() const
Returns the abbreviated symbol (code point) for this time signature, or std::nullopt if none.
Definition Implementations.cpp:3750
bool isCommonTime() const
Returns if this time signature is common time.
Definition Implementations.cpp:3773
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 Implementations.cpp:3789
std::shared_ptr< TimeSignature > createComponent(size_t index) const
Creates a time signature corresponding to the component at index.
Definition CommonClasses.h:425
Represents independent time and key signature overrides for a staff.
Definition Details.h:715
Represents the enclosure settings for text expressions.
Definition CommonClasses.h:483
bool notTall
"Enforce Minimum Width": don't let shape get taller than it is wide
Definition CommonClasses.h:521
Evpu yAdd
Center Y offset - offsets text from center (in EVPU).
Definition CommonClasses.h:513
Enclosure(const DocumentWeakPtr &document, Cmper partId=0, ShareMode shareMode=ShareMode::All, Cmper cmper=0)
Constructs an Enclosure object.
Definition CommonClasses.h:509
bool roundCorners
Whether the enclosure has rounded corners.
Definition CommonClasses.h:523
Efix lineWidth
Line thickness in 64ths of an EVPU (EFIX).
Definition CommonClasses.h:516
static const xml::XmlElementArray< Enclosure > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool opaque
Whether the enclosure is opaque.
Definition CommonClasses.h:522
Shape
Enumeration for enclosure shapes.
Definition CommonClasses.h:490
Evpu yMargin
Half height - extra space on top/bottom sides (in EVPU).
Definition CommonClasses.h:515
Shape shape
Enclosure shape (default: NoEnclosure).
Definition CommonClasses.h:517
bool fixedSize
Whether the enclosure is fixed size (ignore text bounding box)
Definition CommonClasses.h:519
bool equalAspect
"Match Height and Width"
Definition CommonClasses.h:520
Efix cornerRadius
Corner radius (in EFIX).
Definition CommonClasses.h:518
Evpu xMargin
Half width - extra space on left/right sides (in EVPU).
Definition CommonClasses.h:514
Evpu xAdd
Center X offset - offsets text from center (in EVPU).
Definition CommonClasses.h:512
Represents the attributes of a measure.
Definition Others.h:964
Represents a range of music using measure and EDUs.
Definition CommonClasses.h:536
Edu startEdu
Starting EDU (Elapsed Durational Unit) in the range.
Definition CommonClasses.h:553
MeasCmper endMeas
Ending measure in the range.
Definition CommonClasses.h:554
static const xml::XmlElementArray< MusicRange > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
std::optional< std::pair< MeasCmper, Edu > > nextLocation(const std::optional< InstCmper > &forStaff=std::nullopt) const
Returns the next metric location following the music range.
Definition Implementations.cpp:2186
Edu endEdu
Ending EDU (Elapsed Durational Unit) in the range.
Definition CommonClasses.h:555
MusicRange(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID, ShareMode shareMode=ShareMode::All, Cmper cmper=0, std::optional< Inci > inci=std::nullopt)
Constructs a MusicRange object.
Definition CommonClasses.h:546
MeasCmper startMeas
Starting measure in the range.
Definition CommonClasses.h:552
bool contains(MeasCmper measId, Edu eduPosition) const
Returns true of the given metric location is contained in this MusicRange instance.
Definition CommonClasses.h:560
Contains horizontal and vertical offsets, alignment, and expansion settings for name positioning.
Definition CommonClasses.h:585
bool indivPos
Indicates that this positioning overrides the default positioning. (Not used by options::StaffOptions...
Definition CommonClasses.h:609
NamePositioning(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID, ShareMode shareMode=ShareMode::All, Cmper cmper=0)
Constructs an NamePositioning object.
Definition CommonClasses.h:595
bool expand
"Expand Single Word"
Definition CommonClasses.h:611
AlignJustify
Alignment and justification options for staff and group names.
Definition CommonClasses.h:600
@ Left
Left alignment or justification (the default value.)
Evpu horzOff
Horizontal distance from staff in Evpu.
Definition CommonClasses.h:606
AlignJustify hAlign
Horizontal alignment for the name text. (xml node is <halign>)
Definition CommonClasses.h:610
AlignJustify justify
Justification for the name text.
Definition CommonClasses.h:608
Evpu vertOff
Vertical offset from staff in Evpu.
Definition CommonClasses.h:607
static const xml::XmlElementArray< NamePositioning > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Represents the definition of a Finale staff.
Definition Others.h:2021
Base class for lyrics text.
Definition Texts.h:118
A class to represent fractions with integer m_numerator and m_denominator, automatically reduced to s...
Definition Fraction.h:37
A dependency-free, header-only collection of useful functions for music theory.
DiatonicMode
Represents the seven standard diatonic musical modes.
Definition music_theory.hpp:49
ShowClefMode
Enum representing the clef display mode for a frame.
Definition CommonClasses.h:105
@ WhenNeeded
Clef is displayed only when needed (the default).
@ Always
Clef is always displayed. (xml value is "forced")
@ Never
Clef is never displayed. (xml value is "hidden")
NoteType
Enum class representing note types based on EDU values.
Definition CommonClasses.h:56
int16_t MeasCmper
Enigma meas Cmper (may be negative when not applicable)
Definition Fundamentals.h:64
int32_t Efix
EFIX value (64 per EVPU, 64*288=18432 per inch)
Definition Fundamentals.h:60
constexpr Cmper SCORE_PARTID
The part id of the score.
Definition Fundamentals.h:80
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
DefaultClefType
Clef types used by default in Finale documents. The values correspond to indices into musx::dom::opti...
Definition CommonClasses.h:80
@ Bass8vb
F clef, sounds one octave lower (8vb).
@ Alto
C clef, centered on third line (Alto clef).
@ BaritoneC
C clef on fifth line (Baritone clef).
@ Tab1
Tablature clef (5 lines).
@ Treble
G clef, standard treble.
@ FrenchViolin
G clef placed on first line (French violin clef).
@ Treble8va
G clef, sounds one octave higher (8va).
@ Bass8va
F clef, sounds one octave higher (8va).
@ AltPercussion
Alternate percussion clef, heavy vertical hash marks (no pitch).
@ Soprano
C clef on first line (Soprano clef).
@ Bass
F clef, standard bass.
@ Percussion
Percussion clef, open rectangle (no pitch).
@ Baritone
F clef on third line (Baritone clef).
@ Tab2
Tablature clef (5 lines, alternative style).
@ Treble8vb
G clef, sounds one octave lower (8vb).
@ Blank
Blank clef (invisible, no symbol).
@ MezzoSoprano
C clef on second line (Mezzo-soprano clef).
@ Tenor
C clef, centered on fourth line (Tenor clef).
uint16_t ClefIndex
Index into options::ClefOptions::clefDefs.
Definition Fundamentals.h:67
int32_t Edu
"Enigma Durational Units" value (1024 per quarter note)
Definition Fundamentals.h:61
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition BaseClasses.h:53
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:127
object model for musx file (enigmaxml)
Definition BaseClasses.h:32
A single time signature component.
Definition CommonClasses.h:378
std::vector< util::Fraction > counts
Definition CommonClasses.h:379
std::vector< Edu > units
Definition CommonClasses.h:381
util::Fraction sumCounts() const
Compute the sum of all counts.
Definition CommonClasses.h:390
Edu sumUnits() const
Compute the sum of all units.
Definition CommonClasses.h:394
bool operator==(const TimeSigComponent &src) const
Test if two TimeSigComponent values are the same.
Definition CommonClasses.h:386