MNX Document Model
Loading...
Searching...
No Matches
mnx Namespace Reference

object model for MNX format More...

Namespaces

namespace  global
 classes related to the root global object
 
namespace  layout
 classes related to the root layouts array
 
namespace  part
 classes related to the root parts array
 
namespace  score
 classes related to the root scores array
 
namespace  sequence
 classes related to sequences in the part measure
 
namespace  validation
 provides schema- and semantic-level validation functions for MNX documents
 

Classes

class  Array
 Represents an MNX array, encapsulating property access. More...
 
class  ArrayElementObject
 Represents an MNX object that is included as an array element. More...
 
class  Base
 Base class wrapper for all MNX JSON nodes. More...
 
class  ContentArray
 Class for content arrays. More...
 
class  ContentObject
 Base class for objects that are elements of content arrays. More...
 
class  Dictionary
 Represents an MNX dictionary, where each key is a user-defined string. More...
 
class  Document
 Represents an MNX document and provides methods for loading and saving. More...
 
struct  EntityMapPolicies
 Controls optional behaviors when building an EntityMap. More...
 
class  EnumStringMapping
 Supplies enum string mappings to nlohmann json's serializer. More...
 
class  Fraction
 Represents a fraction of a whole note, for measuring musical time. More...
 
class  FractionValue
 Represents a detached arithmetic fraction with normalization. More...
 
class  Global
 Represents the global section of an MNX document, containing global measures. More...
 
class  Interval
 Represents a musical chromatic interval. More...
 
class  KeySignature
 Represents a key signature. More...
 
class  Layout
 Represents the element of the layout array in an MNX document. More...
 
class  MeasureRhythmicPosition
 Represents a system on a page in a score. More...
 
class  MnxMetaData
 Represents metadata for an MNX document. More...
 
class  NoteValue
 Represents a symbolic note value (not necessarily a duration) More...
 
class  NoteValueQuantity
 Represents a quantity of symbolic note values=. More...
 
class  Object
 Represents an MNX object, encapsulating property access. More...
 
class  Part
 Represents a single part in an MNX document. More...
 
class  RhythmicPosition
 Represents a system on a page in a score. More...
 
class  Score
 Represents an element in the scores section of an MNX document. More...
 
class  Sequence
 A sequence of events and other items in this measure for a voice in a part. More...
 
class  SimpleType
 Allows access to a fundamental type (number, boolean, string) in a JSON node. More...
 
class  TimeSignature
 Represents the tempo for a global measure. More...
 

Typedefs

using json = nlohmann::json
 JSON class for MNX.
 
using json_pointer = json::json_pointer
 JSON pointer class for MNX.
 
using ErrorHandler = std::function< void(const std::string &message, const Base &location)>
 Error handler type for reporting errors.
 

Enumerations

enum class  AccidentalEnclosureSymbol { Brackets , Parentheses }
 The types of accidental enclosure symbols. More...
 
enum class  AutoYesNo { Auto , Yes , No }
 3-state choice enum
 
enum class  BarlineType {
  Regular , Dashed , Dotted , Double ,
  Final , Heavy , HeavyHeavy , HeavyLight ,
  NoBarline , Short , Tick
}
 The types of barlines supported. More...
 
enum class  BeamHookDirection { Auto , Left , Right }
 The types of jumps. More...
 
enum class  BreathMarkSymbol { Comma , Tick , Upbow , Salzedo }
 The symbols available for a breath mark. More...
 
enum class  ClefSign { CClef , FClef , GClef }
 The values available in a clef sign object. More...
 
enum class  GraceType { StealPrevious , StealFollowing , MakeTime }
 Options for how to perform grace notes. More...
 
enum class  JumpType { DsAlFine , Segno }
 The types of jumps. More...
 
enum class  LabelRef { Name , ShortName }
 The values available in a labelref. More...
 
enum class  LayoutSymbol { NoSymbol , Brace , Bracket }
 The symbols available to bracket a staff group. More...
 
enum class  LineType { Solid , Dashed , Dotted , Wavy }
 Specifies the visual style of a line in (specifically) slurs. More...
 
enum class  LyricLineType { End , Middle , Start , Whole }
 The symbols available to bracket a staff group. More...
 
enum class  MarkingUpDown { Down , Up }
 The values available in an event marking "pointing" property. More...
 
