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
28#include "musx/util/EnigmaString.h"
29#include "BaseClasses.h"
30#include "CommonClasses.h"
31// do not add other dom class dependencies. Use Implementations.h for implementations that need total class access.
32
33namespace musx {
34namespace dom {
35
36class EntryInfoPtr;
37class EntryFrame;
38class EntryInfo;
39
40namespace options {
41class TupletOptions;
42} // namespace options
43
44namespace others {
45class Measure;
46class MultiStaffInstrumentGroup;
47} // namespace others
48
49namespace texts {
50 class LyricsChorus;
51 class LyricsSection;
52 class LyricsVerse;
53} // namespace others
54
59namespace details {
60
66{
67public:
76 explicit ArticulationAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
77 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
78
85 bool aboveEntry{};
86 bool hide{};
87 bool neverStack{};
88 bool avoidSlur{};
90
92 constexpr static std::string_view XmlNodeName = "articAssign";
93};
94
99class Baseline : public DetailsBase
100{
101public:
111 explicit Baseline(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff, std::optional<Inci> inci = std::nullopt)
112 : DetailsBase(document, partId, shareMode, system, staff, inci) {}
113
116
118};
119
125{
126public:
127 using Baseline::Baseline;
128
129
131 constexpr static std::string_view XmlNodeName = "baselinesLyricsChorus";
132};
133
139{
140public:
141 using Baseline::Baseline;
142
144 constexpr static std::string_view XmlNodeName = "baselinesLyricsSection";
145};
146
152{
153public:
154 using Baseline::Baseline;
155
157 constexpr static std::string_view XmlNodeName = "baselinesLyricsVerse";
158};
159
167{
168public:
170 explicit BeamStubDirection(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
171 : EntryDetailsBase(document, partId, shareMode, entnum)
172 {
173 }
174
175 unsigned mask{};
178
180 bool isLeft() const { return mask != 0; }
181
182 constexpr static std::string_view XmlNodeName = "beamStub";
184};
185
194{
195public:
205 explicit ChordAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas, Inci inci)
206 : DetailsBase(document, partId, shareMode, inst, meas, inci)
207 {
208 }
209
211 enum class BassPosition
212 {
213 AfterRoot, // default value may not appear in xml (but text appears in Finale binary)
214 UnderRoot,
215 Subtext
216 };
217
221 int rootAlter{};
223 bool playSuffix{};
224 bool showRoot{};
225 bool playRoot{};
227 bool showSuffix{};
230 int bassAlter{};
233 bool showAltBass{};
234 bool playAltBass{};
235 int capoValue{};
238 bool useFretFont{};
244 int chPercent{};
245 int fbPercent{};
246
247 constexpr static std::string_view XmlNodeName = "chordAssign";
249};
250
258{
259public:
261 explicit CrossStaff(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
262 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
263 {
264 }
265
268
269 NoteNumber getNoteId() const override { return noteId; }
270
271 constexpr static std::string_view XmlNodeName = "crossStaff";
273};
274
283{
284public:
293 explicit GFrameHold(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas)
294 : DetailsBase(document, partId, shareMode, inst, meas), frames(MAX_LAYERS) {}
295
296 // Public properties corresponding to the XML structure
297 std::optional<ClefIndex> clefId;
300 bool mirrorFrame{};
302 std::vector<Cmper> frames;
303
305 InstCmper getStaff() const { return InstCmper(getCmper1()); }
306
309
312 ClefIndex calcClefIndexAt(Edu position) const;
313
317 { return calcClefIndexAt(position.calcEduDuration()); }
318
325 std::shared_ptr<const EntryFrame> createEntryFrame(LayerIndex layerIndex, bool forWrittenPitch = false) const;
326
334 bool iterateEntries(LayerIndex layerIndex, std::function<bool(const EntryInfoPtr&)> iterator);
335
341 bool iterateEntries(std::function<bool(const EntryInfoPtr&)> iterator);
342
343 void integrityCheck() override
344 {
346 if (clefListId && clefId.has_value()) {
347 MUSX_INTEGRITY_ERROR("GFrameHold for staff " + std::to_string(getCmper1()) + " and measure " + std::to_string(getCmper2()) + " has both clef and clef list.");
348 }
349 if (!clefListId && !clefId.has_value()) {
350 MUSX_INTEGRITY_ERROR("GFrameHold for staff " + std::to_string(getCmper1()) + " and measure " + std::to_string(getCmper2()) + " has neither clef nor clef list.");
351 }
352 }
353
354 constexpr static std::string_view XmlNodeName = "gfhold";
356};
357
366{
367public:
376 explicit IndependentStaffDetails(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas)
377 : DetailsBase(document, partId, shareMode, inst, meas)
378 {
379 }
380
381 // Key signature info
382 std::shared_ptr<KeySignature> keySig;
383 bool hasKey{};
384
385 // Time signature info
390
393 bool altNumTsig{};
394 bool altDenTsig{};
396 bool hasDispTime{};
397 bool hasTime{};
398
400 std::shared_ptr<TimeSignature> createTimeSignature() const;
401
404 std::shared_ptr<TimeSignature> createDisplayTimeSignature() const;
405
406 void integrityCheck() override
407 {
409 if (hasKey && !keySig) {
410 keySig = std::make_shared<KeySignature>(getDocument());
411 }
412 }
413
414 constexpr static std::string_view XmlNodeName = "floats";
416};
417
423{
424public:
433 explicit LyricAssign(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
434 : EntryDetailsBase(document, partId, shareMode, entnum, inci) {}
435
437 unsigned syllable{};
441 int wext{};
443
445};
446
452{
453public:
455
457 constexpr static std::string_view XmlNodeName = "lyrDataChorus";
458};
459
465{
466public:
468
470 constexpr static std::string_view XmlNodeName = "lyrDataSection";
471};
472
478{
479public:
481
483 constexpr static std::string_view XmlNodeName = "lyrDataVerse";
484};
485
493{
494public:
496 explicit SecondaryBeamBreak(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
497 : EntryDetailsBase(document, partId, shareMode, entnum)
498 {
499 }
500
501 unsigned mask{};
503
511 {
512 MUSX_ASSERT_IF(!mask || mask >= unsigned(NoteType::Eighth)) {
513 return 0; // invalid mask values have already been flagged and supposedly corrected by #integrityCheck.
514 }
515 for (unsigned shift = 0; true; shift++) {
516 if (mask & (unsigned(NoteType::Note16th) >> shift)) {
517 return shift + 2; // the 2nd beam is the 16th beam and the first one we checked.
518 }
519 }
520 assert(false); // should not be able to get here
521 return 0;
522 }
523
524 void integrityCheck() override
525 {
527 if (!mask) {
528 mask = unsigned(NoteType::Note4096th);
529 MUSX_INTEGRITY_ERROR("Secondary beam break for entry" + std::to_string(getEntryNumber()) + " has no breaks.");
530 }
531 if (mask >= unsigned(NoteType::Eighth)) {
532 mask = unsigned(NoteType::Eighth) - 1;
533 MUSX_INTEGRITY_ERROR("Secondary beam break for entry" + std::to_string(getEntryNumber()) + " specifies a value that cannot be a secondary beam.");
534 }
535 }
536
537 constexpr static std::string_view XmlNodeName = "secBeamBreak";
539};
540
547class StaffGroup : public DetailsBase {
548public:
557 StaffGroup(const DocumentWeakPtr& document, Cmper partId, Base::ShareMode shareMode, Cmper cmper1, Cmper cmper2)
558 : DetailsBase(document, partId, shareMode, cmper1, cmper2) {}
559
562
565
568 {
572 };
573
575 enum class HideStaves
576 {
577 Normally,
578 AsGroup,
579 None
580 };
581
583 enum class BracketStyle : int
584 {
585 None = 0,
586 ThickLine = 1,
588 PianoBrace = 3,
589 Unknown4,
590 Unknown5,
592 Unknown7,
593 DeskBracket = 8
594 };
595
613
614 // Public properties corresponding to the XML structure, ordered as they appear in the XML
622 std::shared_ptr<Bracket> bracket{};
627 bool ownBarline{};
630 bool hideName{};
639
642 std::unordered_set<InstCmper> staves;
643
647
651
653 std::shared_ptr<others::MultiStaffInstrumentGroup> getMultiStaffInstGroup() const;
654
660
666
668 bool isAllMeasures() const
669 { return (startMeas == 1 && endMeas == (std::numeric_limits<MeasCmper>::max)()); }
670
671 void integrityCheck() override
672 {
674 if (endMeas <= startMeas || startMeas <= 0) {
675 MUSX_INTEGRITY_ERROR("Staff group " + std::to_string(getCmper2()) + " for part " + std::to_string(getPartId())
676 + " starts at measure " + std::to_string(startMeas) + " and ends at measure " + std::to_string(endMeas));
677 }
678 if (!bracket) {
679 // this is not an error. Finale omits the bracket node for groups with entirely default bracket info.
680 bracket = std::make_shared<Bracket>();
681 }
682 }
683
684 constexpr static std::string_view XmlNodeName = "staffGroup";
686};
687
693{
694public:
696 explicit TieAlterBase(const DocumentWeakPtr& document, Cmper partId, Base::ShareMode shareMode, EntryNumber entnum, Inci inci)
697 : NoteDetailsBase(document, partId, shareMode, entnum, inci)
698 {
699 }
700
706 bool outerLocal{};
715 bool down{};
717 bool breakTimeOn{};
719 bool breakKeyOn{};
721 bool stPtAdjOn{};
722 bool enPtAdjOn{};
727 bool ctlPtAdjOn{};
728
729 NoteNumber getNoteId() const override { return noteId; }
730
731 bool requireAllFields() const override { return false; }
733};
734
742{
743public:
745
746 constexpr static std::string_view XmlNodeName = "tieAlterEnd";
748};
749
757{
758public:
760
761 constexpr static std::string_view XmlNodeName = "tieAlterStart";
763};
764
772{
773public:
775 explicit TupletDef(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
776 : EntryDetailsBase(document, partId, shareMode, entnum, inci)
777 {
778 }
779
788
793 bool alwaysFlat{};
794 bool fullDura{};
796 bool avoidStaff{};
798 bool hidden{};
805 bool allowHorz{};
808 bool matchHooks{};
811 bool smartTuplet{};
817
820
823
826
827 constexpr static std::string_view XmlNodeName = "tupletDef";
829};
830
831} // namespace details
832} // namespace dom
833} // namespace entries
Cmper getPartId() const
Gets the partId for this instance (or 0 for score)
Definition BaseClasses.h:102
DocumentPtr getDocument() const
Gets a reference to the Document.
Definition BaseClasses.h:89
virtual void integrityCheck()
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition BaseClasses.h:133
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:72
Base class for all "details" types.
Definition BaseClasses.h:295
Cmper getCmper1() const
Gets the cmper1 key value.
Definition BaseClasses.h:314
Cmper getCmper2() const
Gets the cmper2 key value.
Definition BaseClasses.h:319
Base class for all "details" types that use entnum rather than cmper and cmper.
Definition BaseClasses.h:336
EntryNumber getEntryNumber() const
Gets the entnum key value.
Definition BaseClasses.h:354
Wraps a frame of shared_ptr<const EntryInfo> and an index for per entry access. This class manages ow...
Definition Entries.h:239
Base class note details. Note details are entry details associated with a note ID.
Definition BaseClasses.h:365
Assigns an articulation to an entry.
Definition Details.h:66
ArticulationAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:76
Cmper articDef
The articulation definition ID.
Definition Details.h:79
bool hide
Inverse of "Show" option.
Definition Details.h:86
bool neverStack
Whether the articulation should never stack relative to others.
Definition Details.h:87
int numSlursAvoided
Number of slurs avoided. Used internally by Finale's stacking algorithm.
Definition Details.h:89
bool avoidSlur
Whether the articulation should avoid slurs.
Definition Details.h:88
bool aboveEntry
When overridePlacement is true: whether the articulation is forced above or below the entry.
Definition Details.h:85
Evpu horzOffset
Horizontal offset from the default position.
Definition Details.h:80
bool overridePlacement
Whether the default placement is overridden.
Definition Details.h:84
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:92
static const xml::XmlElementArray< ArticulationAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu vertOffset
Vertical offset from the default position.
Definition Details.h:82
Evpu vertAdd
Vertical displacement for character copying. (E.g., arpeggiated chord lines)
Definition Details.h:83
Evpu horzAdd
Horizontal displacement for character copying. (E.g., trill lines)
Definition Details.h:81
Contains the baseline offsets for lyrics chorus records.
Definition Details.h:125
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:131
Contains the baseline offsets for lyrics chorus records.
Definition Details.h:139
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:144
Contains the baseline offsets for lyrics verse records.
Definition Details.h:152
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:157
Contains the baseline information for all baseline types.
Definition Details.h:100
Baseline(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper system, Cmper staff, std::optional< Inci > inci=std::nullopt)
Constructor function.
Definition Details.h:111
Cmper lyricNumber
the text number of the lyric, if this is a lyrics baseline. Otherwise unused and should be zero.
Definition Details.h:115
static const xml::XmlElementArray< Baseline > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu baselineDisplacement
the displacment of the baseline from default position. (xml node is <basedisp>)
Definition Details.h:114
Specifies the direction for beam stubs (if they are manually overridden.)
Definition Details.h:167
unsigned mask
Definition Details.h:175
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:182
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:180
BeamStubDirection(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:170
Represents chord symbol assignment for a staff and measure.
Definition Details.h:194
Edu horzEdu
<horzEdu>: Edu position in measure
Definition Details.h:243
Evpu fbHorzOff
<fbHorzOff>: Horizontal offset of fretboard (in EVPU)
Definition Details.h:241
bool showFretboard
<showFretboard/>: Show fretboard
Definition Details.h:226
bool rootLowerCase
<rootLowerCase/>: Display root in lowercase
Definition Details.h:222
bool playRoot
<playRoot/>: Playback root
Definition Details.h:225
bool useFretFont
<useFretFont/>: Use fret font
Definition Details.h:238
bool showRoot
<showRoot/>: Show root
Definition Details.h:224
int bassAlter
<bassAlter>: Bass alteration
Definition Details.h:230
BassPosition
Bass position options.
Definition Details.h:212
int rootScaleNum
<rootScaleNum>: Root scale degree (0–76)
Definition Details.h:220
Evpu fbVertOff
<fbVertOff>: Vertical offset of fretboard (in EVPU)
Definition Details.h:242
bool showAltBass
<showAltBass/>: Show alternate bass
Definition Details.h:233
Evpu horzOff
<horzOff>: Horizontal offset of chord (in EVPU)
Definition Details.h:239
bool showSuffix
<showSuffix/>: Show suffix
Definition Details.h:227
Cmper suffixId
<suffix>: Chord suffix ID
Definition Details.h:218
bool playFretboard
<playFretboard/>: Playback fretboard
Definition Details.h:228
ChordAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas, Inci inci)
Constructor.
Definition Details.h:205
Cmper fbStyleId
<fbStyleID>: Fretboard style ID
Definition Details.h:219
int fbPercent
<fbPercent>: Fretboard percent scaling (100 is 100%)
Definition Details.h:245
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:247
int bassScaleNum
<bassScaleNum>: Bass scale degree (0-6)
Definition Details.h:229
Evpu vertOff
<vertOff>: Vertical offset of chord (in EVPU)
Definition Details.h:240
int capoValue
<capoValue>: Capo value (if useLocalCapo is true)
Definition Details.h:235
bool playAltBass
<playAltBass/>: Playback alternate bass
Definition Details.h:234
Cmper fretInci
One less than the 1-based Cmper value for the fretboard group. (Meaningless if useFretFont is true....
Definition Details.h:237
int chPercent
<chPercent>: Chord percent scaling (100 is 100%)
Definition Details.h:244
int rootAlter
<rootAlter>: Root alteration
Definition Details.h:221
bool playSuffix
<playSuffix/>: Playback suffix
Definition Details.h:223
bool useLocalCapo
<useLocalCapo/>: Use local capo
Definition Details.h:236
static const xml::XmlElementArray< ChordAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool bassLowerCase
<bassLowerCase/>: Display bass in lowercase
Definition Details.h:231
BassPosition bassPosition
<bassPosition>: Position of bass relative to root
Definition Details.h:232
Represents a cross-staff assignment for the note, if any.
Definition Details.h:258
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:269
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:271
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:261
NoteNumber noteId
The ID of the note being assigned to a different staff (XML node: <noteID>)
Definition Details.h:266
InstCmper staff
The target staff (XML node: <instrument>)
Definition Details.h:267
Represents the attributes of a Finale frame holder.
Definition Details.h:283
bool iterateEntries(LayerIndex layerIndex, std::function< bool(const EntryInfoPtr &)> iterator)
iterates the entries for the specified layer in this GFrameHold from left to right
Definition Implementations.cpp:979
InstCmper getStaff() const
returns the inst (staff) number for this GFrameHold
Definition Details.h:305
std::optional< ClefIndex > clefId
clef index when there are no mid-measure clef changes. (xml tag is <clefID>).
Definition Details.h:297
GFrameHold(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas)
Constructor function.
Definition Details.h:293
ClefIndex calcClefIndexAt(util::Fraction position) const
Returns the clef index in effect for at the specified util::Fraction position (as a fraction of whole...
Definition Details.h:316
int clefPercent
Clef percent where 100 means 100%.
Definition Details.h:301
ShowClefMode showClefMode
"Show Clef" mode. (xml tag is <clefMode>)
Definition Details.h:299
std::shared_ptr< const EntryFrame > createEntryFrame(LayerIndex layerIndex, bool forWrittenPitch=false) const
Returns the EntryFrame for all entries in the given layer.
Definition Implementations.cpp:854
bool mirrorFrame
Indicates this is a mirror frame. (Not used after Finale 14.5.)
Definition Details.h:300
static const xml::XmlElementArray< GFrameHold > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
MeasCmper getMeasure() const
returns the measure number for this GFrameHold
Definition Details.h:308
ClefIndex calcClefIndexAt(Edu position) const
Returns the clef index in effect for at the specified Edu position.
Definition Implementations.cpp:1006
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:354
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:343
Cmper clefListId
The clef list ID when there are mid-measure clef changes, if non-zero. (xml tag is <clefListID>).
Definition Details.h:298
std::vector< Cmper > frames
others::Frame values for layers 1..4 (layer indices 0..3) if non-zero
Definition Details.h:302
Represents independent time and key signature overrides for a staff.
Definition Details.h:366
bool hasTime
If true, this item contains an independent time signature.
Definition Details.h:397
Cmper divBeat
Time signature denominator in Edu or a Cmper to a composite record.
Definition Details.h:387
bool displayAltDenTsig
If true, dispDivBeat is the Cmper of a others::TimeCompositeLower record.
Definition Details.h:392
Cmper dispDivBeat
Display time signature denominator in Edu or a Cmper to a composite record.
Definition Details.h:389
bool altNumTsig
If true, beats is the Cmper of a others::TimeCompositeUpper record.
Definition Details.h:393
bool hasKey
If true, this item contains an independent key signature.
Definition Details.h:383
std::shared_ptr< KeySignature > keySig
The key signature value if present. (xml tag is <keySig>/<key>)
Definition Details.h:382
bool altDenTsig
If true, divBeat is the Cmper of a others::TimeCompositeLower record.
Definition Details.h:394
std::shared_ptr< TimeSignature > createDisplayTimeSignature() const
Create a shared pointer to an instance of the display TimeSignature for this measure and staff.
Definition Implementations.cpp:1039
static const xml::XmlElementArray< IndependentStaffDetails > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool hasDispTime
If true, the display time signature is present.
Definition Details.h:396
IndependentStaffDetails(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper inst, Cmper meas)
Constructor function.
Definition Details.h:376
std::shared_ptr< TimeSignature > createTimeSignature() const
Create a shared pointer to an instance of the TimeSignature for this instance.
Definition Implementations.cpp:1034
bool displayAbbrvTime
If true, the display time signature is abbreviated.
Definition Details.h:395
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:414
Cmper dispBeats
Display time signature numerator or a Cmper to a composite record.
Definition Details.h:388
bool displayAltNumTsig
If true, dispBeats is the Cmper of a others::TimeCompositeUpper record.
Definition Details.h:391
Cmper beats
Time signature numerator or a Cmper to a composite record.
Definition Details.h:386
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:406
Contains the syllable assignments for lyrics chorus blocks.
Definition Details.h:452
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:457
Contains the syllable assignments for lyrics section blocks.
Definition Details.h:465
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:470
Contains the syllable assignments for lyrics verse blocks.
Definition Details.h:478
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:483
Contains assignment data for a lyric assignment (a single syllable)
Definition Details.h:423
LyricAssign(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:433
static const xml::XmlElementArray< LyricAssign > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
int wext
Somehow indicates a word extension, but its meaning is uncertain. It does not appear to be a smart sh...
Definition Details.h:441
Cmper lyricNumber
the text number of the lyric.
Definition Details.h:436
unsigned syllable
the 1-based syllable number. Subtract 1 to get the index. (xml node is <syll>)
Definition Details.h:437
Evpu floatingHorzOff
This appears to have something to do with note spacing. It may simply be a cache that Finale changes ...
Definition Details.h:440
Evpu horzOffset
horizontal offset from default position. (xml node is <horzOff>)
Definition Details.h:438
Evpu vertOffset
horizontal offset from default position. (xml node is <vertOff>)
Definition Details.h:439
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:442
Specifies which secondary beams break and restart on the associated entry.
Definition Details.h:493
SecondaryBeamBreak(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum)
Constructor function.
Definition Details.h:496
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:537
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:524
BeamNumber calcLowestBreak() const
Calculates the lowest (largest note-value) beam specified for a secondary beam break.
Definition Details.h:510
bool breakThrough
True if the beam should be broken through to the largest specified beam value.
Definition Details.h:502
unsigned mask
Composite mask of beam breaks, derived from <do16th> through <do4096th> tags.
Definition Details.h:501
static const xml::XmlElementArray< SecondaryBeamBreak > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Embedded class to represent the "bracket" node.
Definition Details.h:598
static const xml::XmlElementArray< Bracket > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
BracketStyle style
Bracket style (xml node is <id>)
Definition Details.h:600
Evpu vertAdjBot
"Vertical Adjust (Bottom of Bracket)" (xml node is <bracBot>)
Definition Details.h:603
Evpu vertAdjTop
"Vertical Adjust (Top of Bracket)" (xml node is <bracTop>)
Definition Details.h:602
bool showOnSingleStaff
"Show Bracket If Group Contains Only One Staff" (xml node is <onSingle>)
Definition Details.h:604
Evpu horzAdjLeft
"Distance from Left Edge of Staff" (xml node is <bracPos>)
Definition Details.h:601
Bracket()=default
Default constructor for Bracket.
Represents the attributes of a Finale staff group that brackets staves.
Definition Details.h:547
AlignJustify abbrvNameJustify
Abbreviated name justification (xml node is <abbrvJustify>)
Definition Details.h:625
bool abbrvNameExpand
"Expand Single Word" for abbreviated name (xml node is <abbrvExpand>)
Definition Details.h:637
Cmper multiStaffGroupId
Definition Details.h:640
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:636
bool ownBarline
"Use Alternate Group Barline"
Definition Details.h:627
int abbrvNameYadj
Vertical adjustment for abbreviated name (xml node is <abbrvYadj>)
Definition Details.h:633
DrawBarlineStyle
Enum for how to draw group barlines.
Definition Details.h:568
@ 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 Implementations.cpp:2314
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Details.h:671
bool isAllMeasures() const
Returns true if this group spans all measures.
Definition Details.h:668
Cmper abbrvNameId
Abbreviated name TextBlock cmper (xml node is <abbrvID>)
Definition Details.h:631
int fullNameXadj
Horizontal adjustment for full name (xml node is <fullXadj>)
Definition Details.h:620
std::shared_ptr< Bracket > bracket
Bracket Options. The factory guarantees this value to exist.
Definition Details.h:622
std::shared_ptr< others::MultiStaffInstrumentGroup > getMultiStaffInstGroup() const
Returns the others::MultiStaffInstrumentGroup for this group if it is part of one....
Definition Implementations.cpp:2293
std::string getAbbreviatedName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Get the abbreviated staff name without Enigma tags.
Definition Implementations.cpp:2288
AlignJustify fullNameJustify
Full name justification (xml node is <fullJustify>)
Definition Details.h:624
DrawBarlineStyle drawBarlines
"Draw Barlines" option (xml node is <groupBarlineStyle>)
Definition Details.h:626
InstCmper startInst
Starting staff ID.
Definition Details.h:615
BracketStyle
Bracket style enum for StaffGroup.
Definition Details.h:584
@ BracketCurvedHooks
Thick bracket with curved hooks.
@ DeskBracket
Thin bracket with horizontal hook lines.
@ BracketStraightHooks
Thick bracket with straight hooks.
AlignJustify abbrvNameAlign
Abbreviated name horizontal alignment (xml node is <abbrvHAlign>)
Definition Details.h:635
int fullNameYadj
Vertical adjustment for full name (xml node is <fullYadj>)
Definition Details.h:621
HideStaves hideStaves
"When Hiding Empty Staves" option (xml node is <optimize>)
Definition Details.h:638
BarlineType barlineType
Group barline type (xml node is <barline>)
Definition Details.h:623
AlignJustify fullNameAlign
Full name horizontal alignment (xml node is <fullHAlign>)
Definition Details.h:634
std::unordered_set< InstCmper > staves
Calculated list of staves in the group.
Definition Details.h:642
Cmper fullNameId
Full name TextBlock cmper (xml node is <fullID>)
Definition Details.h:619
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 Implementations.cpp:2304
StaffGroup(const DocumentWeakPtr &document, Cmper partId, Base::ShareMode shareMode, Cmper cmper1, Cmper cmper2)
Constructor.
Definition Details.h:557
InstCmper endInst
Ending staff ID.
Definition Details.h:616
static constexpr std::string_view XmlNodeName
XML node name for this type.
Definition Details.h:684
MeasCmper startMeas
Starting measure number.
Definition Details.h:617
std::string getFullName(util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const
Get the full staff name without Enigma tags.
Definition Implementations.cpp:2283
MeasCmper endMeas
Ending measure number.
Definition Details.h:618
bool hideName
Inverse of "Show Group Name".
Definition Details.h:630
bool fullNameIndivPos
Indicates if full name has individual position (xml node is <fullIndivPos>)
Definition Details.h:628
bool abbrvNameIndivPos
Indicates if abbreviated name has individual position (xml node is <abbrvIndivPos>)
Definition Details.h:629
int abbrvNameXadj
Horizontal adjustment for abbreviated name (xml node is <abbrvXadj>)
Definition Details.h:632
HideStaves
Enum for optimization options.
Definition Details.h:576
@ 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.
Base class for tie alteration properties. (Used for both ties and tie ends.)
Definition Details.h:693
Evpu yEnd
Vertical end position of the tie.
Definition Details.h:705
NoteNumber noteId
Note ID associated with the tie alteration. (xml node is <noteID>)
Definition Details.h:701
bool outerLocal
Local setting for "Outer Tie".
Definition Details.h:706
Evpu xStart
Horizontal start position of the tie.
Definition Details.h:702
Evpu height1
Height of the first control point.
Definition Details.h:724
NoteNumber getNoteId() const override
Required virtual function that returns the note id.
Definition Details.h:729
bool afterMultiDotsLocal
Local setting for "After Multiple Dots".
Definition Details.h:709
bool shiftForSecondsOn
Enable "Shift for Seconds".
Definition Details.h:712
Evpu height2
Height of the second control point.
Definition Details.h:726
TieAlterBase(const DocumentWeakPtr &document, Cmper partId, Base::ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:696
Evpu insetRatio1
Inset ratio for the first control point.
Definition Details.h:723
bool enPtAdjOn
Enable end point adjustment.
Definition Details.h:722
bool shiftForSecondsLocal
Local setting for "Shift for Seconds".
Definition Details.h:711
bool afterSingleDotOn
Enable "After Single Dot".
Definition Details.h:708
bool afterMultiDotsOn
Enable "After Multiple Dots".
Definition Details.h:710
Evpu insetRatio2
Inset ratio for the second control point.
Definition Details.h:725
bool breakKeyLocal
Local setting for "Break at Key Signature".
Definition Details.h:718
bool breakKeyOn
Enable "Break at Key Signature".
Definition Details.h:719
bool down
Downward tie. Only applicable if freezeDirection is true. (False freezes the tie up....
Definition Details.h:715
bool beforeSingleAcciOn
Enable "Before Single Accidental".
Definition Details.h:714
bool stPtAdjOn
Enable start point adjustment.
Definition Details.h:721
static const xml::XmlElementArray< TieAlterBase > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool beforeSingleAcciLocal
Local setting for "Before Single Accidental".
Definition Details.h:713
Evpu xEnd
Horizontal end position of the tie.
Definition Details.h:703
bool ctlPtAdjOn
Enable control point adjustment.
Definition Details.h:727
bool breakTimeLocal
Local setting for "Break at Time Signature".
Definition Details.h:716
bool freezeDirection
Freeze tie direction. (xml node is <freeze>)
Definition Details.h:720
Evpu yStart
Vertical start position of the tie.
Definition Details.h:704
bool afterSingleDotLocal
Local setting for "After Single Dot".
Definition Details.h:707
bool breakTimeOn
Enable "Break at Time Signature".
Definition Details.h:717
bool requireAllFields() const override
Unless we decide to figure out connection types, this will stay here.
Definition Details.h:731
Alterations for tie ends.
Definition Details.h:742
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:746
static const xml::XmlElementArray< TieAlterEnd > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Alterations for tie starts. (Tie starts are normal ties.)
Definition Details.h:757
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:761
static const xml::XmlElementArray< TieAlterStart > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Options controlling the appearance of tuplets.
Definition Details.h:772
bool hidden
Inverse of "Show".
Definition Details.h:798
util::Fraction calcRatio() const
return the tuplet ratio (reference / display)
Definition Details.h:825
util::Fraction calcDisplayDuration() const
return the display duration as a util::Fraction of a whole note
Definition Details.h:822
Evpu tupOffX
Horizontal offset.
Definition Details.h:799
Evpu rightHookLen
Length of the right hook in the tuplet bracket. (This value is sign-reversed in the Finale UI....
Definition Details.h:814
Evpu brackOffY
Vertical offset for brackets.
Definition Details.h:802
BracketStyle brackStyle
Bracket style.
Definition Details.h:810
bool avoidStaff
"Avoid Staff"
Definition Details.h:796
AutoBracketStyle autoBracketStyle
Autobracket style.
Definition Details.h:797
bool alwaysFlat
"Always Flat" (xml node is <flat>)
Definition Details.h:793
bool fullDura
"Bracket Full Duration"
Definition Details.h:794
bool allowHorz
"Allow Horizontal Drag"
Definition Details.h:805
int referenceNumber
The number of notes "in the time of" (xml node is <refNum>)
Definition Details.h:791
Evpu rightHookExt
Extension of the right hook beyond the tuplet bracket.
Definition Details.h:815
Evpu leftHookExt
Extension of the left hook beyond the tuplet bracket.
Definition Details.h:813
bool ignoreHorzNumOffset
"Ignore Horizontal Number Offset" (xml node is <ignoreGlOffs>)
Definition Details.h:806
TupletDef(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, Inci inci)
Constructor function.
Definition Details.h:775
util::Fraction calcReferenceDuration() const
return the reference duration as a util::Fraction of a whole note
Definition Details.h:819
bool smartTuplet
"Engraver Tuplets"
Definition Details.h:811
Edu displayDuration
The duration of each note to display (xml node is <symbolicDur>)
Definition Details.h:790
Evpu tupOffY
Vertical.
Definition Details.h:800
NumberStyle numStyle
Number style.
Definition Details.h:803
static const xml::XmlElementArray< TupletDef > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Evpu brackOffX
Horizontal offset for brackets.
Definition Details.h:801
Evpu manualSlopeAdj
"Manual Slope Adjustment" in Evpu. (xml node is <slope>)
Definition Details.h:816
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Details.h:827
bool breakBracket
"Break Slur or Bracket"
Definition Details.h:807
int displayNumber
The number of notes to display (xml node is <symbolicNum>)
Definition Details.h:789
bool metricCenter
"Center Number Using Duration"
Definition Details.h:795
bool useBottomNote
"Use Bottom Note" (xml node is <noteBelow>)
Definition Details.h:809
bool matchHooks
"Match Length of Hooks"
Definition Details.h:808
PositioningStyle posStyle
Positioning style.
Definition Details.h:804
Edu referenceDuration
The duration of eacn note "in the time of" (xml node is <refDur>)
Definition Details.h:792
Evpu leftHookLen
Length of the left hook in the tuplet bracket. (This value is sign-reversed in the Finale UI....
Definition Details.h:812
Options controlling the appearance of tuplets.
Definition Options.h:1349
BracketStyle
Bracket style options.
Definition Options.h:1390
PositioningStyle
Positioning style options.
Definition Options.h:1380
AutoBracketStyle
Auto-bracket style options.
Definition Options.h:1357
NumberStyle
Number style options.
Definition Options.h:1370
BarlineType
Barline type for left and right barlines.
Definition Others.h:910
AlignJustify
Alignment and justification options for staff and group names.
Definition CommonClasses.h:528
Contains chorus text for lyrics.
Definition Texts.h:148
Contains section text for lyrics.
Definition Texts.h:163
Contains verse text for lyrics.
Definition Texts.h:133
AccidentalStyle
Enumeration to specify the type of accidental replacement.
Definition EnigmaString.h:48
@ 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:37
dom::Edu calcEduDuration() const
Calculates duration as a fraction of a whole note.
Definition Fraction.cpp:36
ShowClefMode
Enum representing the clef display mode for a frame.
Definition CommonClasses.h:69
int16_t MeasCmper
Enigma meas Cmper (may be negative when not applicable)
Definition Fundamentals.h:64
unsigned int LayerIndex
Layer index (valid values are 0..3)
Definition Fundamentals.h:70
int16_t InstCmper
Enigma staff (inst) Cmper (may be negative when not applicable)
Definition Fundamentals.h:65
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:74
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
uint16_t ClefIndex
Index into options::ClefOptions::clefDefs.
Definition Fundamentals.h:67
int32_t Edu
"Enigma Durational Units" value (1024 per quarter note)
Definition Fundamentals.h:61
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition BaseClasses.h:57
int32_t EntryNumber
Entry identifier.
Definition Fundamentals.h:68
uint16_t NoteNumber
Note identifier.
Definition Fundamentals.h:69
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:71
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:127
object model for musx file (enigmaxml)
Definition BaseClasses.h:32