27#include "musx/util/Fraction.h"
28#include "BaseClasses.h"
29#include "CommonClasses.h"
42class PercussionNoteInfo;
90 explicit operator bool()
const {
return static_cast<bool>(m_hold); }
130 std::map<LayerIndex, bool>
calcVoices()
const;
142 EntryInfoPtr calcNearestEntry(
Edu eduPosition,
bool findExact =
true, std::optional<LayerIndex> matchLayer = std::nullopt, std::optional<bool> matchVoice2 = std::nullopt)
const;
155 std::pair<MusxInstance<others::Frame>,
Edu> findLayerFrame(
LayerIndex layerIndex)
const;
158 Cmper m_requestedPartId;
287 :
Base(document, partId, shareMode), m_entnum(entnum), m_prev(prev), m_next(next)
346 std::vector<std::shared_ptr<Note>>
notes;
353 std::vector<std::tuple<StaffCmper, MeasCmper, LayerIndex>>
locations;
393 MUSX_INTEGRITY_ERROR(
"Entry " + std::to_string(m_entnum) +
" has an incorrect number of notes.");
428 explicit EntryInfoPtr(
const std::shared_ptr<const EntryFrame>& entryFrame,
size_t index = 0)
429 : m_entryFrame(entryFrame), m_indexInFrame(index) {}
451 const std::shared_ptr<const EntryInfo>
operator->()
const;
454 operator bool()
const;
461 std::shared_ptr<const EntryFrame>
getFrame()
const {
return m_entryFrame; }
543 {
return iterateBeamGroup<&EntryInfoPtr::nextPotentialInBeam, &EntryInfoPtr::previousPotentialInBeam>(includeHiddenEntries); }
547 {
return iterateBeamGroup<&EntryInfoPtr::previousPotentialInBeam, &EntryInfoPtr::nextPotentialInBeam>(includeHiddenEntries); }
596 if (m_upStem.has_value()) {
597 return m_upStem.value();
599 m_upStem = calcUpStemImpl();
600 return m_upStem.value();
701 bool calcIsCue(
bool includeVisibleInScore =
false)
const;
766 if (m_entryFrame != other.m_entryFrame)
767 return m_entryFrame < other.m_entryFrame;
768 return m_indexInFrame < other.m_indexInFrame;
772 unsigned calcVisibleBeams()
const;
774 bool calcUpStemImpl()
const;
776 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
777 std::optional<unsigned> iterateFindRestsInSecondaryBeam(
const EntryInfoPtr nextOrPrevInBeam)
const;
779 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
782 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
783 bool iterateNotesExistLeftOrRight()
const;
785 EntryInfoPtr nextPotentialInBeam(
bool includeHiddenEntries)
const;
787 EntryInfoPtr previousPotentialInBeam(
bool includeHiddenEntries)
const;
789 template<EntryInfoPtr(EntryInfoPtr::* Iterator)(
bool) const, EntryInfoPtr(EntryInfoPtr::* ReverseIterator)(
bool) const>
790 EntryInfoPtr iterateBeamGroup(
bool includeHiddenEntries)
const;
795 EntryInfoPtr findLeftBeamAnchorForBeamOverBarline()
const;
800 EntryInfoPtr findRightBeamAnchorForBeamOverBarline()
const;
802 std::shared_ptr<const EntryFrame> m_entryFrame;
803 size_t m_indexInFrame{};
806 mutable MusxInstance<others::StaffComposite> m_cachedStaff;
809 mutable std::optional<bool> m_upStem;
818class EntryFrame :
public std::enable_shared_from_this<EntryFrame>
830 m_layerIndex(layerIndex),
831 m_timeStretch(timeStretch),
832 m_startStaff(startStaff)
856 throw std::logic_error(
"TupletInfo has invalid start and end indices.");
922 bool calcCreatesSingleton(
bool left)
const;
924 const std::shared_ptr<const EntryFrame> getParent()
const
926 auto result = m_parent.lock();
927 MUSX_ASSERT_IF(!result) {
928 throw std::logic_error(
"Unable to obtain lock on parent entry frame.");
933 const std::weak_ptr<const EntryFrame> m_parent;
973 const std::vector<std::shared_ptr<const EntryInfo>>&
getEntries()
const
974 {
return m_entries; }
987 void addEntry(
const std::shared_ptr<const EntryInfo>& entry)
988 { m_entries.emplace_back(entry); }
992 std::shared_ptr<const EntryFrame>
getNext()
const;
996 std::shared_ptr<const EntryFrame>
getPrevious()
const;
1000 {
return m_startStaff; }
1029 std::vector<std::shared_ptr<const EntryInfo>> m_entries;
1059#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1077 auto retval = m_entry.lock();
1079 throw std::logic_error(
"Entry pointer is no longer valid");
1103 : m_entry(entryInfo), m_noteIndex(noteIndex)
1107 operator bool()
const
1108 {
return m_entry && m_noteIndex < m_entry->getEntry()->notes.size(); }
1112 {
return m_entry.
isSameEntry(src.m_entry) && m_noteIndex == src.m_noteIndex; }
1122 MUSX_ASSERT_IF(m_noteIndex >= m_entry->getEntry()->notes.size()) {
1123 throw std::logic_error(
"Note index is too large for notes array.");
1125 return m_entry->getEntry()->notes[m_noteIndex];
1194 if (m_noteIndex >= m_entry->getEntry()->notes.size()) {
1204 if (m_noteIndex <= 0) {
1239 if (m_entry != other.m_entry)
1240 return m_entry < other.m_entry;
1241 return m_noteIndex < other.m_noteIndex;
1253 bool isSamePitchValues(
const NoteInfoPtr& src)
const;
Base class to enforce polymorphism across all DOM classes.
Definition BaseClasses.h:83
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
Wraps a reference to an existing object or owns a temporary value if needed.
Definition MusxInstance.h:179
Represents a vector of EntryInfo instances for a given frame, along with computed information.
Definition Entries.h:819
util::Fraction getTimeStretch() const
Get the time stretch in this frame. Rather than accessing this value directly, consider using EntryIn...
Definition Entries.h:970
EntryFrame(const details::GFrameHoldContext &gfhold, LayerIndex layerIndex, util::Fraction timeStretch, const MusxInstance< others::StaffComposite > &startStaff)
Constructor function.
Definition Entries.h:828
EntryInfoPtr getLastInVoice(int voice) const
Returns the last entry in the specified v1/v2 or null if none.
Definition Entries.cpp:125
MusxInstance< others::StaffComposite > getStartStaffInstance() const
Gets the staff at eduPosition 0 without needing to create it again.
Definition Entries.h:999
bool calcAreAllEntriesHiddenInFrame() const
Calculates if this all notes in the frame are hidden. This routine only checks that entries are indiv...
Definition Entries.cpp:183
MeasCmper getMeasure() const
Get the measure for the entry frame.
Definition Entries.cpp:99
MusxInstance< others::Measure > getMeasureInstance() const
Get the measure instance.
Definition Entries.cpp:162
std::shared_ptr< const EntryFrame > getPrevious() const
Gets the entry frame for the previous measure with the same staff and layer.
Definition Entries.cpp:143
void addEntry(const std::shared_ptr< const EntryInfo > &entry)
Add an entry to the list.
Definition Entries.h:987
const std::vector< std::shared_ptr< const EntryInfo > > & getEntries() const
Get the entry list.
Definition Entries.h:973
EntryInfoPtr getFirstInVoice(int voice) const
Returns the first entry in the specified v1/v2 or null if none.
Definition Entries.cpp:109
StaffCmper getStaff() const
Get the staff for the entry.
Definition Entries.cpp:97
Cmper getRequestedPartId() const
Get the requested part ID for the entry frame.
Definition Entries.h:954
MusxInstance< others::StaffComposite > createCurrentStaff(Edu eduPosition, const std::optional< StaffCmper > &forStaffId=std::nullopt) const
Creates a current StaffComposite for the entry frame.
Definition Entries.cpp:153
MusxInstance< KeySignature > keySignature
This can be different than the measure key sig if the staff has independent key signatures.
Definition Entries.h:943
MusxInstance< others::LayerAttributes > getLayerAttributes() const
Get the LayerAttributes for this entry frame.
Definition Entries.cpp:101
const details::GFrameHoldContext & getContext() const
Get the frame context for this frame.
Definition Entries.h:951
LayerIndex getLayerIndex() const
Get the layer index (0..3) of the entry frame.
Definition Entries.h:963
DocumentPtr getDocument() const
Get the document for the entry frame.
Definition Entries.cpp:95
std::vector< TupletInfo > tupletInfo
A list of the tuplets in the frame and their calculated starting and ending information.
Definition Entries.h:942
std::shared_ptr< const EntryFrame > getNext() const
Gets the entry frame for the next measure with the same staff and layer.
Definition Entries.cpp:135
bool calcIsCueFrame(bool includeVisibleInScore=false) const
Calculates if this entry frame is part of a cue.
Definition Entries.cpp:167
util::Fraction maxElapsedDuration
Definition Entries.h:944
Wraps a frame of shared_ptr<const EntryInfo> and an index for per entry access. This class manages ow...
Definition Entries.h:418
bool calcUpStemDefault() const
Calculates if the entry is upstem by default, without considering voices, layers, staff options,...
Definition Entries.cpp:678
EntryInfoPtr getNextInFrame() const
Get the next entry in the frame.
Definition Entries.cpp:516
bool calcBeamMustStartHere() const
Determines if a beam must start on this entry.
Definition Entries.cpp:828
EntryInfoPtr(const std::shared_ptr< const EntryFrame > &entryFrame, size_t index=0)
Constructor function.
Definition Entries.h:428
EntryInfoPtr getNextSameV() const
Get the next entry in the frame in the same voice.
Definition Entries.cpp:524
bool calcCanBeBeamed() const
Determines if this entry can be beamed.
Definition Entries.cpp:815
size_t getIndexInFrame() const
Returns the index within the frame.
Definition Entries.h:464
util::Fraction calcGlobalElapsedDuration() const
Calculates the elapsed duration in global edu, removing any time stretch due to independent time sign...
Definition Entries.cpp:1283
std::pair< bool, bool > calcEntryStemSettings() const
Returns the Entry stem settings for the current requested part. This function encapsulates handling o...
Definition Entries.cpp:461
EntryInfoPtr calcBeamContinuesLeftOverBarline() const
Determines if this entry continues a beam across a barline from the previous measure.
Definition Entries.cpp:949
bool calcIfLayerSettingsApply() const
Calculates whether the conditions are met for the layer attributes dependent on others::LayerAttribut...
Definition Entries.cpp:1508
EntryInfoPtr getPreviousInVoice(int voice) const
Returns the previous entry in the frame in the specified v1/v2 or null if none.
Definition Entries.cpp:605
unsigned calcReverseGraceIndex() const
Caclulates the grace index counting leftward (used by other standards such as MNX)
Definition Entries.cpp:478
EntryInfoPtr getNextInBeamGroupAcrossBars(bool includeHiddenEntries=false) const
Gets the next entry in a beamed group, or nullptr if the entry is not beamed or is the last in the gr...
Definition Entries.cpp:615
EntryInfoPtr getPreviousSameVNoGrace() const
Get the previous entry in the frame in the same voice, skipping grace notes.
Definition Entries.cpp:586
MusxInstance< details::EntryPartFieldDetail > getPartFieldData() const
Gets the applicable part data for the entry, or nullptr if none.
Definition Entries.cpp:438
EntryInfoPtr getPreviousInBeamGroupAcrossBars(bool includeHiddenEntries=false) const
Gets the previous entry in a beamed group or nullptr if the entry is not beamed or is the first in th...
Definition Entries.cpp:631
Evpu calcManuaOffset() const
Returns the manual offset of the entry for the current requested part. This function encapsulates han...
Definition Entries.cpp:453
unsigned calcLowestBeamStart(bool considerBeamOverBarlines=false) const
Returns the lowest beam number starting at this entry, where 1 = 8th note beam, 2 = 16th note beam,...
Definition Entries.cpp:1138
bool isSameEntry(const EntryInfoPtr &src) const
Returns whether the input and the current instance refer to the same entry.
Definition Entries.cpp:422
EntryInfoPtr getPreviousInLayer() const
Get the previous entry in the same layer and staff. This can be in the previous measure.
Definition Entries.cpp:552
EntryInfoPtr getNextInLayer() const
Get the next entry in the same layer and staff. This can be in the next measure.
Definition Entries.cpp:505
unsigned calcLowestBeamStub() const
Returns the lowest beam stub at this entry, where 2 = 16th note stub, 3 = 32nd note stub,...
Definition Entries.cpp:1224
EntryInfoPtr getNextInBeamGroup(bool includeHiddenEntries=false) const
Gets the next entry in a beamed group or nullptr if the entry is not beamed or is the last in the gro...
Definition Entries.h:542
static EntryInfoPtr fromPositionOrNull(const DocumentPtr &document, Cmper partId, StaffCmper staffId, MeasCmper measureId, EntryNumber entryNumber)
Searches the given position at staffId and measureId for the entryNumber.
Definition Entries.cpp:370
EntryInfoPtr getPreviousInBeamGroup(bool includeHiddenEntries=false) const
Gets the previous entry in a beamed group or nullptr if the entry is not beamed or is the first in th...
Definition Entries.h:546
static EntryInfoPtr fromEntryNumber(const DocumentPtr &document, Cmper partId, EntryNumber entryNumber)
Returns an EntryInfoPtr for the entry specified by entryNumber.
Definition Entries.cpp:385
unsigned calcLowestBeamEnd() const
Returns the lowest beam number ending at this entry, where 1 = 8th note beam, 2 = 16th note beam,...
Definition Entries.cpp:1180
LayerIndex getLayerIndex() const
Get the layer index (0..3) of the entry.
Definition Entries.cpp:430
bool calcIsSingletonGrace() const
Return true if this entry is a grace note and the only grace in the sequence at this location.
Definition Entries.cpp:1573
unsigned calcLowestBeamEndAcrossBarlines() const
Returns the lowest beam number ending at this entry, where 1 = 8th note beam, 2 = 16th note beam,...
Definition Entries.cpp:1203
unsigned calcNumberOfBeams() const
Calculates the number of beams or flags on the entry.
Definition Entries.cpp:1087
EntryInfoPtr getPreviousInFrame() const
Get the previous entry in the frame.
Definition Entries.cpp:563
std::shared_ptr< const EntryFrame > getFrame() const
Returns the frame.
Definition Entries.h:461
bool calcUpStem() const
Determines the effective stem direction of the entry, taking into account voices, layers,...
Definition Entries.h:594
EntryInfoPtr findBeamStartOrCurrent() const
Finds the first entry of a beamed group or returns the current entry if it is not beams.
Definition Entries.cpp:1038
bool calcDisplaysAsRest() const
Calculates if an entry displays as a rest.
Definition Entries.cpp:647
MusxInstance< KeySignature > getKeySignature() const
Get the key signature of the entry.
Definition Entries.cpp:436
bool calcIsCue(bool includeVisibleInScore=false) const
Calculates if this entry is part of a cue.
Definition Entries.cpp:1430
bool calcCreatesSingletonBeamLeft() const
Determines if this entry contains a tuplet that creates a singleton beam left. See EntryFrame::Tuplet...
Definition Entries.cpp:840
bool operator<(const EntryInfoPtr &other) const
Explicit operator< for std::map.
Definition Entries.h:764
std::optional< size_t > calcNextTupletIndex(std::optional< size_t > currentIndex=0) const
Returns the next higher tuplet index that this entry starts, or std::nullopt if none.
Definition Entries.cpp:490
std::pair< int, int > calcTopBottomStaffPositions() const
Calculates the top and bottom staff positions of the entry, taking into account percussion notes....
Definition Entries.cpp:653
StaffCmper getStaff() const
Get the staff cmper.
Definition Entries.cpp:432
EntryInfoPtr findBeamEnd() const
Finds the end entry of a beamed group.
Definition Entries.cpp:1055
int calcEntrySize() const
Returns the entry size as a percentage, taking into account the beaming.
Definition Entries.cpp:1416
bool calcIsBeamStart() const
Returns whether this is the start of a primary beam.
Definition Entries.cpp:833
EntryInfoPtr getPreviousSameV() const
Get the previous entry in the frame in the same voice.
Definition Entries.cpp:571
int calcCrossStaffDirectionForAll(DeferredReference< MusxInstanceList< others::StaffUsed > > staffList={}) const
Calculates if this entry has cross-staffed notes all in a single direction.
Definition Entries.cpp:1549
MusxInstance< others::StaffComposite > createCurrentStaff(const std::optional< StaffCmper > &forStaffId=std::nullopt) const
Creates the current StaffComposite for the entry.
Definition Entries.cpp:470
bool calcIsTrillToGraceEntry() const
Calculates if this entry is a trill-to entry as created by the Parenthesize Trill-To Notes plugin.
Definition Entries.cpp:1596
int calcIsAuxiliaryPitchMarker() const
Return true if this entry is an auxiliary pitch marker (specifically, a trill-to or gliss-to pitch ma...
Definition Entries.cpp:1585
EntryInfoPtr getNextInVoice(int voice) const
Returns the next entry in the frame in the specified v1/v2 or null if none.
Definition Entries.cpp:595
EntryInfoPtr calcBeamContinuesRightOverBarline() const
Determines if this entry continues a beam across a barline to the next measure.
Definition Entries.cpp:993
const std::shared_ptr< const EntryInfo > operator->() const
Allows -> access to the underlying EntryInfo instance.
Definition Entries.cpp:406
bool calcUnbeamed() const
Returns whether this is an unbeamed entry.
Definition Entries.cpp:806
EntryInfoPtr()
Default constructor.
Definition Entries.h:421
bool calcIsBeamedRestWorkaroud() const
A common workaround in Finale is to hide a rest in v1 and supply it in v2. Typically it is used when ...
Definition Entries.cpp:1464
bool calcCreatesSingletonBeamRight() const
Determines if this entry contains a tuplet that creates a singleton beam right. See EntryFrame::Tuple...
Definition Entries.cpp:851
bool calcBeamStubIsLeft() const
Calculates if a beam stub on this entry would go left or right. It does not check that an entry actua...
Definition Entries.cpp:1234
bool calcIsGlissToGraceEntry() const
Calculates if this entry is a gliss-to entry as created by the Parenthesize Trill-To Notes plugin.
Definition Entries.cpp:1619
bool calcIsFullMeasureRest() const
Returns whether this is a full measure rest.
Definition Entries.cpp:1456
util::Fraction calcGlobalActualDuration() const
Calculates the actual duration in global edu, removing any time stretch due to independent time signa...
Definition Entries.cpp:1288
MeasCmper getMeasure() const
Get the measure cmper.
Definition Entries.cpp:434
EntryInfoPtr getNextSameVNoGrace() const
Get the next entry in the frame in the same voice, skipping grace notes.
Definition Entries.cpp:542
std::vector< size_t > findTupletInfo() const
Finds the tuplet info for tuplets that include this entry.
Definition Entries.cpp:1494
bool calcIsFeatheredBeamStart(Evpu &outLeftY, Evpu &outRightY) const
Calculates if the entry starts a feathered beam and returns information about it if so.
Definition Entries.cpp:1381
Information an entry along with the entry.
Definition Entries.h:1051
unsigned graceIndex
Definition Entries.h:1068
ClefIndex clefIndex
the clef index in effect for the entry.
Definition Entries.h:1070
util::Fraction calcNextElapsedDuration() const
Calculates the next duration position after this entry.
Definition Entries.h:1085
util::Fraction elapsedDuration
Definition Entries.h:1064
ClefIndex clefIndexConcert
the concert clef index in effect for the entry.
Definition Entries.h:1071
util::Fraction actualDuration
Definition Entries.h:1066
MusxInstance< Entry > getEntry() const
Get the entry.
Definition Entries.h:1075
Represents an entry containing metadata and notes.
Definition Entries.h:280
std::vector< std::tuple< StaffCmper, MeasCmper, LayerIndex > > locations
The location(s) of this entry calculated by calcLocations, which is called by the factory....
Definition Entries.h:353
bool splitStem
Definition Entries.h:328
Entry(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, EntryNumber prev, EntryNumber next)
Constructor function.
Definition Entries.h:286
EntryNumber getEntryNumber() const
Gets the entry number for this entry.
Definition Entries.h:356
bool articDetail
Indicates there is an articulation on the entry.
Definition Entries.h:310
bool upStemScore
Whether a stem is up or down as set in the score. (Only reliable when freezeStemScore is true....
Definition Entries.h:330
std::pair< NoteType, unsigned > calcNoteInfo() const
Calculates the NoteType and number of augmentation dots. (See calcNoteInfoFromEdu....
Definition Entries.h:371
bool isNote
If this value is false, the entry is a rest.
Definition Entries.h:303
bool noLeger
Hide ledger lines.
Definition Entries.h:335
MusxInstance< Entry > getNext() const
Gets the next entry in this list or nullptr if none.
Definition Entries.cpp:36
bool noPlayback
Indicates that the entry should not be played back.
Definition Entries.h:341
bool voice2
This is a V2 note. (xml node <v2>)
Definition Entries.h:305
bool splitRest
Indicates that rests in different layers are not combined on this entry.
Definition Entries.h:313
bool beamExt
Indicates that there is a beam extension on the entry.
Definition Entries.h:317
bool createdByHP
Indicates the entry was created by Finale's smart playback engine.
Definition Entries.h:306
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Entries.h:401
MusxInstance< Entry > getPrevious() const
Gets the previous entry in this list or nullptr if none.
Definition Entries.cpp:46
bool secBeam
Signifies a secondary beam break occurs on the entry.
Definition Entries.h:321
bool stemDetail
Indicates there are stem modifications.
Definition Entries.h:323
bool slashGrace
Definition Entries.h:337
bool isValid
Should always be true but otherwise appears to be used internally by Finale.
Definition Entries.h:302
bool playDisabledByHP
Used by Finale's smart playback engine.
Definition Entries.h:307
bool flipTie
Indicates the existence of a flipped tie, either in Speedy Entry or Layer Attributes.
Definition Entries.h:318
bool flatBeam
Forces any beam that starts on this entry to be flat by default.
Definition Entries.h:340
std::vector< std::shared_ptr< Note > > notes
Collection of notes that comprise the entry. These are in order from lowest to highest.
Definition Entries.h:346
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 Entries.h:389
bool dummy
Definition Entries.h:332
Evpu hOffsetScore
Manual offset created with the Note Position Tool in the score. (xml node is <posi>....
Definition Entries.h:301
bool checkAccis
Used by Finale to convert pre-2014 .mus files. May never be saved in .musx.
Definition Entries.h:331
bool noteDetail
Indicates there is a note detail or EntrySize record for the entry.
Definition Entries.h:309
util::Fraction calcFraction() const
Calculates the duration as a util::Fraction of a whole note.
Definition Entries.h:376
static const xml::XmlElementArray< Entry > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool hasStem() const
Returns true if the entry's duration has a stem.
Definition Entries.h:380
bool crossStaff
Signifies that at least one note in the entry has been cross staffed.
Definition Entries.h:324
bool floatRest
Is floating rest. If false, the first note element gives the staff position of the rest.
Definition Entries.h:315
bool smartShapeDetail
Indicates this entry has a smart shape assignment.
Definition Entries.h:334
Edu duration
Duration of the entry, not taking into account tuplets.
Definition Entries.h:299
bool isHidden
Indicates the entry is hidden, (xml node is <ignore>)
Definition Entries.h:316
bool tupletStart
Indicates that a tuplet start on the entry.
Definition Entries.h:312
bool lyricDetail
Indicates there is a lyric assignment on the entry.
Definition Entries.h:311
int numNotes
Number of notes in the entry. There is an error if this is not the same as notes.size().
Definition Entries.h:300
bool sorted
Sorted flag.
Definition Entries.h:336
bool reverseDownStem
Indicates that a stem normally down is reversed.
Definition Entries.h:326
bool reverseUpStem
Indicates that a stem normally up is reversed.
Definition Entries.h:325
bool v2Launch
Indicates if this entry (which is voice1) launches a voice2 sequence. (xml node is <controller>)
Definition Entries.h:304
bool doubleStem
Creates a double stem on the entry. (Appears to be exclusive with splitStem.)
Definition Entries.h:327
bool isPossibleFullMeasureRest() const
Returns true if the entry could be a full-measure rest.
Definition Entries.h:386
bool beam
Signifies the start of a beam or singleton entry. (That is, any beam breaks at this entry....
Definition Entries.h:320
bool freezeStemScore
Freeze stem flag in the score. (upStemScore gives the direction.)
Definition Entries.h:322
bool performanceData
Indicates there is performance data on the entry.
Definition Entries.h:314
bool noSpacing
Indicates that the entry should be ignored when calculating music spacing.
Definition Entries.h:342
bool dotTieAlt
Indicates dot or tie alterations are present.
Definition Entries.h:319
bool freezeBeam
Freeze beam flag (Derived from the presence of <freezeBeam> node.)
Definition Entries.h:343
bool graceNote
Indicate the entry is a grace note.
Definition Entries.h:308
static void calcLocations(const DocumentPtr &document)
Calculates the locations for all entries in the document. This function is normally only called by th...
Definition Entries.cpp:78
KeyContext
Indicates whether to compute key signature values in concert or written pitch.
Definition CommonClasses.h:255
Provides optional per-type extension methods for MusxInstanceList.
Definition MusxInstance.h:103
Wraps an EntryInfo instance and a note index.
Definition Entries.h:1094
int calcStaffPosition() const
Calculates the staff position for this note, taking into account percussion notes.
Note::NoteProperties calcNoteProperties(const std::optional< bool > &enharmonicRespell=std::nullopt, bool alwaysUseEntryStaff=false) const
Calculates the note name, octave number, actual alteration, and staff position. This function does no...
Definition Entries.cpp:2156
EntryInfoPtr getEntryInfo() const
Gets the entry info for this note.
Definition Entries.h:1129
MusxInstance< others::PercussionNoteInfo > calcPercussionNoteInfo() const
Calculates the percussion note info for this note, if any.
Definition Entries.cpp:2198
MusxInstance< Note > operator->() const
Allows -> access to the underlying Note instance.
Definition Entries.h:1120
bool operator<(const NoteInfoPtr &other) const
Explicit operator< for std::map.
Definition Entries.h:1237
bool isSameNote(const NoteInfoPtr &src) const
Returns whether the input and the current instance refer to the same note.
Definition Entries.h:1111
StaffCmper calcStaff() const
Calculates the staff number, taking into account cross staffing.
Definition Entries.cpp:2142
NoteInfoPtr getPrevious() const
Gets the next note in a chord on the same entry.
Definition Entries.h:1202
Note::NoteProperties calcNotePropertiesConcert(bool alwaysUseEntryStaff=false) const
Calculates the note name, octave number, actual alteration, and staff position for the concert pitch ...
Definition Entries.cpp:2172
NoteInfoPtr calcTieFrom(bool requireTie=true) const
Calculates the note that this note could tie from.
Definition Entries.cpp:2112
bool calcIsEnharmonicRespell() const
Returns if this note is enharmonically respelled in the current part view.
Definition Entries.cpp:2224
std::pair< int, int > calcDefaultEnharmonic() const
Calculates the default enharmonic equivalent of this note. This is the value that Finale uses when de...
Definition Entries.h:1222
Note::NoteProperties calcNotePropertiesInView(bool alwaysUseEntryStaff=false) const
Calculates the note name, octave number, actual alteration, and staff position for the pitch of the n...
Definition Entries.cpp:2188
int calcCrossStaffDirection(DeferredReference< MusxInstanceList< others::StaffUsed > > staffList={}) const
Calculates if this note is cross-staffed and if so, which direction.
Definition Entries.cpp:2263
NoteInfoPtr(const EntryInfoPtr &entryInfo, size_t noteIndex)
Constructor.
Definition Entries.h:1102
NoteInfoPtr calcTieTo() const
Calculates the note that this note could tie to. Check the return value's Note::tieEnd to see if ther...
Definition Entries.cpp:2067
NoteInfoPtr findEqualPitch(const EntryInfoPtr &entry) const
Finds a note with the same pitch in the supplied entry.
Definition Entries.cpp:2044
NoteInfoPtr getNext() const
Gets the next note in a chord on the same entry.
Definition Entries.h:1192
NoteInfoPtr()
Default constructor.
Definition Entries.h:1097
std::unique_ptr< music_theory::Transposer > createTransposer() const
Creates a transposer for this Note instance.
Definition Entries.cpp:2219
Represents a single note element in an entry.
Definition Entries.h:184
bool upStemSecond
When the entry is upstem, it is drawn on the "wrong" side of the stem.
Definition Entries.h:210
bool isValid
Should always be true but otherwise appears to be used internally by Finale.
Definition Entries.h:206
bool playDisabledByHP
Used by Finale's smart playback engine.
Definition Entries.h:221
static constexpr NoteNumber RESTID
Non floating rests have a note with this noteId that defines their staff positions.
Definition Entries.h:193
int harmAlt
Chromatic alteration relative to the key signature. Never has a magnitude greater than +/-7.
Definition Entries.h:205
bool upSplitStem
Definition Entries.h:214
NoteNumber getNoteId() const
Gets the note id for this note. This value does not change, even if the notes in a chord are rearrang...
Definition Entries.h:225
bool tieEnd
Indicates a tie ends on this note.
Definition Entries.h:208
Note(const DocumentWeakPtr &document, NoteNumber noteId)
Constructor function.
Definition Entries.h:187
bool tieStart
Indicates a tie starts on this note.
Definition Entries.h:207
bool crossStaff
Signifies that the note has a details::CrossStaff note detail.
Definition Entries.h:209
std::pair< int, int > calcDefaultEnharmonic(const MusxInstance< KeySignature > &key) const
Calculates the default enharmonic equivalent of this note. This is the value that Finale uses when de...
Definition Entries.cpp:1963
int harmLev
Diatonic displacement relative to middle C or to the tonic in the middle C octave (if the key signatu...
Definition Entries.h:204
static const xml::XmlElementArray< Note > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
bool downStemSecond
When the entry is downstem, it is drawn on the "wrong" side of the stem.
Definition Entries.h:212
std::tuple< music_theory::NoteName, int, int, int > NoteProperties
Note properites. A tuple containing:
Definition Entries.h:202
bool noPlayback
Indicates that this note should not be played back.
Definition Entries.h:218
bool parenAcci
True if the accidental has parentheses.
Definition Entries.h:217
bool noSpacing
Indicates that this note should ignored when calculating spacing.
Definition Entries.h:219
bool showAcci
True if the note has an accidental. (Dynamically changed by Finale unless freezeAcci is set....
Definition Entries.h:216
bool freezeAcci
True if the accidental should be forced on or off (based on showAcci.)
Definition Entries.h:220
NoteProperties calcNoteProperties(const MusxInstance< KeySignature > &key, KeySignature::KeyContext ctx, ClefIndex clefIndex, const MusxInstance< others::PercussionNoteInfo > &percNoteInfo, const MusxInstance< others::Staff > &staff=nullptr, bool respellEnharmonic=false) const
Calculates the note name, octave number, actual alteration, and staff position. This function does no...
Definition Entries.cpp:1998
A context wrapper for GFrameHold associated with a specific part and location.
Definition Entries.h:59
const GFrameHold * operator->() const
Provides const pointer-style access to the underlying GFrameHold.
Definition Entries.h:83
EntryInfoPtr calcNearestEntry(Edu eduPosition, bool findExact=true, std::optional< LayerIndex > matchLayer=std::nullopt, std::optional< bool > matchVoice2=std::nullopt) const
Calculates the nearest non-grace-note entry at the given eduPosition.
Definition Entries.cpp:1908
std::map< LayerIndex, bool > calcVoices() const
Calculates the number of voices used by the GFrameHold instance.
Definition Entries.cpp:1836
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 Entries.h:100
util::Fraction calcMinLegacyPickupSpacer() const
Calculates the minimum legacy pickup spacer, if any.
Definition Entries.cpp:1942
bool iterateEntries(LayerIndex layerIndex, std::function< bool(const EntryInfoPtr &)> iterator) const
iterates the entries for the specified layer in this GFrameHold from left to right
Definition Entries.cpp:1813
bool calcIsCuesOnly(bool includeVisibleInScore=false) const
Calculates if this staff in this measure contains only a cue layer and full-measure rest layers.
Definition Entries.cpp:1886
std::shared_ptr< const EntryFrame > createEntryFrame(LayerIndex layerIndex, util::Fraction timeOffset=0) const
Returns the EntryFrame for all entries in the given layer.
Definition Entries.cpp:1699
Cmper getRequestedPartId() const
Returns the requested part ID associated with this context.
Definition Entries.h:76
ClefIndex calcClefIndexAt(Edu position) const
Returns the clef index in effect for at the specified Edu position. This function does not take into ...
Definition Entries.cpp:1860
Represents the attributes of a Finale frame holder.
Definition Details.h:1078
A class to represent fractions with integer m_numerator and m_denominator, automatically reduced to s...
Definition Fraction.h:38
static constexpr Fraction fromEdu(dom::Edu edu)
Constructs a Fraction from edu.
Definition Fraction.h:101
constexpr dom::Edu calcEduDuration() const
Calculates duration as a fraction of a whole note.
Definition Fraction.h:150
A dependency-free, header-only collection of useful functions for music theory.
NoteName
The available note names in array order.
Definition music_theory.hpp:66
int16_t MeasCmper
Enigma meas Cmper (may be negative when not applicable)
Definition Fundamentals.h:64
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
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
uint16_t ClefIndex
Index into options::ClefOptions::clefDefs.
Definition Fundamentals.h:68
int32_t Edu
"Enigma Durational Units" value (1024 per quarter note)
Definition Fundamentals.h:61
std::pair< NoteType, unsigned > calcNoteInfoFromEdu(Edu duration)
Calculates the NoteType and number of dots in an Edu value.
Definition Entries.cpp:56
unsigned calcNumberOfBeamsInEdu(Edu duration)
Calculates the number of beams or flags in the Edu value.
Definition Entries.cpp:1073
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
std::weak_ptr< const T > MusxInstanceWeak
Defines a weak ptr to the type of a musx instance stored in a pool.
Definition MusxInstance.h:44
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
class to track tuplets in the frame
Definition Entries.h:838
size_t startIndex
the index of the first entry in the tuplet
Definition Entries.h:840
bool calcCreatesSingletonBeamRight() const
Calculates if this tuplet is being used to create a singleton beam to the right.
Definition Entries.h:895
TupletInfo(const std::weak_ptr< const EntryFrame > &parent, const MusxInstance< details::TupletDef > &tup, size_t index, util::Fraction start, bool forVoice2)
Constructor.
Definition Entries.h:847
bool calcIsTremolo() const
Calculates if this tuplet represents a tremolo based on the following criteria.
Definition Entries.cpp:194
size_t endIndex
the index of the last entry in the tuplet
Definition Entries.h:841
bool includesEntry(const EntryInfoPtr &entryInfo) const
Return true if the entry is part of this tuplet.
Definition Entries.h:863
util::Fraction endDura
the actual duration where the tuplet ends
Definition Entries.h:843
size_t numEntries() const
Return the number of entries in the tuplet.
Definition Entries.h:853
util::Fraction startDura
the actual duration where the tuplet starts
Definition Entries.h:842
bool calcCreatesSingletonBeamLeft() const
Calculates if this tuplet is being used to create a singleton beam to the left.
Definition Entries.h:906
MusxInstance< details::TupletDef > tuplet
the tuplet
Definition Entries.h:839
bool voice2
whether this tuplet is for voice2
Definition Entries.h:844
bool calcCreatesTimeStretch() const
Detects tuplets being used to create time stretch in an independent time signature.
Definition Entries.cpp:336