enum class  NoteStep : int {
  C = 0 , D = 1 , E = 2 , F = 3 ,
  G = 4 , A = 5 , B = 6
}
 The diatonic note step values. More...
 
enum class  NoteValueBase {
  Note4096th , Note2048th , Note1024th , Note512th ,
  Note256th , Note128th , Note64th , Note32nd ,
  Note16th , Eighth , Quarter , Half ,
  Whole , Breve , Longa , Maxima ,
  DuplexMaxima
}
 The note values allowed in MNX.
 
enum class  OttavaAmount : int {
  OctaveDown = -1 , TwoOctavesDown = -2 , ThreeOctavesDown = -3 , OctaveUp = 1 ,
  TwoOctavesUp = 2 , ThreeOctavesUp = 3
}
 Valid values for ottava amount. More...
 
enum class  OttavaAmountOrZero : int {
  NoTransposition = 0 , ThreeOctavesDown = -3 , TwoOctavesDown = -2 , OctaveDown = -1 ,
  OctaveUp = 1 , TwoOctavesUp = 2 , ThreeOctavesUp = 3
}
 Valid values for octave displacment amount, including zero for no transposition. More...
 
enum class  SlurTieSide { Down , Up }
 Specifies the direction of a slur or tie. More...
 
enum class  StaffGroupBarlineStyle { Individual , Instrument , Unified , Mensurstrich }
 The types of barline overrides for staff groups in layouts. More...
 
enum class  StaffGroupBarlineOverride { None , Unified , Mensurstrich }
 Resolved barline override setting for a layout staff group. More...
 
enum class  StemDirection { Down , Up }
 The values available in a labelref. More...
 
enum class  TieTargetType { NextNote , Arpeggio , CrossJump , CrossVoice }
 The values that describe the target of a tie. More...
 
enum class  TimeSignatureUnit : int {
  Whole = 1 , Half = 2 , Quarter = 4 , Eighth = 8 ,
  Value16th = 16 , Value32nd = 32 , Value64th = 64 , Value128th = 128
}
 Valid units for the lower numbers of time signatures.
 
enum class  TupletDisplaySetting { Inner , NoNumber , Both }
 Controls display of a tuplet's number or note value.
 

Functions

const std::string & getMnxSchemaId ()
 Returns the MNX schema id from the embedded schema.
 
int getMnxSchemaVersion ()
 Returns the MNX version extracted from the trailing segment of schema $id.
 

Variables

const int MNX_VERSION = getMnxSchemaVersion()
 The MNX version for files generated by the DOM.
 

Detailed Description

object model for MNX format

See: https://w3c.github.io/mnx/docs/

Enumeration Type Documentation

◆ AccidentalEnclosureSymbol

enum class mnx::AccidentalEnclosureSymbol
strong

The types of accidental enclosure symbols.

Enumerator
Brackets 

enclose accidental in brackets

Parentheses 

enclose accidental in parentheses

◆ BarlineType

enum class mnx::BarlineType
strong

The types of barlines supported.

Enumerator
Regular 

the default (normal barline)

Dashed 

dashed barline

Dotted 

dotted barline

Double 

two thin lines together

Final 

thin line followed by thick line

Heavy 

single thick line

HeavyHeavy 

two thick lines

HeavyLight 

thick ling followed by thin line

NoBarline 

no barline (barline is invisible)

Short 

length 2 spaces centered on middle staff line.

Tick 

tick barline

◆ BeamHookDirection

enum class mnx::BeamHookDirection
strong

The types of jumps.

Enumerator
Auto 

Automatic hook direction.

Left 

Force hook left.

Right 

Force hook right.

◆ BreathMarkSymbol

enum class mnx::BreathMarkSymbol
strong

The symbols available for a breath mark.

Enumerator
Comma 

comma symbol

Tick 

tick symbol

Upbow 

upbow symbol

Salzedo 

salzedo symbol

◆ ClefSign

enum class mnx::ClefSign
strong

The values available in a clef sign object.

Enumerator
CClef 

C Clef.

FClef 

F Clef.

GClef 

G Clef.

◆ GraceType

enum class mnx::GraceType
strong

Options for how to perform grace notes.

Enumerator
StealPrevious 

steal time from the previous non-grace.

StealFollowing 

