MNX Document Model
Loading...
Searching...
No Matches
Enumerations.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
24namespace mnx {
25
35
40enum class AutoYesNo
41{
42 Auto,
43 Yes,
44 No
45};
46
51enum class BarlineType
52{
53 Regular,
54 Dashed,
55 Dotted,
56 Double,
57 Final,
58 Heavy,
61 NoBarline,
62 Short,
63 Tick
64};
65
71{
72 Auto,
73 Left,
74 Right
75};
76
83{
84 Auto,
85 Comma,
86 Tick,
87 Upbow,
88 Salzedo
89};
90
95enum class ClefSign
96{
97 CClef,
98 FClef,
99 GClef
100};
101
105{
106 None,
107 r,
108 s,
109};
110
114{
115 Louder,
116 Softer
117};
118
122{
123 None,
124 z
125};
126
129enum class DynamicValue
130{
131 f,
132 ff,
133 fff,
134 ffff,
135 fffff,
136 ffffff,
137 mf,
138 mp,
139 n,
140 p,
141 pp,
142 ppp,
143 pppp,
144 ppppp,
145 pppppp,
146};
147
153{
154 Decreasing,
156};
157
163{
164 Auto,
165 Long,
166 None,
167 Normal,
168 Short,
169 VeryLong,
170 VeryShort
171};
172
178{
179 Normal,
180 Angled,
181 Curlew,
183 DoubleDot,
185 HalfCurve,
186 Square
187};
188
193enum class FontStyle
194{
195 Plain,
196 Italic
197};
198
203enum class FontWeight
204{
205 Plain,
206 Bold
207};
208
213enum class GraceType
214{
217 MakeTime
218};
219
224enum class JumpType
225{
226 DsAlFine,
227 Segno
228};
229
234enum class LabelRef
235{
236 Name,
237 ShortName
238};
239
244enum class LayoutSymbol
245{
246 NoSymbol,
247 Brace,
248 Bracket
249};
250
255enum class LineType
256{
257 Solid,
258 Dashed,
259 Dotted,
260 Wavy
261};
262
268{
269 End,
270 Middle,
271 Start,
272 Whole
273};
274
280{
281 Down,
282 Up
283};
284
290{
291 Auto,
292 Down,
293 Up
294};
295
301{
302 Auto,
303 Above,
304 Below,
305 Between
306};
307
314enum class NoteStep : int
315{
316 C = 0,
317 D = 1,
318 E = 2,
319 F = 3,
320 G = 4,
321 A = 5,
322 B = 6
323};
324
330{
331 Note4096th,
332 Note2048th,
333 Note1024th,
334 Note512th,
335 Note256th,
336 Note128th,
337 Note64th,
338 Note32nd,
339 Note16th,
340 Eighth,
341 Quarter,
342 Half,
343 Whole,
344 Breve,
345 Longa,
346 Maxima,
347 DuplexMaxima
348};
349
354enum class Orientation
355{
356 Auto,
357 Above,
358 Below
359};
360
365enum class OttavaAmount : int
366{
367 OctaveDown = -1,
368 TwoOctavesDown = -2,
369 ThreeOctavesDown = -3,
370 OctaveUp = 1,
371 TwoOctavesUp = 2,
372 ThreeOctavesUp = 3
373};
374
384enum class OttavaAmountOrZero : int
385{
386 NoTransposition = 0,
387 ThreeOctavesDown = -3,
388 TwoOctavesDown = -2,
389 OctaveDown = -1,
390 OctaveUp = 1,
391 TwoOctavesUp = 2,
392 ThreeOctavesUp = 3
393};
394
399enum class SlurTieSide
400{
401 Down,
402 Up,
403};
404
413{
414 Individual,
415 Instrument,
416 Unified,
418};
419
427{
428 None,
429 Unified,
431};
432
438{
439 Down,
440 Up
441};
442
448{
449 NextNote,
450 Arpeggio,
451 CrossJump,
453};
454
459enum class TimeSignatureUnit : int
460{
461 Whole = 1,
462 Half = 2,
463 Quarter = 4,
464 Eighth = 8,
465 Value16th = 16,
466 Value32nd = 32,
467 Value64th = 64,
468 Value128th = 128
469};
470
476{
477 Common,
478 Cut
479};
480
486{
487 Inner,
488 NoNumber,
489 Both
490};
491
492} // namespace mnx
493
494#ifndef DOXYGEN_SHOULD_IGNORE_THIS
495
496namespace nlohmann {
497
498template<>
499struct adl_serializer<mnx::TimeSignatureUnit>
500{
501 template<typename BasicJsonType>
502 static mnx::TimeSignatureUnit from_json(const BasicJsonType& j)
503 { return mnx::TimeSignatureUnit(j.template get<int>()); }
504
505 template<typename BasicJsonType>
506 static void to_json(BasicJsonType& j, const mnx::TimeSignatureUnit& value)
507 { j = int(value); }
508};
509
510template<>
511struct adl_serializer<mnx::OttavaAmount>
512{
513 template<typename BasicJsonType>
514 static mnx::OttavaAmount from_json(const BasicJsonType& j)
515 { return mnx::OttavaAmount(j.template get<int>()); }
516
517 template<typename BasicJsonType>
518 static void to_json(BasicJsonType& j, const mnx::OttavaAmount& value)
519 { j = int(value); }
520};
521
522template<>
523struct adl_serializer<mnx::OttavaAmountOrZero>
524{
525 template<typename BasicJsonType>
526 static mnx::OttavaAmountOrZero from_json(const BasicJsonType& j)
527 { return mnx::OttavaAmountOrZero(j.template get<int>()); }
528
529 template<typename BasicJsonType>
530 static void to_json(BasicJsonType& j, const mnx::OttavaAmountOrZero& value)
531 { j = int(value); }
532};
533
534} // namespace nlohmann
535
536#endif // DOXYGEN_SHOULD_IGNORE_THIS
object model for MNX format
StaffGroupBarlineOverride
Resolved barline override setting for a layout staff group.
Definition Enumerations.h:427
DynamicWedgeType
The types of dynamic wedges (hairpins)
Definition Enumerations.h:153
@ Decreasing
hairpin diminuendo
@ Increasing
hairpin crescendo
TimeSignatureDisplay
Encodes visual glyphs for a time signature.
Definition Enumerations.h:476
@ Common
Use common time glyph instead of numbers.
@ Cut
Use cut time glyph instead of numbers.
JumpType
The types of jumps.
Definition Enumerations.h:225
@ Segno
Dal Segno.
@ DsAlFine
D.S. al Fine.
MarkingUpDownAuto
Specifies up or down or auto for a marking symbol.
Definition Enumerations.h:290
LineType
Specifies the visual style of a line in (specifically) slurs.
Definition Enumerations.h:256
@ Wavy
A wavy line.
@ Solid
A solid (unbroken) line.
ClefSign
The values available in a clef sign object.
Definition Enumerations.h:96
@ FClef
F Clef.
@ CClef
C Clef.
@ GClef
G Clef.
OttavaAmount
Valid values for ottava amount.
Definition Enumerations.h:366
FermataSymbol
Specifies the symbol style for the fermat.
Definition Enumerations.h:178
@ DoubleDot
curved fermata symbol with two dots (used by Henze to denote long duration)
@ HalfCurve
half-curve fermata symbol (used by Henze to denote short duration)
@ DoubleSquare
double-square fermata symbol (often used to denote very long duration)
@ DoubleAngled
double-angled fermata symbol (often used to denote very short duration)
@ Square
square fermata symbol (often used to denote long duration)
@ Angled
angled fermata symbol (often used to denote short duration)
@ Curlew
double-curve (used by Britten in Curlew River to denote holding until a synchronization point)
DynamicPrefix
Definition Enumerations.h:105
@ s
"s-" as in sforzando (sf)
@ r
"rin-" as in rinforzando (rf)
@ None
empty string
LyricLineType
The symbols available to bracket a staff group.
Definition Enumerations.h:268
@ End
the end of a word
@ Start
the start of a word
@ Middle
the middle of a word
@ Whole
this lyric is a whole word
DynamicSuffix
Definition Enumerations.h:122
@ z
"-zato" as in forzato (fz)
AccidentalEnclosureSymbol
The types of accidental enclosure symbols.
Definition Enumerations.h:31
@ Brackets
enclose accidental in brackets
@ Parentheses
enclose accidental in parentheses
OttavaAmountOrZero
Valid values for octave displacment amount, including zero for no transposition.
Definition Enumerations.h:385
@ NoTransposition
No transposition.
DynamicRelativeValue
The possible relative changes in dynamic value.
Definition Enumerations.h:114
@ Softer
relative decrease
@ Louder
relative increase
FontWeight
Specifies the weight of text glyphs.
Definition Enumerations.h:204
@ Bold
bold text
AutoYesNo
3-state choice enum
Definition Enumerations.h:41
MultiStaffOrientation
Specifies the vertical visual orientation of a symbol with respect to its part's staves.
Definition Enumerations.h:301
@ Above
symbol should be above its part staves
@ Between
symbol should be between its part staves
@ Below
symbol should be below its part staves
TieTargetType
The values that describe the target of a tie.
Definition Enumerations.h:448
@ CrossVoice
The tie end on the next adjacent note in a different voice.
@ CrossJump
The tie crosses to a different ending or jump location.
@ 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.
BreathMarkSymbol
The symbols available for a breath mark.
Definition Enumerations.h:83
@ Comma
comma symbol
@ Salzedo
salzedo symbol
@ Upbow
upbow symbol
LayoutSymbol
The symbols available to bracket a staff group.
Definition Enumerations.h:245
@ NoSymbol
the default (none)
@ Brace
piano brace
NoteStep
The diatonic note step values.
Definition Enumerations.h:315
SlurTieSide
Specifies the direction of a slur or tie.
Definition Enumerations.h:400
TupletDisplaySetting
Controls display of a tuplet's number or note value.
Definition Enumerations.h:486
TimeSignatureUnit
Valid units for the lower numbers of time signatures.
Definition Enumerations.h:460
LabelRef
The values available in a labelref.
Definition Enumerations.h:235
@ Name
the full name from the part (the default)
@ ShortName
the abbreviated name from the part
FontStyle
Specifies the style of text glyphs.
Definition Enumerations.h:194
@ Italic
italic text
@ Plain
plain (non-italic) text
BeamHookDirection
The types of jumps.
Definition Enumerations.h:71
@ Right
Force hook right.
@ Left
Force hook left.
FermataDuration
Specifies the subjective playback duration of a fermata.
Definition Enumerations.h:163
@ VeryShort
very short fermata
@ Long
long fermata
@ Normal
normal length fermata
@ VeryLong
very long fermata
GraceType
Options for how to perform grace notes.
Definition Enumerations.h:214
@ StealPrevious
steal time from the previous non-grace.
@ StealFollowing
steak time from the following non-grace.
@ MakeTime
add extra time for the grace note.
StemDirection
The values available in a labelref.
Definition Enumerations.h:438
StaffGroupBarlineStyle
The types of barline overrides for staff groups in layouts.
Definition Enumerations.h:413
@ Unified
override with unified barline
@ Individual
currently interpreted as no override
@ Instrument
currently interpreted as no override or unified, depending on whether the group is single- or multi-i...
@ Mensurstrich
override with mensurstrich barline
BarlineType
The types of barlines supported.
Definition Enumerations.h:52
@ NoBarline
no barline (barline is invisible)
@ Tick
tick barline
@ Short
length 2 spaces centered on middle staff line.
@ Dotted
dotted barline
@ HeavyLight
thick ling followed by thin line
@ Final
thin line followed by thick line
@ Regular
the default (normal barline)
@ Double
two thin lines together
@ HeavyHeavy
two thick lines
@ Dashed
dashed barline
@ Heavy
single thick line
NoteValueBase
The note values allowed in MNX.
Definition Enumerations.h:330
MarkingUpDown
Specifies up or down for a marking symbol.
Definition Enumerations.h:280
Orientation
Specifies the vertical visual orientation of a glyph with respect to its corresponding notation.
Definition Enumerations.h:355