MUSX Document Model
Loading...
Searching...
No Matches
Entries.h
1/*
2 * Copyright (C) 2025, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#pragma once
23
24#include <tuple>
25
26#include "musx/util/Fraction.h"
27#include "BaseClasses.h"
28#include "CommonClasses.h"
29 // do not add other dom class dependencies. Use Implementations.h for implementations that need total class access.
30
31 namespace music_theory {
32 class Transposer;
33} // namespace music_theory
34
35namespace musx {
36namespace dom {
37
38namespace others {
39class Staff;
40class StaffComposite;
41} // namespace others
42
43namespace details {
44class TupletDef;
45class GFrameHold;
46} // namespace details
47
57std::pair<NoteType, unsigned> calcNoteInfoFromEdu(Edu duration);
58
60unsigned calcNumberOfBeamsInEdu(Edu duration);
61
68class Note : public Base
69{
70public:
72 explicit Note(const DocumentWeakPtr& document, NoteNumber noteId)
73 : Base(document, 0, ShareMode::All), m_noteId(noteId)
74 {
75 }
76
78 enum class NoteName : int
79 {
80 C = 0,
81 D = 1,
82 E = 2,
83 F = 3,
84 G = 4,
85 A = 5,
86 B = 6
87 };
88
89 int harmLev{};
90 int harmAlt{};
91 bool isValid{};
92 bool crossStaff{};
93 bool tieStart{};
94 bool tieEnd{};
95 bool showAcci{};
96 bool freezeAcci{};
97
100 NoteNumber getNoteId() const { return m_noteId; }
101
123 std::tuple<NoteName, int, int, int> calcNoteProperties(const std::shared_ptr<KeySignature>& key, ClefIndex clefIndex,
124 const std::shared_ptr<const others::Staff>& staff = nullptr) const;
125
126 bool requireAllFields() const override { return false; }
127
129
130private:
131 NoteNumber m_noteId{};
132};
133
140class Entry : public Base
141{
142public:
147 explicit Entry(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, EntryNumber entnum, EntryNumber prev, EntryNumber next)
148 : Base(document, partId, shareMode), m_entnum(entnum), m_prev(prev), m_next(next)
149 {
150 }
151
161 int numNotes{};
162 bool isValid{};
163 bool isNote{};
164 bool graceNote{};
165 bool floatRest{};
166 bool isHidden{};
167 bool voice2{};
168 bool articDetail{};
169 bool beam{};
170 bool secBeam{};
171 bool crossStaff{};
172 bool freezeStem{};
173 bool upStem{};
174 bool stemDetail{};
176 bool sorted{};
177 bool lyricDetail{};
179 bool freezeBeam{};
180
182 std::vector<std::shared_ptr<Note>> notes;
183
185 EntryNumber getEntryNumber() const { return m_entnum; }
186
190 std::shared_ptr<Entry> getNext() const;
191
195 std::shared_ptr<Entry> getPrevious() const;
196
200 std::pair<NoteType, int> calcNoteInfo() const { return calcNoteInfoFromEdu(duration); }
201
206
209 bool hasStem() const { return duration < Edu(NoteType::Whole); }
210
211 void integrityCheck() override
212 {
213 this->Base::integrityCheck();
214 if (numNotes != notes.size()) {
215 MUSX_INTEGRITY_ERROR("Entry " + std::to_string(m_entnum) + " has an incorrect number of notes.");
216 }
217 }
218
219 bool requireAllFields() const override { return false; }
220
221 constexpr static std::string_view XmlNodeName = "entry";
223
224private:
225 EntryNumber m_entnum;
226 EntryNumber m_prev;
227 EntryNumber m_next;
228
229};
230
231class EntryInfo;
232class EntryFrame;
233class NoteInfoPtr;
234
239{
240public:
242 EntryInfoPtr() : m_entryFrame(nullptr), m_indexInFrame(0) {}
243
249 EntryInfoPtr(const std::shared_ptr<const EntryFrame>& entryFrame, size_t index = 0)
250 : m_entryFrame(entryFrame), m_indexInFrame(index) {}
251
253 const std::shared_ptr<const EntryInfo> operator->() const;
254
256 operator bool() const;
257
260 bool isSameEntry(const EntryInfoPtr& src) const;
261
263 std::shared_ptr<const EntryFrame> getFrame() const { return m_entryFrame; }
264
266 size_t getIndexInFrame() const { return m_indexInFrame; }
267
270
272 InstCmper getStaff() const;
273
275 MeasCmper getMeasure() const;
276
279 std::shared_ptr<others::StaffComposite> createCurrentStaff(const std::optional<InstCmper>& forStaffId = std::nullopt) const;
280
282 std::shared_ptr<KeySignature> getKeySignature() const;
283
285 unsigned calcReverseGraceIndex() const;
286
288 std::optional<size_t> calcNextTupletIndex(std::optional<size_t> currentIndex) const;
289
292
296
301
305
308
313
319 EntryInfoPtr getNextInVoice(int voice) const;
320
322 EntryInfoPtr getNextInBeamGroup(bool includeHiddenEntries = false) const
323 { return iterateBeamGroup<&EntryInfoPtr::nextPotentialInBeam, &EntryInfoPtr::previousPotentialInBeam>(includeHiddenEntries); }
324
326 EntryInfoPtr getPreviousInBeamGroup(bool includeHiddenEntries = false) const
327 { return iterateBeamGroup<&EntryInfoPtr::previousPotentialInBeam, &EntryInfoPtr::nextPotentialInBeam>(includeHiddenEntries); }
328
331 bool calcDisplaysAsRest() const;
332
335 bool calcUnbeamed() const;
336
338 bool calcIsBeamStart() const;
339
343
347 NoteInfoPtr findEqualPitch(const NoteInfoPtr& src) const;
348
350 unsigned calcNumberOfBeams() const;
351
354 unsigned calcLowestBeamStart() const;
355
358 unsigned calcLowestBeamEnd() const;
359
362 unsigned calcLowestBeamStub() const;
363
369 bool calcBeamStubIsLeft() const;
370
371private:
372 bool canBeBeamed() const;
373
374 unsigned calcVisibleBeams() const;
375
376 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
377 std::optional<unsigned> iterateFindRestsInSecondaryBeam(const EntryInfoPtr nextOrPrevInBeam) const;
378
379 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
380 EntryInfoPtr iteratePotentialEntryInBeam() const;
381
382 template<EntryInfoPtr(EntryInfoPtr::* Iterator)() const>
383 bool iterateNotesExistLeftOrRight() const;
384
385 EntryInfoPtr nextPotentialInBeam(bool includeHiddenEntries) const;
386
387 EntryInfoPtr previousPotentialInBeam(bool includeHiddenEntries) const;
388
389 template<EntryInfoPtr(EntryInfoPtr::* Iterator)(bool) const, EntryInfoPtr(EntryInfoPtr::* ReverseIterator)(bool) const>
390 EntryInfoPtr iterateBeamGroup(bool includeHiddenEntries) const;
391
392 std::shared_ptr<const EntryFrame> m_entryFrame;
393 size_t m_indexInFrame{};
394};
395
402class EntryFrame : public Base, public std::enable_shared_from_this<EntryFrame>
403{
404public:
413 explicit EntryFrame(const details::GFrameHold& gfhold, InstCmper staff, MeasCmper measure, LayerIndex layerIndex, bool forWrittenPitch);
414
417 {
418 std::shared_ptr<const details::TupletDef> tuplet;
419 size_t startIndex;
420 size_t endIndex;
423
425 TupletInfo(const std::shared_ptr<const details::TupletDef>& tup, size_t index, util::Fraction start)
426 : tuplet(tup), startIndex(index), endIndex(std::numeric_limits<size_t>::max()),
427 startDura(start), endDura(-1)
428 {}
429 };
430
437 std::vector<TupletInfo> tupletInfo;
438 std::shared_ptr<KeySignature> keySignature;
440
442 InstCmper getStaff() const { return m_staff; }
443
445 MeasCmper getMeasure() const { return m_measure; }
446
448 LayerIndex getLayerIndex() const { return m_layerIndex; }
449
452 bool isForWrittenPitch() const { return m_forWrittenPitch; }
453
455 const std::vector<std::shared_ptr<const EntryInfo>>& getEntries() const
456 { return m_entries; }
457
461 EntryInfoPtr getFirstInVoice(int voice) const;
462
464 void addEntry(const std::shared_ptr<const EntryInfo>& entry)
465 { m_entries.emplace_back(entry); }
466
469 std::shared_ptr<const EntryFrame> getNext() const;
470
473 std::shared_ptr<const EntryFrame> getPrevious() const;
474
475private:
476 InstCmper m_staff;
477 MeasCmper m_measure;
478 LayerIndex m_layerIndex;
479 bool m_forWrittenPitch;
480
481 std::vector<std::shared_ptr<const EntryInfo>> m_entries;
482};
483
484namespace details {
485class GFrameHold;
486} // namespace details
487
497{
502 explicit EntryInfo(const std::shared_ptr<const Entry>& entry)
503 : m_entry(entry) {}
504
505#ifndef DOXYGEN_SHOULD_IGNORE_THIS
506 friend details::GFrameHold;
507#endif
508
509public:
512 bool v2Launch{};
513 unsigned graceIndex{};
517
520 std::shared_ptr<const Entry> getEntry() const
521 {
522 auto retval = m_entry.lock();
523 if (!retval) {
524 throw std::logic_error("Entry pointer is no longer valid");
525 }
526 return retval;
527 }
528
529private:
530 std::weak_ptr<const Entry> m_entry;
531};
532
535{
536public:
538 NoteInfoPtr() : m_entry(), m_noteIndex(0) {}
539
543 NoteInfoPtr(const EntryInfoPtr& entryInfo, size_t noteIndex)
544 : m_entry(entryInfo), m_noteIndex(noteIndex)
545 {}
546
548 operator bool() const
549 { return m_entry && m_noteIndex < m_entry->getEntry()->notes.size(); }
550
552 bool isSameNote(const NoteInfoPtr& src) const
553 { return m_entry.isSameEntry(src.m_entry) && m_noteIndex == src.m_noteIndex; }
554
556 std::shared_ptr<const Note> operator->() const
557 {
558 MUSX_ASSERT_IF(m_noteIndex >= m_entry->getEntry()->notes.size()) {
559 throw std::logic_error("Note index is too large for notes array.");
560 }
561 return m_entry->getEntry()->notes[m_noteIndex];
562 }
563
566 { return m_entry; }
567
576 std::tuple<Note::NoteName, int, int, int> calcNoteProperties() const;
577
581 NoteInfoPtr calcTieTo() const;
582
586 NoteInfoPtr calcTieFrom() const;
587
589 InstCmper calcStaff() const;
590
593 std::unique_ptr<music_theory::Transposer> createTransposer() const;
594
595private:
596 EntryInfoPtr m_entry;
597 size_t m_noteIndex;
598};
599
600} // namespace dom
601} // namespace entries
Base class to enforce polymorphism across all DOM classes.
Definition BaseClasses.h:64
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
Represents a vector of EntryInfo instances for a given frame, along with computed information.
Definition Entries.h:403
bool isForWrittenPitch() const
Returns if this entry frame was created for written pitch.
Definition Entries.h:452
InstCmper getStaff() const
Get the staff for the entry.
Definition Entries.h:442
MeasCmper getMeasure() const
Get the measure for the entry.
Definition Entries.h:445
std::shared_ptr< const EntryFrame > getPrevious() const
Gets the entry frame for the previous measure with the same staff and layer.
Definition Implementations.cpp:142
void addEntry(const std::shared_ptr< const EntryInfo > &entry)
Add an entry to the list.
Definition Entries.h:464
const std::vector< std::shared_ptr< const EntryInfo > > & getEntries() const
Get the entry list.
Definition Entries.h:455
EntryInfoPtr getFirstInVoice(int voice) const
Returns the first entry in the specified v1/v2 or null if none.
Definition Implementations.cpp:117
std::shared_ptr< KeySignature > keySignature
Definition Entries.h:438
LayerIndex getLayerIndex() const
Get the layer index (0..3) of the entry.
Definition Entries.h:448
std::vector< TupletInfo > tupletInfo
A list of the tuplets in the frame and their calculated starting and ending information.
Definition Entries.h:437
std::shared_ptr< const EntryFrame > getNext() const
Gets the entry frame for the next measure with the same staff and layer.
Definition Implementations.cpp:134
Wraps a frame of shared_ptr<const EntryInfo> and an index for per entry access. This class manages ow...
Definition Entries.h:239
EntryInfoPtr getNextInFrame() const
Get the next entry in the frame.
Definition Implementations.cpp:235
EntryInfoPtr(const std::shared_ptr< const EntryFrame > &entryFrame, size_t index=0)
Constructor function.
Definition Entries.h:249
EntryInfoPtr getNextSameV() const
Get the next entry in the frame in the same voice.
Definition Implementations.cpp:243
size_t getIndexInFrame() const
Returns the index within the frame.
Definition Entries.h:266
NoteInfoPtr findEqualPitch(const NoteInfoPtr &src) const
Finds a note with the same pitch in the current entry.
Definition Implementations.cpp:318
unsigned calcReverseGraceIndex() const
Caclulates the grace index counting leftward (used by other standards such as MNX)
Definition Implementations.cpp:197
std::shared_ptr< KeySignature > getKeySignature() const
Get the key signature of the entry.
Definition Implementations.cpp:188
bool isSameEntry(const EntryInfoPtr &src) const
Returns whether the input and the current instance refer to the same entry.
Definition Implementations.cpp:174
EntryInfoPtr getPreviousInLayer() const
Get the previous entry in the same layer and staff. This can be in the previous measure.
Definition Implementations.cpp:260
EntryInfoPtr getNextInLayer() const
Get the next entry in the same layer and staff. This can be in the next measure.
Definition Implementations.cpp:224
unsigned calcLowestBeamStub() const
Returns the lowest beam stub at this entry, where 2 = 16th note stub, 3 = 32nd note stub,...
Definition Implementations.cpp:493
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:322
std::shared_ptr< others::StaffComposite > createCurrentStaff(const std::optional< InstCmper > &forStaffId=std::nullopt) const
Creates the current StaffComposite for the entry.
Definition Implementations.cpp:190
unsigned calcLowestBeamStart() const
Returns the lowest beam number starting at this entry, where 1 = 8th note beam, 2 = 16th note beam,...
Definition Implementations.cpp:440
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:326
unsigned calcLowestBeamEnd() const
Returns the lowest beam number ending at this entry, where 1 = 8th note beam, 2 = 16th note beam,...
Definition Implementations.cpp:470
LayerIndex getLayerIndex() const
Get the layer index (0..3) of the entry.
Definition Implementations.cpp:182
unsigned calcNumberOfBeams() const
Calculates the number of beams or flags on the entry.
Definition Implementations.cpp:389
EntryInfoPtr getPreviousInFrame() const
Get the previous entry in the frame.
Definition Implementations.cpp:271
std::shared_ptr< const EntryFrame > getFrame() const
Returns the frame.
Definition Entries.h:263
bool calcDisplaysAsRest() const
Calculates if an entry displays as a rest.
Definition Implementations.cpp:304
EntryInfoPtr findBeamEnd() const
Finds the end entry of a beamed group.
Definition Implementations.cpp:356
bool calcIsBeamStart() const
Returns whether this is the start of a primary beam.
Definition Implementations.cpp:349
EntryInfoPtr getPreviousSameV() const
Get the previous entry in the frame in the same voice.
Definition Implementations.cpp:279
EntryInfoPtr getNextInVoice(int voice) const
Returns the next entry in the frame in the specified v1/v2 or null if none.
Definition Implementations.cpp:294
const std::shared_ptr< const EntryInfo > operator->() const
Allows -> access to the underlying EntryInfo instance.
Definition Implementations.cpp:156
InstCmper getStaff() const
Get the staff cmper.
Definition Implementations.cpp:184
bool calcUnbeamed() const
Returns whether this is an unbeamed entry.
Definition Implementations.cpp:309
EntryInfoPtr()
Default constructor.
Definition Entries.h:242
std::optional< size_t > calcNextTupletIndex(std::optional< size_t > currentIndex) const
Returns the next higher tuplet index that this entry starts, or std::nullopt if none.
Definition Implementations.cpp:209
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 Implementations.cpp:503
MeasCmper getMeasure() const
Get the measure cmper.
Definition Implementations.cpp:186
Information an entry along with the entry.
Definition Entries.h:497
bool v2Launch
indicates if this entry (which is voice1) launches a voice2 sequence
Definition Entries.h:512
unsigned graceIndex
Definition Entries.h:513
ClefIndex clefIndex
Definition Entries.h:515
std::shared_ptr< const Entry > getEntry() const
Get the entry.
Definition Entries.h:520
util::Fraction elapsedDuration
the elapsed duration within the measure where this entry occurs (in fractions of a whole note)
Definition Entries.h:510
util::Fraction actualDuration
the actual duration of entry (in fractions of a whole note), taking into account tuplets and grace no...
Definition Entries.h:511
Represents an entry containing metadata and notes.
Definition Entries.h:141
std::pair< NoteType, int > calcNoteInfo() const
Calculates the NoteType and number of augmentation dots. (See calcNoteInfoFromEdu....
Definition Entries.h:200
bool upStem
Whether a stem is up or down. (Only reliable when freezeStem is true.)
Definition Entries.h:173
Entry(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, EntryNumber prev, EntryNumber next)
Constructor function.
Definition Entries.h:147
EntryNumber getEntryNumber() const
Gets the entry number for this entry.
Definition Entries.h:185
bool articDetail
Indicates there is an articulation on the entry.
Definition Entries.h:168
bool isNote
If this value is false, the entry is a rest.
Definition Entries.h:163
bool freezeStem
Freeze stem flag (upStem gives the direction.)
Definition Entries.h:172
bool voice2
This is a V2 note. (xml node <v2>)
Definition Entries.h:167
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition Entries.h:221
bool secBeam
Signifies a secondary beam break occurs on the entry.
Definition Entries.h:170
void integrityCheck() override
Allows a class to determine if it has been properly contructed by the factory and fix issues that it ...
Definition Entries.h:211
bool stemDetail
Indicates there are stem modification.
Definition Entries.h:174
bool isValid
Should always be true but otherwise appears to be used internally by Finale.
Definition Entries.h:162
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:182
bool requireAllFields() const override
Specifies if the parser should alert (print or throw) when an unknown xml tag is found for this class...
Definition Entries.h:219
util::Fraction calcFraction() const
Calculates the duration as a util::Fraction of a whole note.
Definition Entries.h:205
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:209
bool crossStaff
Signifies that at least one note in the entry has been cross staffed.
Definition Entries.h:171
bool floatRest
Is floating rest. If false, the first note element gives the staff position of the rest.
Definition Entries.h:165
bool smartShapeDetail
Indicates this entry has a smart shape assignment.
Definition Entries.h:175
Edu duration
Duration of the entry, not taking into account tuplets.
Definition Entries.h:160
bool isHidden
Indicates the entry is hidden, (xml node is <ignore>)
Definition Entries.h:166
bool lyricDetail
Indicates there is a lyric assignment on the entry.
Definition Entries.h:177
int numNotes
Number of notes in the entry. There is an error if this is not the same as notes.size().
Definition Entries.h:161
bool sorted
Sorted flag.
Definition Entries.h:176
bool beam
Signifies the start of a beam or singleton entry. (That is, any beam breaks at this entry....
Definition Entries.h:169
bool performanceData
Indicates there is performance data on the entry.
Definition Entries.h:178
bool freezeBeam
Freeze beam flag (Derived from the presence of <freezeBeam> node.)
Definition Entries.h:179
std::shared_ptr< Entry > getNext() const
Gets the next entry in this list or nullptr if none.
Definition Implementations.cpp:62
bool graceNote
Indicate the entry is a grace note.
Definition Entries.h:164
std::shared_ptr< Entry > getPrevious() const
Gets the previous entry in this list or nullptr if none.
Definition Implementations.cpp:72
Wraps an EntryInfo instance and a note index.
Definition Entries.h:535
InstCmper calcStaff() const
Calculates the staff number, taking into account cross staffing.
Definition Implementations.cpp:1618
EntryInfoPtr getEntryInfo() const
Gets the entry info for this note.
Definition Entries.h:565
bool isSameNote(const NoteInfoPtr &src) const
Returns whether the input and the current instance refer to the same note.
Definition Entries.h:552
std::tuple< Note::NoteName, int, int, int > calcNoteProperties() const
Calculates the note name, octave number, actual alteration, and staff position.
Definition Implementations.cpp:1628
std::shared_ptr< const Note > operator->() const
Allows -> access to the underlying Note instance.
Definition Entries.h:556
NoteInfoPtr calcTieFrom() const
Calculates the note that this note could tie from. Check the return value's Note::tieStart to see if ...
Definition Implementations.cpp:1584
NoteInfoPtr(const EntryInfoPtr &entryInfo, size_t noteIndex)
Constructor.
Definition Entries.h:543
NoteInfoPtr calcTieTo() const
Calculates the note that this note could tie to. Check the return value's Note::tieEnd to see if ther...
Definition Implementations.cpp:1550
NoteInfoPtr()
Default constructor.
Definition Entries.h:538
std::unique_ptr< music_theory::Transposer > createTransposer() const
Creates a transposer for this Note instance.
Definition Implementations.cpp:1649
Represents a single note element in an entry.
Definition Entries.h:69
bool requireAllFields() const override
Specifies if the parser should alert (print or throw) when an unknown xml tag is found for this class...
Definition Entries.h:126
bool isValid
Should always be true but otherwise appears to be used internally by Finale.
Definition Entries.h:91
std::tuple< NoteName, int, int, int > calcNoteProperties(const std::shared_ptr< KeySignature > &key, ClefIndex clefIndex, const std::shared_ptr< const others::Staff > &staff=nullptr) const
Calculates the note name, octave number, actual alteration, and staff position.
Definition Implementations.cpp:1504
int harmAlt
Chromatic alteration relative to the key signature. Never has a magnitude greater than +/-7.
Definition Entries.h:90
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:100
bool tieEnd
Indicates a tie ends on this note.
Definition Entries.h:94
Note(const DocumentWeakPtr &document, NoteNumber noteId)
Constructor function.
Definition Entries.h:72
bool tieStart
Indicates a tie starts on this note.
Definition Entries.h:93
bool crossStaff
Signifies that the note has a details::CrossStaff note detail.
Definition Entries.h:92
int harmLev
Diatonic displacement relative to middle C or to the tonic in the middle C octave (if the key signatu...
Definition Entries.h:89
static const xml::XmlElementArray< Note > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
NoteName
The available note names, in array order.
Definition Entries.h:79
bool showAcci
True if the note has an accidental. (Dynamically changed by Finale unless freezeAcci is set....
Definition Entries.h:95
bool freezeAcci
True if the accidental should be forced on or off (based on showAcci.)
Definition Entries.h:96
Represents the attributes of a Finale frame holder.
Definition Details.h:283
A class to represent fractions with integer m_numerator and m_denominator, automatically reduced to s...
Definition Fraction.h:37
static Fraction fromEdu(int edu)
Constructs a Fraction from edu.
Definition Fraction.cpp:31
A dependency-free, header-only collection of useful functions for music theory.
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
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::pair< NoteType, unsigned > calcNoteInfoFromEdu(Edu duration)
Calculates the NoteType and number of dots in an Edu value.
Definition Implementations.cpp:82
unsigned calcNumberOfBeamsInEdu(Edu duration)
Calculates the number of beams or flags in the Edu value.
Definition Implementations.cpp:375
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
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
class to track tuplets in the frame
Definition Entries.h:417
size_t startIndex
the index of the first entry in the tuplet
Definition Entries.h:419
size_t endIndex
the index of the last entry in the tuplet
Definition Entries.h:420
util::Fraction endDura
the actual duration where the tuplet ends
Definition Entries.h:422
std::shared_ptr< const details::TupletDef > tuplet
the tuplet
Definition Entries.h:418
util::Fraction startDura
the actual duration where the tuplet starts
Definition Entries.h:421
TupletInfo(const std::shared_ptr< const details::TupletDef > &tup, size_t index, util::Fraction start)
Constructor.
Definition Entries.h:425