steak time from the following non-grace.

MakeTime 

add extra time for the grace note.

◆ JumpType

enum class mnx::JumpType
strong

The types of jumps.

Enumerator
DsAlFine 

D.S. al Fine.

Segno 

Dal Segno.

◆ LabelRef

enum class mnx::LabelRef
strong

The values available in a labelref.

Enumerator
Name 

the full name from the part (the default)

ShortName 

the abbreviated name from the part

◆ LayoutSymbol

enum class mnx::LayoutSymbol
strong

The symbols available to bracket a staff group.

Enumerator
NoSymbol 

the default (none)

Brace 

piano brace

Bracket 

bracket

◆ LineType

enum class mnx::LineType
strong

Specifies the visual style of a line in (specifically) slurs.

Enumerator
Solid 

A solid (unbroken) line.

Dashed 

A dashed line.

Dotted 

A dotted line.

Wavy 

A wavy line.

◆ LyricLineType

enum class mnx::LyricLineType
strong

The symbols available to bracket a staff group.

Enumerator
End 

the end of a word

Middle 

the middle of a word

Start 

the start of a word

Whole 

this lyric is a whole word

◆ MarkingUpDown

enum class mnx::MarkingUpDown
strong

The values available in an event marking "pointing" property.

Enumerator
Down 

down (default)

Up 

up

◆ NoteStep

enum class mnx::NoteStep : int
strong

The diatonic note step values.

These are maintained in order from [C..B] == [0..6] to allow correct math on them.

◆ OttavaAmount

enum class mnx::OttavaAmount : int
strong

Valid values for ottava amount.

Enumerator
OctaveDown 

8vb

TwoOctavesDown 

15mb

ThreeOctavesDown 

22mb

OctaveUp 

8va

TwoOctavesUp 

15ma

ThreeOctavesUp 

22ma

◆ OttavaAmountOrZero

enum class mnx::OttavaAmountOrZero : int
strong

Valid values for octave displacment amount, including zero for no transposition.

These values represent transposition intervals in octaves. Negative values indicate downward transposition, positive values indicate upward transposition, and zero indicates no transposition. This type may be used for clefs or other elements where octave displacement is relevant.

Enumerator
NoTransposition 

No transposition.

ThreeOctavesDown 

Transpose down three octaves.

TwoOctavesDown 

Transpose down two octaves.

OctaveDown 

Transpose down one octave.

OctaveUp 

Transpose up one octave.

TwoOctavesUp 

Transpose up two octaves.

ThreeOctavesUp 

Transpose up three octaves.

◆ SlurTieSide

enum class mnx::SlurTieSide
strong

Specifies the direction of a slur or tie.

Enumerator
Down 

curved down, the tips face up

Up 

curved up, the tips face down

◆ StaffGroupBarlineOverride

enum class mnx::StaffGroupBarlineOverride
strong

Resolved barline override setting for a layout staff group.

Note
This enum is currently an mnxdom-only helper and is not an official MNX schema enum. It models a proposed explicit override property that will replace StaffGroupBarlineStyle.
Enumerator
None 

no override

Unified 

override with unified barline

Mensurstrich 

override with mensurstrich barline

◆ StaffGroupBarlineStyle

enum class mnx::StaffGroupBarlineStyle
strong

The types of barline overrides for staff groups in layouts.

Todo:
This appears to be a misnomer, and there is an outstanding issue 495 to clarify it. Currently mnxdom treats these as override options. Of particular concern is the instrument option, which adds useless complexity in the context of staff groups.
Enumerator
Individual 

currently interpreted as no override

Instrument 

currently interpreted as no override or unified, depending on whether the group is single- or multi-instrument

Unified 

override with unified barline

Mensurstrich 

override with mensurstrich barline

◆ StemDirection

enum class mnx::StemDirection
strong

The values available in a labelref.

Enumerator
Down 

stems down (default)

Up 

stems up

◆ TieTargetType

enum class mnx::TieTargetType
strong

The values that describe the target of a tie.

Enumerator
NextNote 

The tie ends on the next adjacent note in the same voice. This is the most common case.

Arpeggio 

The tie is part of an arpeggio notated as consecutive ties.

CrossJump 

The tie crosses to a different ending or jump location.

CrossVoice 

The tie end on the next adjacent note in a different voice.