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
82{
83 Comma,
84 Tick,
85 Upbow,
86 Salzedo
87};
88
93enum class ClefSign
94{
95 CClef,
96 FClef,
97 GClef
98};
99
105{
106 Louder,
107 Softer
108};
109
112enum class DynamicValue
113{
114 f,
115 ff,
116 fff,
117 mf,
118 mp,
119 n,
120 p,
121 pp,
122 ppp
123};
124
130{
131 Decreasing,
133};
134
140{
141 Auto,
142 Long,
143 None,
144 Normal,
145 Short,
146 VeryLong,
147 VeryShort
148};
149
155{
156 Normal,
157 Angled,
158 Curlew,
160 DoubleDot,
162 HalfCurve,
163 Square
164};
165
170enum class FontStyle
171{
172 Plain,
173 Italic
174};
175
180enum class FontWeight
181{
182 Plain,
183 Bold
184};
185
190enum class GraceType
191{
194 MakeTime
195};
196
201enum class JumpType
202{
203 DsAlFine,
204 Segno
205};
206
211enum class LabelRef
212{
213 Name,
214 ShortName
215};
216
221enum class LayoutSymbol
222{
223 NoSymbol,
224 Brace,
225 Bracket
226};
227
232enum class LineType
233{
234 Solid,
235 Dashed,
236 Dotted,
237 Wavy
238};
239
245{
246 End,
247 Middle,
248 Start,
249 Whole
250};
251
257{
258 Down,
259 Up
260};
261
267{
268 Auto,
269 Down,
270 Up
271};
272
278{
279 Auto,
280 Above,
281 Below,
282 Between
283};
284
291enum class NoteStep : int
292{
293 C = 0,
294 D = 1,
295 E = 2,
296 F = 3,
297 G = 4,
298 A = 5,
299 B = 6
300};
301
307{
308 Note4096th,
309 Note2048th,
310 Note1024th,
311 Note512th,
312 Note256th,
313 Note128th,
314 Note64th,
315 Note32nd,
316 Note16th,
317 Eighth,
318 Quarter,
319 Half,
320 Whole,
321 Breve,
322 Longa,
323 Maxima,
324 DuplexMaxima
325};
326
331enum class Orientation
332{
333 Auto,
334 Above,
335 Below
336};
337
342enum class OttavaAmount : int
343{
344 OctaveDown = -1,
345 TwoOctavesDown = -2,
346 ThreeOctavesDown = -3,
347 OctaveUp = 1,
348 TwoOctavesUp = 2,
349 ThreeOctavesUp = 3
350};
351
361enum class OttavaAmountOrZero : int
362{
363 NoTransposition = 0,
364 ThreeOctavesDown = -3,
365 TwoOctavesDown = -2,
366 OctaveDown = -1,
367 OctaveUp = 1,
368 TwoOctavesUp = 2,
369 ThreeOctavesUp = 3
370};
371
376enum class SlurTieSide
377{
378 Down,
379 Up,
380};
381
390{
391 Individual,
392 Instrument,
393 Unified,
395};
396
404{
405 None,
406 Unified,
408};
409
415{
416 Down,
417 Up
418};
419
425{
426 NextNote,
427 Arpeggio,
428 CrossJump,
430};
431
436enum class TimeSignatureUnit : int
437{
438 Whole = 1,
439 Half = 2,
440 Quarter = 4,
441 Eighth = 8,
442 Value16th = 16,
443 Value32nd = 32,
444 Value64th = 64,
445 Value128th = 128
446};
447
453{
454 Inner,
455 NoNumber,
456 Both
457};
458
459} // namespace mnx
460
461#ifndef DOXYGEN_SHOULD_IGNORE_THIS
462
463namespace nlohmann {
464
465template<>
466struct adl_serializer<mnx::TimeSignatureUnit>
467{
468 template<typename BasicJsonType>
469 static mnx::TimeSignatureUnit from_json(const BasicJsonType& j)
470 { return mnx::TimeSignatureUnit(j.template get<int>()); }
471
472 template<typename BasicJsonType>
473 static void to_json(BasicJsonType& j, const mnx::TimeSignatureUnit& value)
474 { j = int(value); }
475};
476
477template<>
478struct adl_serializer<mnx::OttavaAmount>
479{
480 template<typename BasicJsonType>
481 static mnx::OttavaAmount from_json(const BasicJsonType& j)
482 { return mnx::OttavaAmount(j.template get<int>()); }
483
484 template<typename BasicJsonType>
485 static void to_json(BasicJsonType& j, const mnx::OttavaAmount& value)
486 { j = int(value); }
487};
488
489template<>
490struct adl_serializer<mnx::OttavaAmountOrZero>
491{
492 template<typename BasicJsonType>
493 static mnx::OttavaAmountOrZero from_json(const BasicJsonType& j)
494 { return mnx::OttavaAmountOrZero(j.template get<int>()); }
495
496 template<typename BasicJsonType>
497 static void to_json(BasicJsonType& j, const mnx::OttavaAmountOrZero& value)
498 { j = int(value); }
499};
500
501} // namespace nlohmann
502
503#endif // DOXYGEN_SHOULD_IGNORE_THIS
object model for MNX format
StaffGroupBarlineOverride
Resolved barline override setting for a layout staff group.
Definition Enumerations.h:404
DynamicWedgeType
The types of dynamic wedges (hairpins)
Definition Enumerations.h:130
@ Decreasing
hairpin diminuendo
@ Increasing
hairpin crescendo
JumpType
The types of jumps.
Definition Enumerations.h:202
@ Segno
Dal Segno.
@ DsAlFine
D.S. al Fine.
MarkingUpDownAuto
Specifies up or down or auto for a marking symbol.
Definition Enumerations.h:267
LineType
Specifies the visual style of a line in (specifically) slurs.
Definition Enumerations.h:233
@ Wavy
A wavy line.
@ Solid
A solid (unbroken) line.
ClefSign
The values available in a clef sign object.
Definition Enumerations.h:94
@ FClef
F Clef.
@ CClef
C Clef.
@ GClef
G Clef.
OttavaAmount
Valid values for ottava amount.
Definition Enumerations.h:343
FermataSymbol
Specifies the symbol style for the fermat.
Definition Enumerations.h:155
@ 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)
LyricLineType
The symbols available to bracket a staff group.
Definition Enumerations.h:245
@ 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
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:362
@ NoTransposition
No transposition.
DynamicRelativeValue
The possible relative changes in dynamic value.
Definition Enumerations.h:105
@ Softer
relative decrease
@ Louder
relative increase
FontWeight
Specifies the weight of text glyphs.
Definition Enumerations.h:181
@ 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:278
@ 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:425
@ 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:82
@ Comma
comma symbol
@ Salzedo
salzedo symbol
@ Upbow
upbow symbol
LayoutSymbol
The symbols available to bracket a staff group.
Definition Enumerations.h:222
@ NoSymbol
the default (none)
@ Brace
piano brace
NoteStep
The diatonic note step values.
Definition Enumerations.h:292
SlurTieSide
Specifies the direction of a slur or tie.
Definition Enumerations.h:377
TupletDisplaySetting
Controls display of a tuplet's number or note value.
Definition Enumerations.h:453
TimeSignatureUnit
Valid units for the lower numbers of time signatures.
Definition Enumerations.h:437
LabelRef
The values available in a labelref.
Definition Enumerations.h:212
@ 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:171
@ 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:140
@ VeryShort
very short fermata
@ None
playback should ignore fermata
@ Long
long fermata
@ Normal
normal length fermata
@ VeryLong
very long fermata
GraceType
Options for how to perform grace notes.
Definition Enumerations.h:191
@ 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:415
StaffGroupBarlineStyle
The types of barline overrides for staff groups in layouts.
Definition Enumerations.h:390
@ 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:307
MarkingUpDown
Specifies up or down for a marking symbol.
Definition Enumerations.h:257
Orientation
Specifies the vertical visual orientation of a glyph with respect to its corresponding notation.
Definition Enumerations.h:332