25#include "CommonClasses.h"
55 set_type(barlineType);
81 set_duration(duration);
111 create_location(position);
141 create_location(position);
191 create_location(position);
222 create_value(noteValue);
237 using ArrayElementObject::ArrayElementObject;
268 using ArrayElementObject::ArrayElementObject;
307 set_selector(selector);
Represents an MNX object that is included as an array element.
Definition BaseTypes.h:615
Represents an MNX array, encapsulating property access.
Definition BaseTypes.h:483
Base class wrapper for all MNX JSON nodes.
Definition BaseTypes.h:210
json_pointer pointer() const
Returns the json_pointer for this node.
Definition BaseTypes.h:271
T parent() const
Returns the parent object for this node.
Definition BaseTypes.h:258
const std::shared_ptr< json > & root() const
Returns the root.
Definition BaseTypes.h:288
Represents an MNX dictionary, where each key is a user-defined string.
Definition BaseTypes.h:769
std::pair< NumType, NumType > Initializer
initializer for Fraction class (numerator, denominator)
Definition CommonClasses.h:43
Represents the global section of an MNX document, containing global measures.
Definition Global.h:321
MNX_OPTIONAL_CHILD(global::LyricsGlobal, lyrics)
lyrics metadata
MNX_OPTIONAL_CHILD(Array< global::StyleGlobal >, styles)
array of styles
Global(Base &parent, const std::string_view &key)
Creates a new Global class as a child of a JSON element.
Definition Global.h:328
MNX_REQUIRED_CHILD(Array< global::Measure >, measures)
array of global measures.
Represents a key signature.
Definition CommonClasses.h:162
Definition CommonClasses.h:193
Represents a symbolic note value (not necessarily a duration)
Definition CommonClasses.h:190
Represents an MNX object, encapsulating property access.
Definition BaseTypes.h:420
Object(const std::shared_ptr< json > &root, json_pointer pointer)
Wraps an Object class around an existing JSON object node.
Definition BaseTypes.h:425
Represents a system on a page in a score.
Definition CommonClasses.h:105
Represents the tempo for a global measure.
Definition CommonClasses.h:261
Represents the barline for a global measure.
Definition Global.h:40
MNX_REQUIRED_PROPERTY(BarlineType, type)
the type of barline
Barline(Base &parent, const std::string_view &key, BarlineType barlineType)
Creates a new Barline class as a child of a JSON element.
Definition Global.h:52
Barline(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Barline objects.
Definition Global.h:43
Represents an alternate ending (or "volta bracket") for a global measure.
Definition Global.h:66
MNX_REQUIRED_PROPERTY(int, duration)
the type of barline
MNX_OPTIONAL_CHILD(Array< int >, numbers)
ending numbers
MNX_OPTIONAL_PROPERTY(std::string, color)
color to use when rendering the ending
MNX_OPTIONAL_NAMED_PROPERTY(std::string, styleClass, "class")
style class
Ending(Base &parent, const std::string_view &key, int duration)
Creates a new Ending class as a child of a JSON element.
Definition Global.h:78
MNX_OPTIONAL_PROPERTY_WITH_DEFAULT(bool, open, false)
if this is an open (i.e., final) ending
Ending(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Ending objects.
Definition Global.h:69
Represents an Fine object (as in "D.S. al Fine")
Definition Global.h:96
MNX_OPTIONAL_PROPERTY(std::string, color)
color to use when rendering the fine direction
Fine(Base &parent, const std::string_view &key, const Fraction::Initializer &position)
Creates a new Fine class as a child of a JSON element.
Definition Global.h:108
Fine(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Fine objects.
Definition Global.h:99
MNX_OPTIONAL_NAMED_PROPERTY(std::string, styleClass, "class")
style class
MNX_REQUIRED_CHILD(RhythmicPosition, location)
the location of the fine direction
Represents an Jump object (as in "D.S.")
Definition Global.h:124
Jump(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Jump objects.
Definition Global.h:127
MNX_REQUIRED_CHILD(RhythmicPosition, location)
the location of the jump
Jump(Base &parent, const std::string_view &key, JumpType jumpType, const Fraction::Initializer &position)
Creates a new Jump class as a child of a JSON element.
Definition Global.h:137
MNX_REQUIRED_PROPERTY(JumpType, type)
the JumpType
Metadata for lyrics in this MNX document.
Definition Global.h:279
MNX_OPTIONAL_CHILD(Array< std::string >, lineOrder)
Lyric line IDs used in the document (e.g. verse numbers)
MNX_OPTIONAL_CHILD(Dictionary< LyricLineMetadata >, lineMetadata)
Defines lyric line IDs and their metadata.
Represents a single global measure instance within an MNX document.
Definition Global.h:235
MNX_OPTIONAL_CHILD(Segno, segno)
if present, indicates that a segno marker is here
MNX_OPTIONAL_CHILD(Array< Tempo >, tempos)
the tempo changes within the measure, if any
MNX_OPTIONAL_PROPERTY(int, index)
the measure index which is used to refer to this measure by other classes in the MNX document
MNX_OPTIONAL_CHILD(Barline, barline)
optional barline for this measure
MNX_OPTIONAL_CHILD(RepeatStart, repeatStart)
if present, indicates that a repeated section starts here
MNX_OPTIONAL_PROPERTY(int, number)
visible measure number. Use calcMeasureIndex to get the default value.
MNX_OPTIONAL_CHILD(Jump, jump)
optional jump direction for this measure
MNX_OPTIONAL_CHILD(Ending, ending)
optional ending ("volta bracket") for this measure
MNX_OPTIONAL_CHILD(KeySignature, key)
optional key signature/key change for this measure
BarlineType calcBarlineType() const
Calculates the barline type for this measure.
Definition Implementations.cpp:155
int calcMeasureIndex() const
Calculates the measure index for this measure.
Definition Implementations.cpp:165
MNX_OPTIONAL_CHILD(Fine, fine)
optional fine direction for this measure
MNX_OPTIONAL_CHILD(RepeatEnd, repeatEnd)
if present, indicates that there is backwards repeat
MNX_OPTIONAL_CHILD(TimeSignature, time)
if present, indicates a meter change
Represents the end of a repeat in an MNX document.
Definition Global.h:153
MNX_OPTIONAL_PROPERTY(int, times)
number of times to repeat
Represents the start of a repeat in an MNX document.
Definition Global.h:165
Represents a segno marker.
Definition Global.h:176
Segno(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Segno objects.
Definition Global.h:179
Segno(Base &parent, const std::string_view &key, const Fraction::Initializer &position)
Creates a new Segno class as a child of a JSON element.
Definition Global.h:188
MNX_OPTIONAL_PROPERTY(std::string, glyph)
the SMuFL glyph name to be used when rendering this segno.
MNX_OPTIONAL_PROPERTY(std::string, color)
color to use when rendering the ending
MNX_OPTIONAL_NAMED_PROPERTY(std::string, styleClass, "class")
style class
MNX_REQUIRED_CHILD(RhythmicPosition, location)
location
Visual styling selectors for this MNX document.
Definition Global.h:292
StyleGlobal(Base &parent, const std::string_view &key, const std::string &selector)
Creates a new Jump class as a child of a JSON element.
Definition Global.h:304
MNX_OPTIONAL_PROPERTY(std::string, color)
the JumpType
MNX_REQUIRED_PROPERTY(std::string, selector)
the location of the jump
StyleGlobal(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing StyleGlobal objects.
Definition Global.h:295
Represents the tempo for a global measure.
Definition Global.h:205
Tempo(Base &parent, const std::string_view &key, int bpm, const NoteValue::Initializer ¬eValue)
Creates a new Tempo class as a child of a JSON element.
Definition Global.h:218
MNX_REQUIRED_CHILD(NoteValue, value)
the note value for the tempo.
MNX_REQUIRED_PROPERTY(int, bpm)
the beats per minute of this tempo marking
Tempo(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing Tempo instances.
Definition Global.h:208
MNX_OPTIONAL_CHILD(RhythmicPosition, location)
location within the measure of the tempo marking
object model for MNX format
JumpType
The types of jumps.
Definition Enumerations.h:105
json::json_pointer json_pointer
JSON pointer class for MNX.
Definition BaseTypes.h:197
BarlineType
The types of barlines supported.
Definition Enumerations.h:52