MUSX Document Model
Loading...
Searching...
No Matches
Details.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#include <functional>
24#include <vector>
25#include <unordered_set>
26#include <cmath>
27#include <map>
28
29#include "music_theory/music_theory.hpp"
30
31#include "musx/util/EnigmaString.h"
32#include "MusxInstance.h"
33#include "BaseClasses.h"
34#include "CommonClasses.h"
35#include "Options.h"
36#include "Others.h"
37#include "Staff.h"
38 // do not add other dom class dependencies. Use Implementations.h for implementations that need total class access.
39
40namespace musx {
41namespace dom {
42
43class EntryInfoPtr;
44class EntryFrame;
45class EntryInfo;
46
47namespace others {
48class ChordSuffixElement;
49class FretboardGroup;
50class FretInstrument;
51class FretboardStyle;
52class StaffUsed;
53class Measure;
54class MultiStaffInstrumentGroup;
55class TextBlock;
56} // namespace others
57
58namespace texts {
59class ExpressionText;
60class LyricsChorus;
61class LyricsSection;
62class LyricsVerse;
63} // namespace others
64
69namespace details {
70
80{
81public:
83 explicit AccidentalAlterations(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
84 : NoteDetailsBase(document, partId, shareMode, entnum, inci), customFont(std::make_shared<FontInfo>(document))
85 {
86 }
87
89 int percent{};
92 char32_t altChar{};
93 std::shared_ptr<FontInfo> customFont;
94 bool useOwnFont{};
95 bool allowVertPos{};
96
97 NoteNumber getNoteId() const override { return noteId; }
98
99 constexpr static std::string_view XmlNodeName = "acciAlter";
101};
102
110{
111public:
120 explicit ArticulationAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
121 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
122
129 bool aboveEntry{};
130 bool hide{};
131 bool neverStack{};
132 bool avoidSlur{};
134
136 constexpr static std::string_view XmlNodeName = "articAssign";
137};
138
152class Baseline : public DetailsBase
153{
154public:
164 explicit Baseline(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff, std::optional<Inci> inci)
165 : DetailsBase(document, partId, shareMode, system, staff, inci) {}
166
170 std::optional<Cmper> lyricNumber{};
171
173};
174
180{
181public:
190 explicit BaselineNoInci(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff)
191 : Baseline(document, partId, shareMode, system, staff, std::nullopt) {}
192};
193
199{
200public:
202
203 constexpr static std::string_view XmlNodeName = "baselinesSysChords";
204};
205
211{
212public:
214
215 constexpr static std::string_view XmlNodeName = "baselinesSysExprAboveStaff";
216};
217
223{
224public:
226
227 constexpr static std::string_view XmlNodeName = "baselinesSysExprBelowStaff";
228};
229
235{
236public:
238
239 constexpr static std::string_view XmlNodeName = "baselinesSysFingerboards";
240};
241
247{
248public:
249 using Baseline::Baseline;
250
251 constexpr static std::string_view XmlNodeName = "baselinesSysLyricsChorus";
252};
253
259{
260public:
261 using Baseline::Baseline;
262
263 constexpr static std::string_view XmlNodeName = "baselinesSysLyricsSection";
264};
265
271{
272public:
273 using Baseline::Baseline;
274
275 constexpr static std::string_view XmlNodeName = "baselinesSysLyricsVerse";
276};
277
285{
286public:
288
290 constexpr static std::string_view XmlNodeName = "baselinesChords";
291};
292
300{
301public:
303
305 constexpr static std::string_view XmlNodeName = "baselinesExprAboveStaff";
306};
307
315{
316public:
318
320 constexpr static std::string_view XmlNodeName = "baselinesExprBelowStaff";
321};
322
330{
331public:
333
335 constexpr static std::string_view XmlNodeName = "baselinesFingerboards";
336};
337
345{
346public:
347 using Baseline::Baseline;
348
351 constexpr static std::string_view XmlNodeName = "baselinesLyricsChorus";
352};
353
361{
362public:
363 using Baseline::Baseline;
364
367 constexpr static std::string_view XmlNodeName = "baselinesLyricsSection";
368};
369
377{
378public:
379 using Baseline::Baseline;
380
383 constexpr static std::string_view XmlNodeName = "baselinesLyricsVerse";
384};
385
393{
394private:
395 bool m_active = true; // this value is set by the factory.
396
397protected:
399 template <typename SecondaryBeamType>
400 static bool calcIsFeatheredBeamImpl(const EntryInfoPtr& entryInfo, Evpu& outLeftY, Evpu& outRightY);
401
403 template <typename SecondaryBeamType>
405
406public:
415 explicit BeamAlterations(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional<Inci> inci = std::nullopt)
416 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
417
420
429
434
437 bool isActive() const { return m_active; }
438
440 template <typename T,
441 std::enable_if_t<std::is_base_of_v<BeamAlterations, T>, int> = 0>
442 static void calcAllActiveFlags(const DocumentPtr& document);
443
447 static MusxInstance<BeamAlterations> getPrimaryForStem(const EntryInfoPtr& entryInfo, StemSelection stemSelection = StemSelection::MatchEntry); // must be defined in Details.cpp
448
453 static MusxInstance<BeamAlterations> getSecondaryForStem(const EntryInfoPtr& entryInfo, Edu dura, StemSelection stemSelection = StemSelection::MatchEntry); // must be defined in Details.cpp
454
456};
457
465{
466public:
474 explicit BeamAlterationsDownStem(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
475 : BeamAlterations(document, partId, shareMode, entnum) {}
476
477 constexpr static std::string_view XmlNodeName = "beamAltPrimDownStem";
478};
479
487{
488public:
496 explicit BeamAlterationsUpStem(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
497 : BeamAlterations(document, partId, shareMode, entnum) {}
498
499 constexpr static std::string_view XmlNodeName = "beamAltPrimUpStem";
500};
501
510{
511public:
519 explicit BeamExtension(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
520 : EntryDetailsBase(document, partId, shareMode, entnum) {}
521
524 unsigned mask{};
531
534 unsigned calcMaxExtension() const;
535
539 static MusxInstance<BeamExtension> getForStem(const EntryInfoPtr& entryInfo, StemSelection stemSelection = StemSelection::MatchEntry); // must be defined in Details.cpp
540
542};
543
549{
550public:
552
553 constexpr static std::string_view XmlNodeName = "beamExtendDownStem";
554};
555
561{
562public:
564
565 constexpr static std::string_view XmlNodeName = "beamExtendUpStem";
566};
567
577{
578public:
580 explicit BeamStubDirection(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
581 : EntryDetailsBase(document, partId, shareMode, entnum)
582 {
583 }
584
585 unsigned mask{};
588
590 bool isLeft() const { return mask != 0; }
591
592 constexpr static std::string_view XmlNodeName = "beamStub";
594};
595
608class Bracket : public DetailsBase
609{
610public:
612 explicit Bracket(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2, Inci inci)
613 : DetailsBase(document, partId, shareMode, cmper1, cmper2, inci)
614 {
615 }
616
618 explicit Bracket(const DocumentWeakPtr& document)
619 : DetailsBase(document, SCORE_PARTID, Base::ShareMode::All, 0, 0, 0)
620 {
621 }
622
627 enum class BracketStyle : int
628 {
629 None = 0,
630 ThickLine = 1,
632 PianoBrace = 3,
633 Unknown4,
634 Unknown5,
636 Unknown7,
637 DeskBracket = 8
638 };
639
645
646 constexpr static std::string_view XmlNodeName = "brackSpec";
648};
649
658{
659 Cmper calcFretboardGroupCmper() const;
660
661public:
671 explicit ChordAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
672 : DetailsBase(document, partId, shareMode, staffId, meas, inci)
673 {
674 }
675
680 enum class BassPosition
681 {
682 AfterRoot, // default value may not appear in xml (but text appears in Finale binary)
683 UnderRoot,
684 Subtext
685 };
686
693 int rootAlter{};
695 bool playSuffix{};
696 bool showRoot{};
697 bool playRoot{};
699 bool showSuffix{};
702 int bassAlter{};
705 bool showAltBass{};
706 bool playAltBass{};
707 int capoValue{};
719 int chPercent{};
720 int fbPercent{};
721
724
728
732
733 constexpr static std::string_view XmlNodeName = "chordAssign";
735};
736
751class ClefOctaveFlats : public DetailsArray<int, 7>
752{
753 std::string_view xmlTag() const override { return XmlNodeName; }
754
755public:
757
758 constexpr static std::string_view XmlNodeName = "clefOctvFlats";
760};
761
780class ClefOctaveSharps : public DetailsArray<int, 7>
781{
782 std::string_view xmlTag() const override { return XmlNodeName; }
783
784public:
786
787 constexpr static std::string_view XmlNodeName = "clefOctvSharps";
789};
790
800{
801public:
803 explicit CrossStaff(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
804 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
805 {
806 }
807
810
811 NoteNumber getNoteId() const override { return noteId; }
812
813 constexpr static std::string_view XmlNodeName = "crossStaff";
815};
816
826{
827public:
835 explicit CustomStem(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
836 : EntryDetailsBase(document, partId, shareMode, entnum) {}
837
841
848 bool calcIsHiddenStem() const;
849
853 static MusxInstance<CustomStem> getForStem(const EntryInfoPtr& entryInfo, StemSelection stemSelection = StemSelection::MatchEntry); // must be defined in Details.cpp
854
856};
857
865{
866public:
868
869 constexpr static std::string_view XmlNodeName = "stemDefDown";
870};
871
879{
880public:
882
883 constexpr static std::string_view XmlNodeName = "stemDefUp";
884};
885
895{
896public:
898 explicit DotAlterations(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
899 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
900 {
901 }
902
907
908 NoteNumber getNoteId() const override { return noteId; }
909
910 constexpr static std::string_view XmlNodeName = "dotOffset";
912};
913
925{
926public:
934 explicit EntryPartFieldDetail(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
935 : EntryDetailsBase(document, partId, shareMode, entnum) {}
936
938 bool freezeStem{};
939 bool upStem{};
940
942 constexpr static std::string_view XmlNodeName = "entryPartFieldDetail";
943};
944
954{
955public:
963 explicit EntrySize(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
964 : EntryDetailsBase(document, partId, shareMode, entnum) {}
965
966 int percent{};
967
969 constexpr static std::string_view XmlNodeName = "entrySize";
970};
971
985{
986public:
990 explicit FretboardDiagram(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
991 : DetailsBase(document, partId, shareMode, cmper1, cmper2)
992 {}
993
1001 enum class Shape
1002 {
1003 None,
1004 Closed,
1005 Open,
1006 Muted,
1007 Custom
1008 };
1009
1014 class Cell
1015 {
1016 public:
1017 int string{};
1018 int fret{};
1021
1023 };
1024
1029 class Barre
1030 {
1031 public:
1032 int fret{};
1035
1037 };
1038
1039 int numFrets{};
1041 bool lock{};
1042 bool showNum{};
1045
1046 std::vector<std::shared_ptr<Cell>> cells;
1047 std::vector<std::shared_ptr<Barre>> barres;
1048
1049 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1050 {
1051 this->DetailsBase::integrityCheck(ptrToThis);
1052 if (numFretCells != int(cells.size())) {
1053 const int oldVal = numFretCells;
1054 numFretCells = int(cells.size());
1055 MUSX_INTEGRITY_ERROR("FretboardDiagram " + std::to_string(getCmper1()) + ", " + std::to_string(getCmper2())
1056 + " specifies the wrong number of cells (" + std::to_string(oldVal) + ").");
1057 }
1058 if (numFretBarres != int(barres.size())) {
1059 const int oldVal = numFretBarres;
1060 numFretBarres = int(barres.size());
1061 MUSX_INTEGRITY_ERROR("FretboardDiagram " + std::to_string(getCmper1()) + ", " + std::to_string(getCmper2())
1062 + " specifies the wrong number of barres (" + std::to_string(oldVal) + ").");
1063 }
1064 }
1065
1066 constexpr static std::string_view XmlNodeName = "fretboard";
1068};
1069
1078{
1079public:
1088 explicit GFrameHold(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas)
1089 : DetailsBase(document, partId, shareMode, staffId, meas), frames(MAX_LAYERS) {}
1090
1091 // Public properties corresponding to the XML structure
1092 std::optional<ClefIndex> clefId;
1098 std::vector<Cmper> frames;
1099
1102
1105
1107 bool calcIsMultiLayer() const
1108 {
1109 return std::count_if(frames.begin(), frames.end(), [](Cmper frameId) { return frameId != 0; }) > 1;
1110 }
1111
1114 {
1115 return std::find_if(frames.begin(), frames.end(), [](Cmper frameId) { return frameId != 0; }) != frames.end();
1116 }
1117
1121 std::pair<MusxInstance<others::Frame>, Edu> findLayerFrame(LayerIndex layerIndex) const;
1122
1126 bool iterateRawEntries(std::function<bool(const MusxInstance<Entry>&, LayerIndex)> iterator) const;
1127
1128 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1129 {
1130 this->DetailsBase::integrityCheck(ptrToThis);
1131 if (clefListId && clefId.has_value()) {
1132 MUSX_INTEGRITY_ERROR("GFrameHold for staff " + std::to_string(getCmper1()) + " and measure " + std::to_string(getCmper2()) + " has both clef and clef list.");
1133 }
1134 if (!clefListId && !clefId.has_value()) {
1135 MUSX_INTEGRITY_ERROR("GFrameHold for staff " + std::to_string(getCmper1()) + " and measure " + std::to_string(getCmper2()) + " has neither clef nor clef list.");
1136 }
1137 }
1138
1139 constexpr static std::string_view XmlNodeName = "gfhold";
1141};
1142
1151{
1152public:
1161 explicit IndependentStaffDetails(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas)
1162 : DetailsBase(document, partId, shareMode, staffId, meas)
1163 {
1164 }
1165
1166 // Key signature info
1167 std::shared_ptr<KeySignature> keySig;
1168 bool hasKey{};
1169
1170 // Time signature info
1175
1178 bool altNumTsig{};
1179 bool altDenTsig{};
1182 bool hasTime{};
1183
1186
1190
1191 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1192 {
1193 DetailsBase::integrityCheck(ptrToThis);
1194 if (hasKey && !keySig) {
1195 keySig = std::make_shared<KeySignature>(getDocument());
1196 }
1197 }
1198
1199 constexpr static std::string_view XmlNodeName = "floats";
1201};
1202
1211public:
1213 explicit KeySymbolListElement(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
1214 : DetailsBase(document, partId, shareMode, cmper1, cmper2) {}
1215
1216 std::string accidentalString;
1218
1221 return static_cast<int16_t>(getCmper2());
1222 }
1223
1224 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1225 {
1226 DetailsBase::integrityCheck(ptrToThis);
1227 if (std::abs(getAlterationValue()) > MAX_ALTERATIONS) {
1229 "KeySymbolListElement for list " + std::to_string(getCmper1()) + " has invalid value " + std::to_string(getAlterationValue()));
1230 }
1231 }
1232
1233 constexpr static std::string_view XmlNodeName = "keySymList";
1235};
1236
1242{
1243public:
1252 explicit LyricAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1253 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
1254
1256 unsigned syllable{};
1264
1267
1269 virtual LyricTextType getLyricTextType() const = 0;
1270
1275
1280
1282};
1283
1291{
1292public:
1294
1296 LyricTextType getLyricTextType() const override;
1297
1300 constexpr static std::string_view XmlNodeName = "lyrDataChorus";
1301};
1302
1310{
1311public:
1313
1315 LyricTextType getLyricTextType() const override;
1316
1319 constexpr static std::string_view XmlNodeName = "lyrDataSection";
1320};
1321
1329{
1330public:
1332
1334 LyricTextType getLyricTextType() const override;
1335
1338 constexpr static std::string_view XmlNodeName = "lyrDataVerse";
1339};
1340
1349{
1350public:
1353
1362 explicit LyricEntryInfo(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional<Inci> inci = std::nullopt)
1363 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
1364
1365 std::optional<AlignJustify> justify{};
1366 std::optional<AlignJustify> align{};
1367
1369 constexpr static std::string_view XmlNodeName = "lyricEntryInfo";
1370};
1371
1380{
1381public:
1391 explicit MeasureNumberIndividualPositioning(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
1392 : DetailsBase(document, partId, shareMode, staffId, meas, inci)
1393 {
1394 }
1395
1401 {
1402 None,
1403 Show,
1404 Hide
1405 };
1406
1413 std::shared_ptr<others::Enclosure> enclosure;
1414
1415 constexpr static std::string_view XmlNodeName = "measNumbIndivPos";
1417};
1418
1435{
1436public:
1446 explicit MeasureTextAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
1447 : DetailsBase(document, partId, shareMode, staffId, meas, inci)
1448 {
1449 }
1450
1456 bool hidden{};
1457
1460
1463
1464 constexpr static std::string_view XmlNodeName = "measTextAssign";
1466};
1467
1477{
1478public:
1480 explicit NoteAlterations(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1481 : NoteDetailsBase(document, partId, shareMode, entnum, inci), customFont(new FontInfo(document))
1482 {
1483 }
1484
1486 int percent{};
1488 char32_t altNhead{};
1489 bool useOwnFont{};
1490 std::shared_ptr<FontInfo> customFont{};
1493 bool enharmonic{};
1495
1496 NoteNumber getNoteId() const override { return noteId; }
1497
1498 constexpr static std::string_view XmlNodeName = "noteAlter";
1500};
1501
1511{
1512public:
1514 explicit PercussionNoteCode(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1515 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
1516 {
1517 }
1518
1521
1522 NoteNumber getNoteId() const override { return noteId; }
1523
1524 constexpr static std::string_view XmlNodeName = "percussionNoteCode";
1526};
1527
1535{
1536public:
1546 explicit SecondaryBeamAlterationsDownStem(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1547 : BeamAlterations(document, partId, shareMode, entnum, inci) {}
1548
1555 static bool calcIsFeatheredBeam(const EntryInfoPtr& entryInfo, Evpu& outLeftY, Evpu& outRightY)
1556 { return calcIsFeatheredBeamImpl<SecondaryBeamAlterationsDownStem>(entryInfo, outLeftY, outRightY); }
1557
1558 constexpr static std::string_view XmlNodeName = "beamAltSecDownStem";
1559};
1560
1568{
1569public:
1579 explicit SecondaryBeamAlterationsUpStem(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1580 : BeamAlterations(document, partId, shareMode, entnum, inci) {}
1581
1588 static bool calcIsFeatheredBeam(const EntryInfoPtr& entryInfo, Evpu& outLeftY, Evpu& outRightY)
1589 { return calcIsFeatheredBeamImpl<SecondaryBeamAlterationsUpStem>(entryInfo, outLeftY, outRightY); }
1590
1591 constexpr static std::string_view XmlNodeName = "beamAltSecUpStem";
1592};
1593
1603{
1604public:
1606 explicit SecondaryBeamBreak(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
1607 : EntryDetailsBase(document, partId, shareMode, entnum)
1608 {
1609 }
1610
1611 unsigned mask{};
1613
1621 {
1622 MUSX_ASSERT_IF(!mask || mask >= unsigned(NoteType::Eighth)) {
1623 return 0; // invalid mask values have already been flagged and supposedly corrected by #integrityCheck.
1624 }
1625 for (unsigned shift = 0; true; shift++) {
1626 if (mask & (unsigned(NoteType::Note16th) >> shift)) {
1627 return shift + 2; // the 2nd beam is the 16th beam and the first one we checked.
1628 }
1629 }
1630 assert(false); // should not be able to get here
1631 return 0;
1632 }
1633
1634 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1635 {
1637 if (!mask) {
1638 mask = unsigned(NoteType::Note4096th);
1639 MUSX_INTEGRITY_ERROR("Secondary beam break for entry" + std::to_string(getEntryNumber()) + " has no breaks.");
1640 }
1641 if (mask >= unsigned(NoteType::Eighth)) {
1642 mask = unsigned(NoteType::Eighth) - 1;
1643 MUSX_INTEGRITY_ERROR("Secondary beam break for entry" + std::to_string(getEntryNumber()) + " specifies a value that cannot be a secondary beam.");
1644 }
1645 }
1646
1647 constexpr static std::string_view XmlNodeName = "secBeamBreak";
1649};
1650
1661{
1662public:
1665 explicit ShapeNoteBase(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
1666 : DetailsBase(document, partId, shareMode, cmper1, cmper2)
1667 {}
1668
1673 {
1674 public:
1675 char32_t doubleWhole{};
1676 char32_t whole{};
1677 char32_t half{};
1678 char32_t quarter{};
1679
1681 };
1682
1683 std::vector<std::shared_ptr<NoteShapes>> noteShapes;
1686
1687 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1688 {
1689 this->DetailsBase::integrityCheck(ptrToThis);
1690 const size_t currentSize = noteShapes.size();
1691 if (currentSize < music_theory::STANDARD_DIATONIC_STEPS) {
1692 for (size_t x = currentSize; x < music_theory::STANDARD_DIATONIC_STEPS; x++) {
1693 noteShapes.emplace_back(std::make_shared<NoteShapes>());
1694 }
1695 MUSX_INTEGRITY_ERROR("For ShapeNoteBase cmper " + std::to_string(getCmper1()) + ", only " + std::to_string(currentSize)
1696 + " note shapes were provided but at least " + std::to_string(music_theory::STANDARD_DIATONIC_STEPS) + " were expected.");
1697 }
1698 }
1699
1701};
1702
1711{
1712public:
1714
1715 constexpr static std::string_view XmlNodeName = "shapeNote";
1716};
1717
1726{
1727public:
1729
1730 constexpr static std::string_view XmlNodeName = "shapeNoteStyle";
1731};
1732
1739class StaffGroup : public DetailsBase {
1740public:
1749 StaffGroup(const DocumentWeakPtr& document, Cmper partId, Base::ShareMode shareMode, Cmper cmper1, Cmper cmper2)
1750 : DetailsBase(document, partId, shareMode, cmper1, cmper2) {}
1751
1754
1757
1763 {
1764 OnlyOnStaves,
1767 };
1768
1773 enum class HideStaves
1774 {
1775 Normally,
1776 AsGroup,
1777 None
1778 };
1779
1780 // Public properties corresponding to the XML structure, ordered as they appear in the XML
1788 std::shared_ptr<Bracket> bracket{};
1793 bool ownBarline{};
1796 bool hideName{};
1805
1811 std::unordered_set<StaffCmper> staves;
1812
1816
1820
1823
1829
1835
1837 bool isAllMeasures() const
1838 { return (startMeas == 1 && endMeas == (std::numeric_limits<MeasCmper>::max)()); }
1839
1840 void integrityCheck(const std::shared_ptr<Base>& ptrToThis) override
1841 {
1842 this->DetailsBase::integrityCheck(ptrToThis);
1843 if (endMeas <= startMeas || startMeas <= 0) {
1844 MUSX_INTEGRITY_ERROR("Staff group " + std::to_string(getCmper2()) + " for part " + std::to_string(getSourcePartId())
1845 + " starts at measure " + std::to_string(startMeas) + " and ends at measure " + std::to_string(endMeas));
1846 }
1847 if (!bracket) {
1848 // this is not an error. Finale omits the bracket node for groups with entirely default bracket info.
1849 bracket = std::make_shared<Bracket>(getDocument());
1850 }
1851 }
1852
1853 constexpr static std::string_view XmlNodeName = "staffGroup";
1855};
1856
1862{
1863public:
1864 std::optional<size_t> startSlot;
1865 std::optional<size_t> endSlot;
1868
1872 StaffGroupInfo(const MusxInstance<StaffGroup>& staffGroup,
1873 const MusxInstanceList<others::StaffUsed>& inpSysStaves);
1874
1876 std::optional<size_t> numStaves() const
1877 {
1878 if (startSlot && endSlot) {
1879 return endSlot.value() - startSlot.value() + 1;
1880 }
1881 return std::nullopt;
1882 }
1883
1888 void iterateStaves(MeasCmper measId, Edu eduPosition, std::function<bool(const MusxInstance<others::StaffComposite>&)> iterator) const;
1889
1894 static std::vector<StaffGroupInfo> getGroupsAtMeasure(MeasCmper measureId, Cmper linkedPartId,
1896};
1897
1907{
1908public:
1917 explicit StaffSize(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staffId)
1918 : DetailsBase(document, partId, shareMode, system, staffId)
1919 {
1920 }
1921
1923
1927
1928 constexpr static std::string_view XmlNodeName = "staffSize";
1930};
1931
1941{
1942public:
1944 explicit StemAlterations(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
1945 : EntryDetailsBase(document, partId, shareMode, entnum)
1946 {
1947 }
1948
1953
1954 constexpr static std::string_view XmlNodeName = "stemAdjust";
1956};
1957
1967{
1968public:
1970
1971 constexpr static std::string_view XmlNodeName = "beamStemAdjust";
1972};
1973
1984{
1985public:
1987 explicit TablatureNoteMods(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
1988 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
1989 {
1990 }
1991
1995
1996 NoteNumber getNoteId() const override { return noteId; }
1997
1998 constexpr static std::string_view XmlNodeName = "tabAlter";
2000};
2001
2007{
2008public:
2010 explicit TieAlterBase(const DocumentWeakPtr& document, Cmper partId, Base::ShareMode shareMode, EntryNumber entnum, Inci inci)
2011 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
2012 {
2013 }
2014
2042
2048 {
2049 None,
2050 Under,
2051 Over
2052 };
2053
2059 bool outerLocal{};
2060 bool outerOn{};
2069 bool down{};
2073 bool breakKeyOn{};
2076 bool stPtAdjOn{};
2079 bool enPtAdjOn{};
2086 bool ctlPtAdjOn{};
2087 bool ctlPtFixed{};
2089
2090 NoteNumber getNoteId() const override { return noteId; }
2091
2093};
2094
2104{
2105public:
2107
2108 constexpr static std::string_view XmlNodeName = "tieAlterEnd";
2110};
2111
2121{
2122public:
2124
2125 constexpr static std::string_view XmlNodeName = "tieAlterStart";
2127};
2128
2138{
2139public:
2141 explicit TupletDef(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
2142 : EntryDetailsBase(document, partId, shareMode, entnum, inci)
2143 {
2144 }
2145
2154
2159 bool alwaysFlat{};
2160 bool fullDura{};
2162 bool avoidStaff{};
2164 bool hidden{};
2171 bool allowHorz{};
2174 bool matchHooks{};
2183
2186
2189
2192
2193 constexpr static std::string_view XmlNodeName = "tupletDef";
2195};
2196
2197} // namespace details
2198} // namespace dom
2199} // namespace entries
Base class to enforce polymorphism across all DOM classes.
Definition BaseClasses.h:83
DocumentPtr getDocument() const
Gets a reference to the Document.
Definition BaseClasses.h:108
Cmper getSourcePartId() const
Gets the source partId for this instance. If an instance is fully shared with the score,...
Definition BaseClasses.h:124
virtual void integrityCheck(const std::shared_ptr< Base > &ptrToThis)
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition BaseClasses.h:154
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:91
Template pattern for DetailsBase items consisting of an array of a single item.
Definition BaseClasses.h:538
DetailsArray(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor function.
Definition BaseClasses.h:544
Base class for all "details" types.
Definition BaseClasses.h:415
Cmper getCmper1() const
Gets the cmper1 key value.
Definition BaseClasses.h:459
Cmper getCmper2() const
Gets the cmper2 key value.
Definition BaseClasses.h:464
Base class for all "details" types that use entnum rather than cmper and cmper.
Definition BaseClasses.h:487
EntryNumber getEntryNumber() const
Gets the entnum key value.
Definition BaseClasses.h:526
StemSelection
The options for choosing which version to retrieve for stem-specific details.
Definition BaseClasses.h:492
@ MatchEntry
match entry's stem direction
Wraps a frame of shared_ptr<const EntryInfo> and an index for per entry access. This class manages ow...
Definition Entries.h:417
Represents the default font settings for a particular element type.
Definition CommonClasses.h:137
Provides optional per-type extension methods for MusxInstanceList.
Definition MusxInstance.h:103
Base class note details. Note details are entry details associated with a note ID.
Definition BaseClasses.h:569
Represents display alterations to an accidental for a specific note.
Definition Details.h:80
Evpu hOffset
Horizontal offset: positive is right. (XML node: <axDisp>)
Definition Details.h:91
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:97
bool useOwnFont
Whether to use customFont.
Definition Details.h:94
std::shared_ptr< FontInfo > customFont
Font settings for the accidental (populated from <fontID>, <fontSize>, and <efx>)
Definition Details.h:93
NoteNumber noteId
The ID of the note being altered.
Definition Details.h:88
AccidentalAlterations(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor.
Definition Details.h:83
Evpu vOffset
Vertical offset: positive is up. (XML node: <ayDisp>)
Definition Details.h:90
char32_t altChar
If non-zero, the character to use for the accidental. (Utf-32 if the font is a Unicode font....
Definition Details.h:92
bool allowVertPos
Whether to use vOffset.
Definition Details.h:95
int percent
The percentage size for the accidental, where 100 is 100%.
Definition Details.h:89
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:99
static const xml::XmlElementArray< AccidentalAlterations > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Assigns an articulation to an entry.
Definition Details.h:110
ArticulationAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:120
Cmper articDef
The articulation definition ID.
Definition Details.h:123
bool hide
Inverse of "Show" option.
Definition Details.h:130
bool neverStack
Whether the articulation should never stack relative to others.
Definition Details.h:131
int numSlursAvoided
Number of slurs avoided. Used internally by Finale's stacking algorithm.
Definition Details.h:133
bool avoidSlur
Whether the articulation should avoid slurs.
Definition Details.h:132
bool aboveEntry
When overridePlacement is true: whether the articulation is forced above or below the entry.
Definition Details.h:129
Evpu horzOffset
Horizontal offset from the default position.
Definition Details.h:124
bool overridePlacement
Whether the default placement is overridden.
Definition Details.h:128
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:136
static const xml::XmlElementArray< ArticulationAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu vertOffset
Vertical offset from the default position.
Definition Details.h:126
Evpu vertAdd
Vertical displacement for character copying. (E.g., arpeggiated chord lines)
Definition Details.h:127
Evpu horzAdd
Horizontal displacement for character copying. (E.g., trill lines)
Definition Details.h:125
Contains the baseline offsets for chords.
Definition Details.h:285
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:290
Contains the baseline offsets for expressions above the staff.
Definition Details.h:300
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:305
Contains the baseline offsets for expressions below the staff.
Definition Details.h:315
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:320
Contains the baseline offsets for fretboards.
Definition Details.h:330
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:335
Contains the baseline offsets for lyrics chorus records.
Definition Details.h:345
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:351
Contains the baseline offsets for lyrics section records.
Definition Details.h:361
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:367
Contains the baseline offsets for lyrics verse records.
Definition Details.h:377
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:383
Encapsulates inci handling for non-inci baselines.
Definition Details.h:180
BaselineNoInci(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff)
Constructor function.
Definition Details.h:190
Contains the baseline offsets for chords.
Definition Details.h:199
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:203
Contains the baseline offsets for expressions above the staff.
Definition Details.h:211
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:215
Contains the baseline offsets for expressions below the staff.
Definition Details.h:223
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:227
Contains the baseline offsets for fretboards.
Definition Details.h:235
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:239
Contains the baseline offsets for lyrics chorus records.
Definition Details.h:247
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:251
Contains the baseline offsets for lyrics section records.
Definition Details.h:259
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:263
Contains the baseline offsets for lyrics verse records.
Definition Details.h:271
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:275
Contains the baseline information for all baseline types.
Definition Details.h:153
std::optional< Cmper > lyricNumber
The 1-based text number of the lyric, if this is a lyrics baseline. Otherwise unused and should be st...
Definition Details.h:170
static const xml::XmlElementArray< Baseline > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Baseline(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff, std::optional< Inci > inci)
Constructor function.
Definition Details.h:164
Evpu baselineDisplacement
Definition Details.h:167
Beam alteration for downstem primary beams.
Definition Details.h:465
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:477
BeamAlterationsDownStem(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor.
Definition Details.h:474
Beam alteration for upstem primary beams.
Definition Details.h:487
BeamAlterationsUpStem(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor.
Definition Details.h:496
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:499
Represents beam alterations applied to a specific entry. This is used to apply additional shaping or ...
Definition Details.h:393
static const xml::XmlElementArray< BeamAlterations > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool isActive() const
Returns whether this beam alteration record is active. Its flattenStyle must match the value in optio...
Definition Details.h:437
Edu dura
For secondary beams, specifies the duration corresponding to the secondary beam (16th beam is 256,...
Definition Details.h:425
Evpu rightOffsetY
Vertical adjustment of the beam end. (xml node is <syAdd>)
Definition Details.h:424
FlattenStyle flattenStyle
Beam shaping style (xml node is <context>).
Definition Details.h:426
static MusxInstance< BeamAlterations > getSecondaryForStem(const EntryInfoPtr &entryInfo, Edu dura, StemSelection stemSelection=StemSelection::MatchEntry)
Gets the beam extension record for the specified stemSelection.
Definition Details.cpp:208
static MusxInstance< BeamAlterations > getPrimaryForStem(const EntryInfoPtr &entryInfo, StemSelection stemSelection=StemSelection::MatchEntry)
Gets the beam extension record for the specified stemSelection.
Definition Details.cpp:200
BeamAlterations(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional< Inci > inci=std::nullopt)
Constructor.
Definition Details.h:415
static bool calcIsFeatheredBeamImpl(const EntryInfoPtr &entryInfo, Evpu &outLeftY, Evpu &outRightY)
Implementation of SecondaryBeamAlterationsDownStem::calcIsFeatheredBeam and SecondaryBeamAlterationsU...
Definition Details.cpp:123
Evpu rightOffsetH
Horizontal adjustment of the beam end. (xml node is <sxAdd>)
Definition Details.h:423
static MusxInstanceList< SecondaryBeamType > getSecondaryBeamArray(const EntryInfoPtr &entryInfo)
Generalized getter for secondary beam type arrays for either stem direction.
Definition Details.cpp:185
Evpu leftOffsetY
Vertical adjustment of the beam start. (xml node is <yAdd>)
Definition Details.h:422
Evpu leftOffsetH
Horizontal adjustment of the beam start. (xml node is <xAdd>)
Definition Details.h:421
Efix calcEffectiveBeamWidth() const
Calculates the effective beam width by returning either the default width or the width override value...
Definition Details.cpp:96
static void calcAllActiveFlags(const DocumentPtr &document)
Used by the factory to set active indicators.
Definition Details.cpp:76
Efix beamWidth
The calcEffectiveBeamWidth method handles this for you.
Definition Details.h:427
Beam extension for downstem beams.
Definition Details.h:549
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:553
Beam extension for upstem beams.
Definition Details.h:561
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:565
Represents both sides of a beam extension. It is attached to the first entry in the beam....
Definition Details.h:510
unsigned calcMaxExtension() const
Calculates the maximum beam extension.
Definition Details.cpp:246
static MusxInstance< BeamExtension > getForStem(const EntryInfoPtr &entryInfo, StemSelection stemSelection=StemSelection::MatchEntry)
Gets the beam extension record for the specified stemSelection.
Definition Details.cpp:268
bool extBeyond8th
Definition Details.h:527
Evpu rightOffset
Right extension offset. (xml node is <x4Disp>)
Definition Details.h:523
unsigned mask
Definition Details.h:524
static const xml::XmlElementArray< BeamExtension > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
BeamExtension(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor.
Definition Details.h:519
Evpu leftOffset
Left extension offset. (xml node is <x3Disp>)
Definition Details.h:522
Specifies the direction for beam stubs (if they are manually overridden.)
Definition Details.h:577
unsigned mask
Definition Details.h:585
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:592
static const xml::XmlElementArray< BeamStubDirection > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool isLeft() const
True if the beam stub(s) point left.
Definition Details.h:590
BeamStubDirection(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:580
Represents a bracket, used in two different contexts:
Definition Details.h:609
static const xml::XmlElementArray< Bracket > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:646
Evpu horzAdjLeft
"Distance from Left Edge of Staff" (xml node is <bracPos>)
Definition Details.h:641
Evpu vertAdjTop
"Vertical Adjust (Top of Bracket)" (xml node is <bracTop>)
Definition Details.h:642
Bracket(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2, Inci inci)
Constructor for top-level instances.
Definition Details.h:612
Evpu vertAdjBot
"Vertical Adjust (Bottom of Bracket)" (xml node is <bracBot>)
Definition Details.h:643
Bracket(const DocumentWeakPtr &document)
Constructor for embedded instances.
Definition Details.h:618
BracketStyle style
Bracket style (xml node is <id>)
Definition Details.h:640
BracketStyle
Bracket types.
Definition Details.h:628
@ BracketCurvedHooks
Thick bracket with curved hooks.
@ DeskBracket
Thin bracket with horizontal hook lines.
@ BracketStraightHooks
Thick bracket with straight hooks.
bool showOnSingleStaff
"Show Bracket If Group Contains Only One Staff" (only applies to staff groups: xml node is <onSingle>...
Definition Details.h:644
Represents chord symbol assignment for a staff and measure.
Definition Details.h:658
Edu horzEdu
Edu position in measure.
Definition Details.h:718
Evpu fbHorzOff
Horizontal offset of fretboard (in EVPU)
Definition Details.h:716
bool showFretboard
Show fretboard.
Definition Details.h:698
bool rootLowerCase
Display root in lowercase (minor triad)
Definition Details.h:694
bool playRoot
Playback root.
Definition Details.h:697
bool showRoot
Show root.
Definition Details.h:696
int bassAlter
Bass alteration.
Definition Details.h:702
BassPosition
Bass position options.
Definition Details.h:681
ChordAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
Constructor.
Definition Details.h:671
int rootScaleNum
Root scale degree: 0–6, where zero is the tonic.
Definition Details.h:692
Evpu fbVertOff
Vertical offset of fretboard (in EVPU)
Definition Details.h:717
bool showAltBass
Show alternate bass.
Definition Details.h:705
MusxInstanceList< others::ChordSuffixElement > getChordSuffix() const
Returns the chord suffix as an array of others::ChordSuffixElement.
Definition Details.cpp:289
Evpu horzOff
Horizontal offset of chord (in EVPU)
Definition Details.h:714
bool showSuffix
Show suffix.
Definition Details.h:699
MusxInstance< others::FretboardGroup > getFretboardGroup() const
Get the others::FretboardGroup instance for this chord assignment. You can use this to get the fret i...
Definition Details.cpp:294
Cmper suffixId
Definition Details.h:687
bool useFretboardFont
Definition Details.h:712
Inci fretboardGroupInci
Definition Details.h:709
bool playFretboard
Playback fretboard.
Definition Details.h:700
Cmper fbStyleId
The others::FretboardStyle ID. (Ignored when useFretboardFont is true.)
Definition Details.h:691
int fbPercent
FretboardDiagram scaling (100 means 100%)
Definition Details.h:720
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:733
int bassScaleNum
Bass scale degree: 0–6, where zero is the tonic.
Definition Details.h:701
Evpu vertOff
Vertical offset of chord (in EVPU)
Definition Details.h:715
int capoValue
Capo value (if useLocalCapo is true)
Definition Details.h:707
bool playAltBass
Playback alternate bass.
Definition Details.h:706
MusxInstance< others::FretboardStyle > getFretboardStyle() const
Returns the others::FretboardStyle instance for this chord assignment.
Definition Details.cpp:303
int chPercent
Chord scaling (100 means 100%)
Definition Details.h:719
int rootAlter
Root alteration.
Definition Details.h:693
bool playSuffix
Playback suffix.
Definition Details.h:695
bool useLocalCapo
Use local capo.
Definition Details.h:708
static const xml::XmlElementArray< ChordAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool bassLowerCase
Display bass in lowercase.
Definition Details.h:703
BassPosition bassPosition
Visual position of bass relative to root.
Definition Details.h:704
Defines the octaves in which each clef should display flats in key signatures. Only linear key signat...
Definition Details.h:752
static const xml::XmlElementArray< ClefOctaveFlats > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:758
Defines the octaves in which each clef should display sharps in key signatures.
Definition Details.h:781
static const xml::XmlElementArray< ClefOctaveSharps > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:787
Represents a cross-staff assignment for the note, if any.
Definition Details.h:800
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:811
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:813
static const xml::XmlElementArray< CrossStaff > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
CrossStaff(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:803
NoteNumber noteId
The ID of the note being assigned to a different staff (XML node: <noteID>)
Definition Details.h:808
StaffCmper staff
The target staff (XML node: <instrument>)
Definition Details.h:809
Custom stem for downstem context.
Definition Details.h:865
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:869
Represents a custom stem definition (up or down) for an entry. Which stem direction this instance con...
Definition Details.h:826
Evpu yOffset
Optional vertical displacement. (xml node is <ydisp>)
Definition Details.h:840
bool calcIsHiddenStem() const
Calculates if this custom stem record hides the stem. The stem is determined to be hidden if one of t...
Definition Details.cpp:315
static MusxInstance< CustomStem > getForStem(const EntryInfoPtr &entryInfo, StemSelection stemSelection=StemSelection::MatchEntry)
Gets the beam extension record for the specified stemSelection.
Definition Details.cpp:325
static const xml::XmlElementArray< CustomStem > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Cmper shapeDef
The Cmper of the associated others::ShapeDef. Setting this value to zero hides the stem.
Definition Details.h:838
Evpu xOffset
Optional horizontal displacement. (xml node is <xdisp>)
Definition Details.h:839
CustomStem(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor.
Definition Details.h:835
Custom stem for upstem context.
Definition Details.h:879
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:883
Represents display offsets and spacing adjustments for augmentation dots on a specific note.
Definition Details.h:895
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:910
NoteNumber noteId
The ID of the note whose dots are adjusted.
Definition Details.h:903
Evpu hOffset
Horizontal offset for the dot (XML: <xadd>)
Definition Details.h:904
Evpu vOffset
Vertical offset for the dot (XML: <yadd>)
Definition Details.h:905
static const xml::XmlElementArray< DotAlterations > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu interdotSpacing
Additional spacing between dots (XML: <posIncr>)
Definition Details.h:906
DotAlterations(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor.
Definition Details.h:898
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:908
Per-part overrides for entry properties such as manual position and stem direction.
Definition Details.h:925
bool upStem
When freezeStem is true: whether the stem is forced up (otherwise down).
Definition Details.h:939
bool freezeStem
Whether the stem direction is frozen for this entry in this part.
Definition Details.h:938
Evpu hOffset
Manual offset created with the Note Position Tool. (xml node is <posi>.)
Definition Details.h:937
static const xml::XmlElementArray< EntryPartFieldDetail > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
EntryPartFieldDetail(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:934
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:942
Specifies a custom size for an entry. It scales the entire entry, including the stem and all notehead...
Definition Details.h:954
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:969
int percent
The note/chord size as a percent (e.g., 65 for 65%).
Definition Details.h:966
static const xml::XmlElementArray< EntrySize > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
EntrySize(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor.
Definition Details.h:963
Represents a barre (spanning multiple strings).
Definition Details.h:1030
int endString
Ending 1-based string number.
Definition Details.h:1034
int startString
Starting 1-based string number.
Definition Details.h:1033
static const xml::XmlElementArray< Barre > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
int fret
0-based fret number, where 0 signifies the open string. (Finale allows nut barres....
Definition Details.h:1032
Represents a single fretboard cell (string/fret position).
Definition Details.h:1015
Shape shape
Cell shape.
Definition Details.h:1019
int fingerNum
Finger number 0..5, where 0 means there is no finger number and 5 means T (thumb).
Definition Details.h:1020
int fret
0-based fret number, where 0 signifies the open string.
Definition Details.h:1018
static const xml::XmlElementArray< Cell > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
FretboardDiagram diagram for chord symbols.
Definition Details.h:985
int fretboardNum
FretboardDiagram number: the starting fret of the fretboard diagram (xml node <fretNum>).
Definition Details.h:1040
bool showNum
Show fretboard number.
Definition Details.h:1042
std::vector< std::shared_ptr< Barre > > barres
Array of fretboard barres.
Definition Details.h:1047
static const xml::XmlElementArray< FretboardDiagram > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
int numFretCells
Number of fret cells (xml node <numFretCells>).
Definition Details.h:1043
Shape
Shape type for a fretboard cell.
Definition Details.h:1002
@ None
No explicit shape. This is the default value and may not occur in the xml.
@ Custom
Custom symbol. By default this is an open diamond signifying a harmonic.
bool lock
Lock flag (xml node <lock>).
Definition Details.h:1041
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1049
int numFretBarres
Number of fret barres (xml node <numFretBarres>).
Definition Details.h:1044
FretboardDiagram(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor function.
Definition Details.h:990
int numFrets
Number of frets.
Definition Details.h:1039
static constexpr std::string_view XmlNodeName
XML node name for this type.
Definition Details.h:1066
std::vector< std::shared_ptr< Cell > > cells
Array of fretboard cells.
Definition Details.h:1046
Represents the attributes of a Finale frame holder.
Definition Details.h:1078
StaffCmper getStaff() const
returns the staffId (staff) number for this GFrameHold
Definition Details.h:1101
GFrameHold(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas)
Constructor function.
Definition Details.h:1088
std::optional< ClefIndex > clefId
clef index when there are no mid-measure clef changes. (xml tag is <clefID>).
Definition Details.h:1092
int clefPercent
Clef percent where 100 means 100%.
Definition Details.h:1097
bool iterateRawEntries(std::function< bool(const MusxInstance< Entry > &, LayerIndex)> iterator) const
Iterates all the raw entries in a the GFrameHold, passing them to the iterator function....
Definition Details.cpp:358
ShowClefMode showClefMode
"Show Clef" mode. (xml tag is <clefMode>)
Definition Details.h:1094
bool mirrorFrame
Indicates this is a mirror frame. (Not used after Finale 14.5.)
Definition Details.h:1095
static const xml::XmlElementArray< GFrameHold > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
MeasCmper getMeasure() const
returns the measure number for this GFrameHold
Definition Details.h:1104
bool calcContainsMusic() const
Returns true if the GFrameHold contains any layer frames.
Definition Details.h:1113
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1139
bool calcIsMultiLayer() const
Returns true if the GFrameHold instance has more than one layer.
Definition Details.h:1107
bool clefAfterBarline
"Place Clef After Barline"
Definition Details.h:1096
Cmper clefListId
The clef list ID when there are mid-measure clef changes, if non-zero. (xml tag is <clefListID>).
Definition Details.h:1093
std::pair< MusxInstance< others::Frame >, Edu > findLayerFrame(LayerIndex layerIndex) const
Find the layer frame and Edu start position for the given layer. A non-zero start position indicates ...
Definition Details.cpp:337
std::vector< Cmper > frames
others::Frame values for layers 1..4 (layer indices 0..3) if non-zero
Definition Details.h:1098
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1128
Represents independent time and key signature overrides for a staff.
Definition Details.h:1151
bool hasTime
If true, this item contains an independent time signature.
Definition Details.h:1182
MusxInstance< TimeSignature > createTimeSignature() const
Create a shared pointer to an instance of the TimeSignature for this instance.
Definition Details.cpp:377
Cmper divBeat
Time signature denominator in Edu or a Cmper to a composite record.
Definition Details.h:1172
bool displayAltDenTsig
If true, dispDivBeat is the Cmper of a others::TimeCompositeLower record.
Definition Details.h:1177
Cmper dispDivBeat
Display time signature denominator in Edu or a Cmper to a composite record.
Definition Details.h:1174
bool altNumTsig
If true, beats is the Cmper of a others::TimeCompositeUpper record.
Definition Details.h:1178
bool hasKey
If true, this item contains an independent key signature.
Definition Details.h:1168
std::shared_ptr< KeySignature > keySig
The key signature value if present. (xml tag is <keySig>/<key>)
Definition Details.h:1167
IndependentStaffDetails(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas)
Constructor function.
Definition Details.h:1161
bool altDenTsig
If true, divBeat is the Cmper of a others::TimeCompositeLower record.
Definition Details.h:1179
static const xml::XmlElementArray< IndependentStaffDetails > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool hasDispTime
If true, the display time signature is present.
Definition Details.h:1181
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1191
bool displayAbbrvTime
If true, the display time signature is abbreviated.
Definition Details.h:1180
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1199
Cmper dispBeats
Display time signature numerator or a Cmper to a composite record.
Definition Details.h:1173
bool displayAltNumTsig
If true, dispBeats is the Cmper of a others::TimeCompositeUpper record.
Definition Details.h:1176
MusxInstance< TimeSignature > createDisplayTimeSignature() const
Create a shared pointer to an instance of the display TimeSignature for this measure and staff.
Definition Details.cpp:382
Cmper beats
Time signature numerator or a Cmper to a composite record.
Definition Details.h:1171
Represents a single element in a Finale accidental symbol list.
Definition Details.h:1210
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1224
int getAlterationValue() const
Returns the alteration value that this symbol corresponds with.
Definition Details.h:1220
KeySymbolListElement(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor function.
Definition Details.h:1213
static const xml::XmlElementArray< KeySymbolListElement > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1233
std::string accidentalString
Definition Details.h:1216
Contains the syllable assignments for lyrics chorus blocks.
Definition Details.h:1291
MusxInstance< texts::LyricsTextBase > getLyricText() const override
Get the raw lyric text for this assignment.
Definition Details.cpp:399
LyricTextType getLyricTextType() const override
Get the lyric text type for this assignment.
Definition Details.cpp:414
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1300
Contains the syllable assignments for lyrics section blocks.
Definition Details.h:1310
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1319
LyricTextType getLyricTextType() const override
Get the lyric text type for this assignment.
Definition Details.cpp:419
MusxInstance< texts::LyricsTextBase > getLyricText() const override
Get the raw lyric text for this assignment.
Definition Details.cpp:404
Contains the syllable assignments for lyrics verse blocks.
Definition Details.h:1329
LyricTextType getLyricTextType() const override
Get the lyric text type for this assignment.
Definition Details.cpp:409
MusxInstance< texts::LyricsTextBase > getLyricText() const override
Get the raw lyric text for this assignment.
Definition Details.cpp:394
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1338
Contains assignment data for a lyric assignment (a single syllable)
Definition Details.h:1242
util::EnigmaParsingContext getRawTextCtx() const
Return an Enigma parsing context for the associated lyrics text block.
Definition Details.cpp:424
virtual LyricTextType getLyricTextType() const =0
Get the lyric text type for this assignment.
Evpu wext
Definition Details.h:1260
LyricAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:1252
static const xml::XmlElementArray< LyricAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Cmper lyricNumber
the text number of the lyric.
Definition Details.h:1255
unsigned syllable
the 1-based syllable number. Subtract 1 for an index into texts::LyricsTextBase::syllables....
Definition Details.h:1256
Evpu floatingHorzOff
This appears to have something to do with note spacing. It may simply be a cache that Finale changes ...
Definition Details.h:1259
Evpu horzOffset
horizontal offset from default position. (xml node is <horzOff>)
Definition Details.h:1257
virtual MusxInstance< texts::LyricsTextBase > getLyricText() const =0
Get the raw lyric text for this assignment.
Evpu vertOffset
horizontal offset from default position. (xml node is <vertOff>)
Definition Details.h:1258
bool displayVerseNum
If set, the text block number displays to the left of the syllable. (E.g., when numbering verses in a...
Definition Details.h:1263
EntryInfoPtr calcWordExtensionEndpoint() const
Calculate the entry to which an automatic word extension extends.
Definition Details.cpp:433
Specifies lyric alignment and justification for a single entry. This affects all lyric assignments on...
Definition Details.h:1349
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1369
std::optional< AlignJustify > align
Override default alignment if present. (xml node is <align>)
Definition Details.h:1366
static const xml::XmlElementArray< LyricEntryInfo > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
LyricEntryInfo(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional< Inci > inci=std::nullopt)
Constructor.
Definition Details.h:1362
std::optional< AlignJustify > justify
Override default justification if present. (xml node is <justify>)
Definition Details.h:1365
Per-staff/per-measure overrides for the position and appearance of a measure number.
Definition Details.h:1380
ForceVisibility
Force-visibility options for the measure number at this location.
Definition Details.h:1401
@ Show
Force the number to display (xml text value: "force")
@ Hide
Force the number to be hidden (xml text value: "hide")
@ None
No override (default; node may be omitted in XML)
bool useEnclosure
Whether to use an enclosure for this number. (xml node is <useEncl>)
Definition Details.h:1412
Evpu xOffset
Horizontal offset for the measure number. (xml node is <x1add>)
Definition Details.h:1408
Evpu xOffset2
Horizontal offset for the measure number range under a multimeasure rest (Page View only)....
Definition Details.h:1410
MeasureNumberIndividualPositioning(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
Constructor.
Definition Details.h:1391
static const xml::XmlElementArray< MeasureNumberIndividualPositioning > & xmlMappingArray()
Required for musx::
ForceVisibility forceVisibility
Force-visibility behavior. (xml node is <forceHide>)
Definition Details.h:1411
Cmper measNumRegion
The Cmper of the others::MeasureNumberRegion that this override applies to. (xml node is <region>)
Definition Details.h:1407
std::shared_ptr< others::Enclosure > enclosure
Optional enclosure settings. (xml node is <encl>)
Definition Details.h:1413
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1415
Evpu yOffset
Vertical offset for the measure number. (xml node is <y1add>)
Definition Details.h:1409
Represents a text block assignment for a staff and measure.
Definition Details.h:1435
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1464
util::EnigmaParsingContext getRawTextCtx(Cmper forPartId) const
Gets the raw text for this assignment, or nullptr if none.
Definition Details.cpp:464
Evpu yDisp
Vertical displacement in Evpu (xml node is <ydisp>)
Definition Details.h:1455
Evpu xDispEvpu
Negative horizontal displacement in Evpu, when xDispEdu is zero. (xml node is <xdispEvpu>)
Definition Details.h:1454
MusxInstance< others::TextBlock > getTextBlock() const
Gets the TextBlock for this assignment, or nullptr if none.
Definition Details.cpp:459
MeasureTextAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper staffId, Cmper meas, Inci inci)
Constructor.
Definition Details.h:1446
Cmper block
Text block ID.
Definition Details.h:1451
bool hidden
Indicates the text appears only on screen (xml node is <postIt/>)
Definition Details.h:1456
static const xml::XmlElementArray< MeasureTextAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Edu xDispEdu
Definition Details.h:1452
Represents graphical and notational alterations applied to a note.
Definition Details.h:1477
bool allowVertPos
Whether vertical positioning is allowed .
Definition Details.h:1491
int percent
Size percentage for the notehead. (A value of 100 means 100%.)
Definition Details.h:1486
char32_t altNhead
Alternate notehead character.
Definition Details.h:1488
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1498
NoteAlterations(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:1480
Evpu nydisp
Vertical notehead offset.
Definition Details.h:1492
std::shared_ptr< FontInfo > customFont
Custom font info (consolidates: <fontID>, <fontSize>, <efx>)
Definition Details.h:1490
bool useOwnFont
Whether to use the custom font.
Definition Details.h:1489
Evpu nxdisp
Horizontal notehead offset.
Definition Details.h:1487
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:1496
bool enharmonic
Definition Details.h:1493
NoteNumber noteId
The ID of the note being altered. (xml node is <noteID>)
Definition Details.h:1485
static const xml::XmlElementArray< NoteAlterations > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Represents a percussion note code override for a single note.
Definition Details.h:1511
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:1522
NoteNumber noteId
The ID of the note being assigned a code.
Definition Details.h:1519
PercussionNoteTypeId noteCode
The percussion note code. Use this to search the incis of the percussion map for the specific note.
Definition Details.h:1520
static const xml::XmlElementArray< PercussionNoteCode > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
PercussionNoteCode(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:1514
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1524
Beam alteration for downstem secondary beams.
Definition Details.h:1535
static bool calcIsFeatheredBeam(const EntryInfoPtr &entryInfo, Evpu &outLeftY, Evpu &outRightY)
Calculates if the input entry starts a feathered beam and returns information about it.
Definition Details.h:1555
SecondaryBeamAlterationsDownStem(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor.
Definition Details.h:1546
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1558
Beam alteration for downstem secondary beams.
Definition Details.h:1568
static bool calcIsFeatheredBeam(const EntryInfoPtr &entryInfo, Evpu &outLeftY, Evpu &outRightY)
Calculates if the input entry starts a feathered beam and returns information about it.
Definition Details.h:1588
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1591
SecondaryBeamAlterationsUpStem(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor.
Definition Details.h:1579
Specifies which secondary beams break and restart on the associated entry.
Definition Details.h:1603
SecondaryBeamBreak(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:1606
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1647
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1634
BeamNumber calcLowestBreak() const
Calculates the lowest (largest note-value) beam specified for a secondary beam break.
Definition Details.h:1620
bool breakThrough
True if the beam should be broken through to the largest specified beam value.
Definition Details.h:1612
unsigned mask
Composite mask of beam breaks, derived from <do16th> through <do4096th> tags.
Definition Details.h:1611
static const xml::XmlElementArray< SecondaryBeamBreak > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Embedded shape record for a single index in noteShapes.
Definition Details.h:1673
char32_t quarter
Filled (quarter) notehead symbol (xml nodename is <q>).
Definition Details.h:1678
char32_t whole
Whole notehead symbol (xml nodename is <w>).
Definition Details.h:1676
static const xml::XmlElementArray< NoteShapes > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
char32_t doubleWhole
Double-whole notehead symbol (xml nodename is <d>).
Definition Details.h:1675
char32_t half
Half notehead symbol (xml nodename is <h>).
Definition Details.h:1677
Shape Note settings for staves and staffs style.
Definition Details.h:1661
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1687
ShapeNoteBase(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor function.
Definition Details.h:1665
std::vector< std::shared_ptr< NoteShapes > > noteShapes
Notehead shapes (only the first seven elements are used).
Definition Details.h:1683
bool arrangedByPitch
Definition Details.h:1684
static const xml::XmlElementArray< ShapeNoteBase > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Shape Note settings for staff styles.
Definition Details.h:1726
static constexpr std::string_view XmlNodeName
XML node name for this type.
Definition Details.h:1730
Shape Note settings for staves.
Definition Details.h:1711
static constexpr std::string_view XmlNodeName
XML node name for this type.
Definition Details.h:1715
Provides run-time information about Staff Groups within a system or list of others::StaffUsed.
Definition Details.h:1862
std::optional< size_t > startSlot
the 0-based start slot (index) of the group in the system staves.
Definition Details.h:1864
std::optional< size_t > endSlot
the 0-based end slot (index) of the group in the system staves.
Definition Details.h:1865
std::optional< size_t > numStaves() const
The number of staves in the group for the systemStaves.
Definition Details.h:1876
MusxInstanceList< others::StaffUsed > systemStaves
the system staves referred to by startSlot and endSlot
Definition Details.h:1867
MusxInstance< StaffGroup > group
the StaffGroup record for the group.
Definition Details.h:1866
void iterateStaves(MeasCmper measId, Edu eduPosition, std::function< bool(const MusxInstance< others::StaffComposite > &)> iterator) const
Iterates the staves in the group in order according to systemStaves.
Definition Details.cpp:543
static std::vector< StaffGroupInfo > getGroupsAtMeasure(MeasCmper measureId, Cmper linkedPartId, const MusxInstanceList< others::StaffUsed > &systemStaves)
Creates a vector of StaffGroupInfo instances for the measure, part, and system staves.
Definition Details.cpp:563
Represents the attributes of a Finale staff group that brackets staves.
Definition Details.h:1739
AlignJustify abbrvNameJustify
Abbreviated name justification (xml node is <abbrvJustify>)
Definition Details.h:1791
bool abbrvNameExpand
"Expand Single Word" for abbreviated name (xml node is <abbrvExpand>)
Definition Details.h:1803
Cmper multiStaffGroupId
Definition Details.h:1806
static const xml::XmlElementArray< StaffGroup > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool fullNameExpand
"Expand Single Word" for full name (xml node is <fullExpand>)
Definition Details.h:1802
bool ownBarline
"Use Alternate Group Barline"
Definition Details.h:1793
int abbrvNameYadj
Vertical adjustment for abbreviated name (xml node is <abbrvYadj>)
Definition Details.h:1799
DrawBarlineStyle
Enum for how to draw group barlines.
Definition Details.h:1763
@ Mensurstriche
Draw barlines between staves (xml value is "Mensurstriche" with capitalization)
@ ThroughStaves
Draw barlines through staves (xml value is "group")
@ OnlyOnStaves
Default value (may not appear in xml)
std::string getAbbreviatedInstrumentName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Returns the abbreviated instrument name for this group without Enigma tags and with autonumbering (if...
Definition Details.cpp:509
bool isAllMeasures() const
Returns true if this group spans all measures.
Definition Details.h:1837
Cmper abbrvNameId
Abbreviated name TextBlock cmper (xml node is <abbrvID>)
Definition Details.h:1797
StaffCmper startInst
Starting staff ID.
Definition Details.h:1781
int fullNameXadj
Horizontal adjustment for full name (xml node is <fullXadj>)
Definition Details.h:1786
std::shared_ptr< Bracket > bracket
Bracket Options. The factory guarantees this value to exist.
Definition Details.h:1788
std::string getAbbreviatedName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Get the abbreviated staff name without Enigma tags.
Definition Details.cpp:483
AlignJustify fullNameJustify
Full name justification (xml node is <fullJustify>)
Definition Details.h:1790
DrawBarlineStyle drawBarlines
"Draw Barlines" option (xml node is <groupBarlineStyle>)
Definition Details.h:1792
AlignJustify abbrvNameAlign
Abbreviated name horizontal alignment (xml node is <abbrvHAlign>)
Definition Details.h:1801
std::unordered_set< StaffCmper > staves
Calculated list of staves in the group.
Definition Details.h:1811
int fullNameYadj
Vertical adjustment for full name (xml node is <fullYadj>)
Definition Details.h:1787
HideStaves hideStaves
"When Hiding Empty Staves" option (xml node is <optimize>)
Definition Details.h:1804
BarlineType barlineType
Group barline type (xml node is <barline>)
Definition Details.h:1789
AlignJustify fullNameAlign
Full name horizontal alignment (xml node is <fullHAlign>)
Definition Details.h:1800
Cmper fullNameId
Full name TextBlock cmper (xml node is <fullID>)
Definition Details.h:1785
std::string getFullInstrumentName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Returns the full instrument name for this group without Enigma tags and with autonumbering (if any).
Definition Details.cpp:499
StaffGroup(const DocumentWeakPtr &document, Cmper partId, Base::ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor.
Definition Details.h:1749
StaffCmper endInst
Ending staff ID.
Definition Details.h:1782
static constexpr std::string_view XmlNodeName
XML node name for this type.
Definition Details.h:1853
void integrityCheck(const std::shared_ptr< Base > &ptrToThis) override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:1840
MeasCmper startMeas
Starting measure number.
Definition Details.h:1783
std::string getFullName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Get the full staff name without Enigma tags.
Definition Details.cpp:478
MusxInstance< others::MultiStaffInstrumentGroup > getMultiStaffInstGroup() const
Returns the others::MultiStaffInstrumentGroup for this group if it is part of one....
Definition Details.cpp:488
MeasCmper endMeas
Ending measure number.
Definition Details.h:1784
bool hideName
Inverse of "Show Group Name".
Definition Details.h:1796
bool fullNameIndivPos
Indicates if full name has individual position (xml node is <fullIndivPos>)
Definition Details.h:1794
bool abbrvNameIndivPos
Indicates if abbreviated name has individual position (xml node is <abbrvIndivPos>)
Definition Details.h:1795
int abbrvNameXadj
Horizontal adjustment for abbreviated name (xml node is <abbrvXadj>)
Definition Details.h:1798
HideStaves
Enum for optimization options.
Definition Details.h:1774
@ AsGroup
Hide staves only if all staves are empty.
@ Normally
Hide staves as if there were no StaffGroup (this is the default and may not appear in the xml)
@ None
Never hide the staves in this StaffGroup.
Represents a per-staff-size override for a specific staff in a system.
Definition Details.h:1907
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1928
static const xml::XmlElementArray< StaffSize > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
util::Fraction calcStaffScaling() const
Calculate the staff scaling.
Definition Details.h:1925
StaffSize(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staffId)
Constructor.
Definition Details.h:1917
int staffPercent
The staff size percentage override. (A value of 100 means 100%, i.e, no staff scaling....
Definition Details.h:1922
Specifies horizontal and vertical adjustments for stems under beam.
Definition Details.h:1967
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1971
Specifies horizontal and vertical stem adjustments for upstem and downstem contexts.
Definition Details.h:1941
Evpu upVertAdjust
Vertical adjustment for upstem context (positive is up).
Definition Details.h:1949
Evpu downHorzAdjust
Horizontal adjustment for downstem context (positive is right).
Definition Details.h:1952
Evpu downVertAdjust
Vertical adjustment for downstem context (positive is up).
Definition Details.h:1950
static const xml::XmlElementArray< StemAlterations > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu upHorzAdjust
Horizontal adjustment for upstem context (positive is right).
Definition Details.h:1951
StemAlterations(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:1944
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1954
Specifies the TAB string a note appears on. Finale automatically figures out the fret number from the...
Definition Details.h:1984
TablatureNoteMods(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:1987
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:1996
static const xml::XmlElementArray< TablatureNoteMods > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:1998
NoteNumber noteId
The ID of the tablature note being modified. (xml node is <noteID>)
Definition Details.h:1992
int stringNumber
Definition Details.h:1993
Base class for tie alteration properties. (Used for both ties and tie ends.)
Definition Details.h:2007
DirectionContext
Indicates the placement context of end- and control-point adjustments.
Definition Details.h:2048
@ Under
The tie is positioned below (e.g., tie under)
@ Over
The tie is positioned above (e.g., tie over)
Evpu yEnd
Vertical end position of the tie.
Definition Details.h:2058
NoteNumber noteId
Note ID associated with the tie alteration. (xml node is <noteID>)
Definition Details.h:2054
bool outerOn
Enable "Outer" placement.
Definition Details.h:2060
bool outerLocal
Local setting for "Outer Tie".
Definition Details.h:2059
Evpu xStart
Horizontal start position of the tie.
Definition Details.h:2055
DirectionContext enPtContext
End point must match this direction context for xEnd & yEnd to apply.
Definition Details.h:2081
Evpu height1
Height of the first control point.
Definition Details.h:2083
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:2090
bool afterMultiDotsLocal
Local setting for "After Multiple Dots".
Definition Details.h:2063
bool shiftForSecondsOn
Enable "Shift for Seconds".
Definition Details.h:2066
Evpu height2
Height of the second control point.
Definition Details.h:2085
ConnectionType stPtEntCnct
Start point must match this connection type for xStart & yStart to apply.
Definition Details.h:2077
TieAlterBase(const DocumentWeakPtr &document, Cmper partId, Base::ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:2010
ConnectionType
Defines tie connection points for start and end attachment locations.
Definition Details.h:2023
@ EntryLeftNoteCenter
Left of entry, center of note.
@ DotRightNoteCenter
Right of dot(s), center of note.
@ NoteRightNoteTop
Right of note, top of note.
@ NoteCenterNoteBottom
Horizontal center of note, bottom of note.
@ EntryCenterNoteBottom
Horizontal center of entry, bottom of note.
@ NoteCenterNoteTop
Horizontal center of note, top of note.
@ SystemEnd
System end (for the right side across systems)
@ NoteLeftNoteCenter
Left of note, center of note.
@ EntryCenterNoteTop
Horizontal center of entry, top of note.
@ NoteRightNoteBottom
Right of note, bottom of note.
@ SystemStart
System start (for the left side across systems)
@ EntryRightNoteCenter
Right of entry, center of note.
@ NoteRightNoteCenter
Right of note, center of note.
@ AccidentalLeftNoteCenter
Left of accidental, center of note.
@ NoteLeftNoteBottom
Left of note, bottom of note.
Evpu insetRatio1
Inset ratio for the first control point.
Definition Details.h:2082
bool enPtAdjOn
Enable end point adjustment.
Definition Details.h:2079
ConnectionType enPtEntCnct
End point must match this connection type for xEnd & yEnd to apply.
Definition Details.h:2080
bool shiftForSecondsLocal
Local setting for "Shift for Seconds".
Definition Details.h:2065
bool afterSingleDotOn
Enable "After Single Dot".
Definition Details.h:2062
bool afterMultiDotsOn
Enable "After Multiple Dots".
Definition Details.h:2064
Evpu insetRatio2
Inset ratio for the second control point.
Definition Details.h:2084
bool breakKeyLocal
Local setting for "Break at Key Signature".
Definition Details.h:2072
bool ctlPtFixed
Definition Details.h:2087
bool breakKeyOn
Enable "Break at Key Signature".
Definition Details.h:2073
bool down
Downward tie. Only applicable if freezeDirection is true. (False freezes the tie up....
Definition Details.h:2069
DirectionContext stPtContext
Start point must match this direction context for xStart & yStart to apply.
Definition Details.h:2078
bool beforeSingleAcciOn
Enable "Before Single Accidental".
Definition Details.h:2068
bool noSpecialArc
Inverse of "Avoid Staff Lines". (See options::TieOptions for more information about the naming....
Definition Details.h:2075
bool stPtAdjOn
Enable start point adjustment.
Definition Details.h:2076
static const xml::XmlElementArray< TieAlterBase > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool beforeSingleAcciLocal
Local setting for "Before Single Accidental".
Definition Details.h:2067
Evpu xEnd
Horizontal end position of the tie.
Definition Details.h:2056
bool ctlPtAdjOn
Enable control point adjustment.
Definition Details.h:2086
bool breakTimeLocal
Local setting for "Break at Time Signature".
Definition Details.h:2070
bool freezeDirection
Freeze tie direction. (xml node is <freeze>)
Definition Details.h:2074
Evpu yStart
Vertical start position of the tie.
Definition Details.h:2057
bool afterSingleDotLocal
Local setting for "After Single Dot".
Definition Details.h:2061
bool breakTimeOn
Enable "Break at Time Signature".
Definition Details.h:2071
Alterations for tie ends.
Definition Details.h:2104
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:2108
static const xml::XmlElementArray< TieAlterEnd > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Alterations for tie starts. (Tie starts are normal ties.)
Definition Details.h:2121
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:2125
static const xml::XmlElementArray< TieAlterStart > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Options controlling the appearance of tuplets.
Definition Details.h:2138
bool hidden
Inverse of "Show".
Definition Details.h:2164
util::Fraction calcRatio() const
return the tuplet ratio (reference / display)
Definition Details.h:2191
util::Fraction calcDisplayDuration() const
return the display duration as a util::Fraction of a whole note
Definition Details.h:2188
Evpu tupOffX
Horizontal offset.
Definition Details.h:2165
Evpu rightHookLen
Length of the right hook in the tuplet bracket. (This value is sign-reversed in the Finale UI....
Definition Details.h:2180
Evpu brackOffY
Vertical offset for brackets.
Definition Details.h:2168
BracketStyle brackStyle
Bracket style.
Definition Details.h:2176
bool avoidStaff
"Avoid Staff"
Definition Details.h:2162
AutoBracketStyle autoBracketStyle
Autobracket style.
Definition Details.h:2163
bool alwaysFlat
"Always Flat" (xml node is <flat>)
Definition Details.h:2159
bool fullDura
"Bracket Full Duration"
Definition Details.h:2160
bool allowHorz
"Allow Horizontal Drag"
Definition Details.h:2171
int referenceNumber
The number of notes "in the time of" (xml node is <refNum>)
Definition Details.h:2157
Evpu rightHookExt
Extension of the right hook beyond the tuplet bracket.
Definition Details.h:2181
Evpu leftHookExt
Extension of the left hook beyond the tuplet bracket.
Definition Details.h:2179
bool ignoreHorzNumOffset
"Ignore Horizontal Number Offset" (xml node is <ignoreGlOffs>)
Definition Details.h:2172
TupletDef(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:2141
util::Fraction calcReferenceDuration() const
return the reference duration as a util::Fraction of a whole note
Definition Details.h:2185
bool smartTuplet
"Engraver Tuplets"
Definition Details.h:2177
Edu displayDuration
The duration of each note to display (xml node is <symbolicDur>)
Definition Details.h:2156
Evpu tupOffY
Vertical.
Definition Details.h:2166
NumberStyle numStyle
Number style.
Definition Details.h:2169
static const xml::XmlElementArray< TupletDef > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu brackOffX
Horizontal offset for brackets.
Definition Details.h:2167
Evpu manualSlopeAdj
"Manual Slope Adjustment" in Evpu. (xml node is <slope>)
Definition Details.h:2182
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:2193
bool breakBracket
"Break Slur or Bracket"
Definition Details.h:2173
int displayNumber
The number of notes to display (xml node is <symbolicNum>)
Definition Details.h:2155
bool metricCenter
"Center Number Using Duration"
Definition Details.h:2161
bool useBottomNote
"Use Bottom Note" (xml node is <noteBelow>)
Definition Details.h:2175
bool matchHooks
"Match Length of Hooks"
Definition Details.h:2174
PositioningStyle posStyle
Positioning style.
Definition Details.h:2170
Edu referenceDuration
The duration of each note "in the time of" (xml node is <refDur>)
Definition Details.h:2158
Evpu leftHookLen
Length of the left hook in the tuplet bracket. (This value is sign-reversed in the Finale UI....
Definition Details.h:2178
FlattenStyle
Beaming style choices for when to flatten beams.
Definition Options.h:177
AlignJustify
Horizontal and vertical alignment/justification values.
Definition Options.h:605
BracketStyle
Bracket style options.
Definition Options.h:1825
PositioningStyle
Positioning style options.
Definition Options.h:1812
AutoBracketStyle
Auto-bracket style options.
Definition Options.h:1784
NumberStyle
Number style options.
Definition Options.h:1799
BarlineType
Barline type for left and right barlines.
Definition Others.h:1150
AlignJustify
Alignment and justification options for staff and group names.
Definition CommonClasses.h:776
Contains chorus text for lyrics.
Definition Texts.h:162
Contains section text for lyrics.
Definition Texts.h:175
Contains verse text for lyrics.
Definition Texts.h:149
Wrapper class for interpreting and rendering Enigma-style strings with insert handling.
Definition EnigmaString.h:423
AccidentalStyle
Enumeration to specify the type of accidental substitution representation.
Definition EnigmaString.h:199
@ Ascii
Use ASCII substitutions for accidentals.
A class to represent fractions with integer m_numerator and m_denominator, automatically reduced to s...
Definition Fraction.h:38
static constexpr Fraction fromPercent(int percent)
Constructs a Fraction from a percent (where 100 is 100%)
Definition Fraction.h:107
@ Verbose
Informational messages that should only displayed when verbose logging is requested.
static void log(LogLevel level, const std::string &message)
Logs a message with a specific severity level.
Definition Logger.h:87
constexpr int STANDARD_DIATONIC_STEPS
currently this is the only supported number of diatonic steps.
Definition music_theory.hpp:45
constexpr int MAX_ALTERATIONS
Maximum absolute value for chromatic alterations supported in Finale.
Definition Fundamentals.h:78
ShowClefMode
Enum representing the clef display mode for a frame.
Definition CommonClasses.h:123
LyricTextType
The lyric text type if this is a lyrics smart shape.
Definition CommonClasses.h:86
uint16_t PercussionNoteTypeId
multiple times in one layout. The rest are the "pure" note type. See percussion::PercussionNoteType.
Definition Fundamentals.h:74
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
std::shared_ptr< const T > MusxInstance
Defines the type of a musx instance stored in a pool.
Definition MusxInstance.h:39
unsigned int LayerIndex
Layer index (valid values are 0..3)
Definition Fundamentals.h:71
constexpr Cmper SCORE_PARTID
The part id of the score.
Definition Fundamentals.h:79
int16_t Inci
Enigma "incident" key type.
Definition Fundamentals.h:56
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
constexpr int MAX_LAYERS
The maximum number of music layers in a Finale document.
Definition Fundamentals.h:77
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
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:57
int32_t EntryNumber
Entry identifier.
Definition Fundamentals.h:69
uint16_t NoteNumber
Note identifier.
Definition Fundamentals.h:70
std::shared_ptr< Document > DocumentPtr
Shared Document pointer.
Definition BaseClasses.h:55
int16_t StaffCmper
Enigma staff (staffId) Cmper (may be negative when not applicable)
Definition Fundamentals.h:65
unsigned int BeamNumber
A number where 1 corresponds to the primary (8th note) beam, 2 the 16th beam, 3 the 32nd beam,...
Definition Fundamentals.h:72
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:127
object model for musx file (enigmaxml)
Definition BaseClasses.h:36