smoosic 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/smoosic.js +1 -1
- package/package.json +1 -1
- package/release/smoosic.js +1 -1
- package/release/styles/ribbon.css +5 -10
- package/src/application/exports.ts +1 -0
- package/src/styles/ribbon.css +5 -10
- package/types/src/application/application.d.ts +102 -102
- package/types/src/application/common.d.ts +74 -74
- package/types/src/application/configuration.d.ts +74 -74
- package/types/src/application/dom.d.ts +8 -8
- package/types/src/application/dynamicInit.d.ts +1 -1
- package/types/src/application/eventHandler.d.ts +78 -78
- package/types/src/application/exports.d.ts +494 -493
- package/types/src/application/generateVexTests.d.ts +10 -10
- package/types/src/application/keyCommands.d.ts +90 -90
- package/types/src/common/bootstrap.bundle.d.ts +1138 -1138
- package/types/src/common/htmlHelpers.d.ts +105 -105
- package/types/src/common/jszip.d.ts +2 -2
- package/types/src/common/midi-parser.d.ts +38 -38
- package/types/src/common/promiseHelpers.d.ts +30 -30
- package/types/src/common/serializationHelpers.d.ts +29 -29
- package/types/src/common/textformatter.d.ts +140 -140
- package/types/src/common/vex.d.ts +222 -222
- package/types/src/render/audio/musicCursor.d.ts +25 -25
- package/types/src/render/audio/oscillator.d.ts +98 -98
- package/types/src/render/audio/player.d.ts +141 -141
- package/types/src/render/audio/samples.d.ts +56 -56
- package/types/src/render/sui/configuration.d.ts +12 -12
- package/types/src/render/sui/formatter.d.ts +151 -151
- package/types/src/render/sui/layoutDebug.d.ts +43 -43
- package/types/src/render/sui/mapper.d.ts +116 -116
- package/types/src/render/sui/piano.d.ts +46 -46
- package/types/src/render/sui/renderState.d.ts +88 -88
- package/types/src/render/sui/scoreRender.d.ts +93 -93
- package/types/src/render/sui/scoreView.d.ts +267 -267
- package/types/src/render/sui/scoreViewOperations.d.ts +594 -594
- package/types/src/render/sui/scroller.d.ts +34 -34
- package/types/src/render/sui/svgHelpers.d.ts +85 -85
- package/types/src/render/sui/svgPageMap.d.ts +318 -318
- package/types/src/render/sui/textEdit.d.ts +310 -310
- package/types/src/render/sui/textRender.d.ts +189 -189
- package/types/src/render/sui/tracker.d.ts +90 -90
- package/types/src/render/vex/glyphDimensions.d.ts +23 -23
- package/types/src/render/vex/smoAdapter.d.ts +46 -46
- package/types/src/render/vex/toVex.d.ts +13 -13
- package/types/src/render/vex/vxMeasure.d.ts +95 -95
- package/types/src/render/vex/vxNote.d.ts +55 -55
- package/types/src/render/vex/vxSystem.d.ts +64 -64
- package/types/src/smo/data/common.d.ts +220 -220
- package/types/src/smo/data/measure.d.ts +510 -510
- package/types/src/smo/data/measureModifiers.d.ts +506 -506
- package/types/src/smo/data/music.d.ts +438 -438
- package/types/src/smo/data/note.d.ts +485 -485
- package/types/src/smo/data/noteModifiers.d.ts +590 -590
- package/types/src/smo/data/partInfo.d.ts +162 -162
- package/types/src/smo/data/score.d.ts +395 -395
- package/types/src/smo/data/scoreModifiers.d.ts +433 -433
- package/types/src/smo/data/scoreText.d.ts +277 -277
- package/types/src/smo/data/staffModifiers.d.ts +767 -767
- package/types/src/smo/data/systemStaff.d.ts +238 -238
- package/types/src/smo/data/tuplet.d.ts +146 -146
- package/types/src/smo/midi/midiToSmo.d.ts +198 -198
- package/types/src/smo/midi/smoToMidi.d.ts +23 -23
- package/types/src/smo/mxml/smoToXml.d.ts +165 -165
- package/types/src/smo/mxml/xmlHelpers.d.ts +140 -140
- package/types/src/smo/mxml/xmlState.d.ts +257 -257
- package/types/src/smo/mxml/xmlToSmo.d.ts +92 -92
- package/types/src/smo/xform/beamers.d.ts +46 -46
- package/types/src/smo/xform/copypaste.d.ts +99 -99
- package/types/src/smo/xform/operations.d.ts +127 -127
- package/types/src/smo/xform/roadmap.d.ts +70 -70
- package/types/src/smo/xform/selections.d.ts +153 -153
- package/types/src/smo/xform/tickDuration.d.ts +155 -155
- package/types/src/smo/xform/tickMap.d.ts +34 -34
- package/types/src/smo/xform/undo.d.ts +142 -142
- package/types/src/smo/xform/updateAudio.d.ts +9 -9
- package/types/src/styles/font_metrics/Commissioner-Medium-Metrics.d.ts +871 -871
- package/types/src/styles/font_metrics/ConcertOne-Regular.d.ts +871 -871
- package/types/src/styles/font_metrics/Merriweather-Regular.d.ts +871 -871
- package/types/src/styles/font_metrics/arial_metrics.d.ts +870 -870
- package/types/src/styles/font_metrics/ssp-sans-metrics.d.ts +871 -871
- package/types/src/styles/font_metrics/ssp-serif-metrics.d.ts +871 -871
- package/types/src/styles/font_metrics/times_metrics.d.ts +870 -870
- package/types/src/ui/buttons/button.d.ts +95 -95
- package/types/src/ui/buttons/collapsable.d.ts +42 -42
- package/types/src/ui/buttons/display.d.ts +23 -23
- package/types/src/ui/buttons/ribbon.d.ts +76 -76
- package/types/src/ui/common.d.ts +45 -45
- package/types/src/ui/composable/draggable.d.ts +12 -12
- package/types/src/ui/configuration.d.ts +31 -31
- package/types/src/ui/dialogs/adapter.d.ts +107 -107
- package/types/src/ui/dialogs/addMeasure.d.ts +20 -20
- package/types/src/ui/dialogs/arpeggio.d.ts +2 -2
- package/types/src/ui/dialogs/articulation.d.ts +2 -2
- package/types/src/ui/dialogs/audioSettings.d.ts +32 -32
- package/types/src/ui/dialogs/chordChange.d.ts +35 -35
- package/types/src/ui/dialogs/clefChange.d.ts +2 -2
- package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
- package/types/src/ui/dialogs/components/button.d.ts +54 -54
- package/types/src/ui/dialogs/components/buttonArray.d.ts +101 -101
- package/types/src/ui/dialogs/components/checkdrop.d.ts +27 -27
- package/types/src/ui/dialogs/components/dragText.d.ts +27 -27
- package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
- package/types/src/ui/dialogs/components/fileDownload.d.ts +28 -28
- package/types/src/ui/dialogs/components/fontComponent.d.ts +32 -32
- package/types/src/ui/dialogs/components/noteText.d.ts +98 -98
- package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
- package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
- package/types/src/ui/dialogs/components/staffComponents.d.ts +77 -77
- package/types/src/ui/dialogs/components/textCheck.d.ts +38 -38
- package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
- package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
- package/types/src/ui/dialogs/components/tie.d.ts +41 -41
- package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
- package/types/src/ui/dialogs/components/tree.d.ts +46 -46
- package/types/src/ui/dialogs/customTuplets.d.ts +25 -25
- package/types/src/ui/dialogs/dialog.d.ts +201 -201
- package/types/src/ui/dialogs/durations.d.ts +2 -2
- package/types/src/ui/dialogs/dynamics.d.ts +37 -37
- package/types/src/ui/dialogs/endings.d.ts +61 -61
- package/types/src/ui/dialogs/factory.d.ts +15 -15
- package/types/src/ui/dialogs/fileDialogs.d.ts +4 -4
- package/types/src/ui/dialogs/fonts.d.ts +2 -2
- package/types/src/ui/dialogs/globalLayout.d.ts +2 -2
- package/types/src/ui/dialogs/gracenote.d.ts +2 -2
- package/types/src/ui/dialogs/hairpin.d.ts +35 -35
- package/types/src/ui/dialogs/instrument.d.ts +3 -3
- package/types/src/ui/dialogs/keySignature.d.ts +33 -33
- package/types/src/ui/dialogs/library.d.ts +70 -70
- package/types/src/ui/dialogs/lyric.d.ts +39 -39
- package/types/src/ui/dialogs/measureFormat.d.ts +52 -52
- package/types/src/ui/dialogs/microtones.d.ts +2 -2
- package/types/src/ui/dialogs/noteHead.d.ts +2 -2
- package/types/src/ui/dialogs/ornament.d.ts +2 -2
- package/types/src/ui/dialogs/pageLayout.d.ts +2 -2
- package/types/src/ui/dialogs/partInfo.d.ts +2 -2
- package/types/src/ui/dialogs/pedalMarking.d.ts +35 -35
- package/types/src/ui/dialogs/pitch.d.ts +2 -2
- package/types/src/ui/dialogs/preferences.d.ts +2 -2
- package/types/src/ui/dialogs/scoreId.d.ts +2 -2
- package/types/src/ui/dialogs/scoreView.d.ts +2 -2
- package/types/src/ui/dialogs/slur.d.ts +57 -57
- package/types/src/ui/dialogs/staffGroup.d.ts +2 -2
- package/types/src/ui/dialogs/tabNote.d.ts +32 -32
- package/types/src/ui/dialogs/tabStave.d.ts +43 -43
- package/types/src/ui/dialogs/tempo.d.ts +50 -50
- package/types/src/ui/dialogs/textBlock.d.ts +61 -61
- package/types/src/ui/dialogs/textBracket.d.ts +35 -35
- package/types/src/ui/dialogs/tie.d.ts +41 -41
- package/types/src/ui/dialogs/timeSignature.d.ts +34 -34
- package/types/src/ui/dialogs/transposeScore.d.ts +2 -2
- package/types/src/ui/dialogs/volta.d.ts +40 -40
- package/types/src/ui/eventSource.d.ts +63 -63
- package/types/src/ui/exceptions.d.ts +12 -12
- package/types/src/ui/fileio/fileInput.d.ts +12 -12
- package/types/src/ui/fileio/library.d.ts +40 -40
- package/types/src/ui/fileio/xhrLoader.d.ts +18 -18
- package/types/src/ui/help.d.ts +22 -22
- package/types/src/ui/i18n/language.d.ts +37 -37
- package/types/src/ui/i18n/language_ar.d.ts +5 -5
- package/types/src/ui/i18n/language_de.d.ts +1 -1
- package/types/src/ui/i18n/language_en.d.ts +18 -18
- package/types/src/ui/i18n/translationEditor.d.ts +14 -14
- package/types/src/ui/keyBindings/default/editorKeys.d.ts +7 -7
- package/types/src/ui/keyBindings/default/trackerKeys.d.ts +7 -7
- package/types/src/ui/menus/beams.d.ts +13 -13
- package/types/src/ui/menus/edit.d.ts +8 -8
- package/types/src/ui/menus/file.d.ts +26 -26
- package/types/src/ui/menus/help.d.ts +8 -8
- package/types/src/ui/menus/keySignature.d.ts +13 -13
- package/types/src/ui/menus/language.d.ts +12 -12
- package/types/src/ui/menus/manager.d.ts +57 -57
- package/types/src/ui/menus/measure.d.ts +8 -8
- package/types/src/ui/menus/menu.d.ts +136 -136
- package/types/src/ui/menus/note.d.ts +8 -8
- package/types/src/ui/menus/partSelection.d.ts +19 -19
- package/types/src/ui/menus/parts.d.ts +50 -50
- package/types/src/ui/menus/score.d.ts +20 -20
- package/types/src/ui/menus/staffModifier.d.ts +21 -21
- package/types/src/ui/menus/text.d.ts +8 -8
- package/types/src/ui/menus/timeSignature.d.ts +12 -12
- package/types/src/ui/menus/tuplets.d.ts +13 -13
- package/types/src/ui/menus/voices.d.ts +8 -8
- package/types/src/ui/modalDialogs.d.ts +1 -1
- package/types/src/ui/navigation.d.ts +15 -15
- package/types/src/ui/qwerty.d.ts +41 -41
- package/types/src/ui/ribbonLayout/default/defaultRibbon.d.ts +15 -15
- package/types/src/ui/ribbonLayout/default/tabletRibbon.d.ts +22 -22
- package/types/typedoc.d.ts +158 -158
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
import { Pitch } from '../data/common';
|
|
2
|
-
import { SmoNote } from '../data/note';
|
|
3
|
-
import { SmoMeasure, SmoVoice } from '../data/measure';
|
|
4
|
-
import { SmoSystemStaff } from '../data/systemStaff';
|
|
5
|
-
import { SmoScore } from '../data/score';
|
|
6
|
-
import { TimeSignature } from '../data/measureModifiers';
|
|
7
|
-
import { SmoSelector } from '../xform/selections';
|
|
8
|
-
import { SmoTempoText } from '../data/measureModifiers';
|
|
9
|
-
/**
|
|
10
|
-
* @category serialization
|
|
11
|
-
*/
|
|
12
|
-
export interface SlurXml {
|
|
13
|
-
startSelector: SmoSelector;
|
|
14
|
-
endSelector: SmoSelector;
|
|
15
|
-
number: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Keep state of the xml document as we are generating it
|
|
19
|
-
* @category serialization
|
|
20
|
-
*/
|
|
21
|
-
export interface SmoState {
|
|
22
|
-
divisions: number;
|
|
23
|
-
measureNumber: number;
|
|
24
|
-
measureIndex: number;
|
|
25
|
-
transposeOffset: number;
|
|
26
|
-
tickCount: number;
|
|
27
|
-
voiceIndex: number;
|
|
28
|
-
keySignature: string;
|
|
29
|
-
voiceTickIndex: number;
|
|
30
|
-
voice?: SmoVoice;
|
|
31
|
-
partStaves: SmoSystemStaff[];
|
|
32
|
-
staffPartIx: number;
|
|
33
|
-
slurs: SlurXml[];
|
|
34
|
-
ties: SlurXml[];
|
|
35
|
-
tieds: SlurXml[];
|
|
36
|
-
lyricState: Record<number, string>;
|
|
37
|
-
measureTicks: number;
|
|
38
|
-
note?: SmoNote;
|
|
39
|
-
beamState: number;
|
|
40
|
-
beamTicks: number;
|
|
41
|
-
timeSignature?: TimeSignature;
|
|
42
|
-
tempo?: SmoTempoText;
|
|
43
|
-
currentTupletLevel: number;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Convert {@link SmoScore} object into a music XML serialization
|
|
47
|
-
*
|
|
48
|
-
* usage: `xdoc: XmlDocument = SmoToXml.convert(score)`
|
|
49
|
-
* @category serialization
|
|
50
|
-
*/
|
|
51
|
-
export declare class SmoToXml {
|
|
52
|
-
static get beamStates(): Record<string, number>;
|
|
53
|
-
static get defaultState(): SmoState;
|
|
54
|
-
/**
|
|
55
|
-
* see usage
|
|
56
|
-
* @param score
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
static convert(score: SmoScore): XMLDocument;
|
|
60
|
-
/**
|
|
61
|
-
* /score-partwise/part/measure
|
|
62
|
-
* @param measureElement
|
|
63
|
-
* @param smoState
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
static measure(measureElement: Element, smoState: SmoState): void;
|
|
67
|
-
/**
|
|
68
|
-
* /score-partwise/part/measure/barline
|
|
69
|
-
* @param measureElement
|
|
70
|
-
* @param smoState
|
|
71
|
-
* @param start
|
|
72
|
-
*/
|
|
73
|
-
static barline(measureElement: Element, smoState: SmoState, start: boolean): void;
|
|
74
|
-
/**
|
|
75
|
-
* /score-partwise/part/measure/note/tie
|
|
76
|
-
* @param notationsElement
|
|
77
|
-
* @param smoState
|
|
78
|
-
*/
|
|
79
|
-
static tied(notationsElement: Element, smoState: SmoState): void;
|
|
80
|
-
/**
|
|
81
|
-
* /score-partwise/part/measure/note/tie
|
|
82
|
-
* @param noteElement
|
|
83
|
-
* @param smoState
|
|
84
|
-
*/
|
|
85
|
-
static tie(noteElement: Element, smoState: SmoState): void;
|
|
86
|
-
/**
|
|
87
|
-
* /score-partwise/part/measure/note/notations/slur
|
|
88
|
-
* @param notationsElement
|
|
89
|
-
* @param smoState
|
|
90
|
-
*/
|
|
91
|
-
static slur(notationsElement: Element, smoState: SmoState): void;
|
|
92
|
-
/**
|
|
93
|
-
* /score-partwise/measure/note/time-modification
|
|
94
|
-
* /score-partwise/measure/note/tuplet
|
|
95
|
-
*/
|
|
96
|
-
static tupletTime(noteElement: Element, note: SmoNote, measure: SmoMeasure, smoState: SmoState): void;
|
|
97
|
-
static tupletNotation(notationsElement: Element, note: SmoNote, measure: SmoMeasure, smoState: SmoState): void;
|
|
98
|
-
/**
|
|
99
|
-
* /score-partwise/measure/note/pitch
|
|
100
|
-
* @param pitch
|
|
101
|
-
* @param noteElement
|
|
102
|
-
*/
|
|
103
|
-
static pitch(pitch: Pitch, noteElement: Element): void;
|
|
104
|
-
/**
|
|
105
|
-
* /score-partwise/measure/beam
|
|
106
|
-
* @param noteElement
|
|
107
|
-
* @param smoState
|
|
108
|
-
* @returns
|
|
109
|
-
*/
|
|
110
|
-
static beamNote(noteElement: Element, smoState: SmoState): void;
|
|
111
|
-
/**
|
|
112
|
-
* /score-partwise/measure/direction/direction-type
|
|
113
|
-
* @param measureElement
|
|
114
|
-
* @param smoState
|
|
115
|
-
* @param beforeNote
|
|
116
|
-
*/
|
|
117
|
-
static direction(measureElement: Element, smoState: SmoState, beforeNote: boolean): void;
|
|
118
|
-
/**
|
|
119
|
-
* /score-partwise/measure/note/lyric
|
|
120
|
-
* @param noteElement
|
|
121
|
-
* @param smoState
|
|
122
|
-
*/
|
|
123
|
-
static lyric(noteElement: Element, smoState: SmoState): void;
|
|
124
|
-
/**
|
|
125
|
-
* /score-partwise/measure/note
|
|
126
|
-
* @param measureElement
|
|
127
|
-
* @param smoState
|
|
128
|
-
*/
|
|
129
|
-
static note(measureElement: Element, measure: SmoMeasure, note: SmoNote, smoState: SmoState): void;
|
|
130
|
-
/**
|
|
131
|
-
* /score-partwise/measure/attributes/key
|
|
132
|
-
* @param attributesElement
|
|
133
|
-
* @param smoState
|
|
134
|
-
* @returns
|
|
135
|
-
*/
|
|
136
|
-
static key(attributesElement: Element, measure: SmoMeasure, smoState: SmoState): void;
|
|
137
|
-
/**
|
|
138
|
-
* /score-partwise/part/measure/attributes/time
|
|
139
|
-
* @param attributesElement
|
|
140
|
-
* @param smoState
|
|
141
|
-
* @returns
|
|
142
|
-
*/
|
|
143
|
-
static time(attributesElement: Element, smoState: SmoState): void;
|
|
144
|
-
/**
|
|
145
|
-
* /score-partwise/part/measure/attributes/clef
|
|
146
|
-
* @param attributesElement
|
|
147
|
-
* @param smoState
|
|
148
|
-
* @returns
|
|
149
|
-
*/
|
|
150
|
-
static clef(attributesElement: Element, smoState: SmoState): void;
|
|
151
|
-
/**
|
|
152
|
-
* /score-partwise/part/measure/attributes
|
|
153
|
-
* @param measureElement
|
|
154
|
-
* @param smoState
|
|
155
|
-
*/
|
|
156
|
-
static attributes(measureElement: Element, measure: SmoMeasure, smoState: SmoState): void;
|
|
157
|
-
static staves(attributesElement: Element, smoState: SmoState): void;
|
|
158
|
-
/**
|
|
159
|
-
* /score-partwise/part/measure/attributes/transpose
|
|
160
|
-
* @param attributesElement
|
|
161
|
-
* @param smoState
|
|
162
|
-
* @returns
|
|
163
|
-
*/
|
|
164
|
-
static transpose(attributesElement: Element, smoState: SmoState): void;
|
|
165
|
-
}
|
|
1
|
+
import { Pitch } from '../data/common';
|
|
2
|
+
import { SmoNote } from '../data/note';
|
|
3
|
+
import { SmoMeasure, SmoVoice } from '../data/measure';
|
|
4
|
+
import { SmoSystemStaff } from '../data/systemStaff';
|
|
5
|
+
import { SmoScore } from '../data/score';
|
|
6
|
+
import { TimeSignature } from '../data/measureModifiers';
|
|
7
|
+
import { SmoSelector } from '../xform/selections';
|
|
8
|
+
import { SmoTempoText } from '../data/measureModifiers';
|
|
9
|
+
/**
|
|
10
|
+
* @category serialization
|
|
11
|
+
*/
|
|
12
|
+
export interface SlurXml {
|
|
13
|
+
startSelector: SmoSelector;
|
|
14
|
+
endSelector: SmoSelector;
|
|
15
|
+
number: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Keep state of the xml document as we are generating it
|
|
19
|
+
* @category serialization
|
|
20
|
+
*/
|
|
21
|
+
export interface SmoState {
|
|
22
|
+
divisions: number;
|
|
23
|
+
measureNumber: number;
|
|
24
|
+
measureIndex: number;
|
|
25
|
+
transposeOffset: number;
|
|
26
|
+
tickCount: number;
|
|
27
|
+
voiceIndex: number;
|
|
28
|
+
keySignature: string;
|
|
29
|
+
voiceTickIndex: number;
|
|
30
|
+
voice?: SmoVoice;
|
|
31
|
+
partStaves: SmoSystemStaff[];
|
|
32
|
+
staffPartIx: number;
|
|
33
|
+
slurs: SlurXml[];
|
|
34
|
+
ties: SlurXml[];
|
|
35
|
+
tieds: SlurXml[];
|
|
36
|
+
lyricState: Record<number, string>;
|
|
37
|
+
measureTicks: number;
|
|
38
|
+
note?: SmoNote;
|
|
39
|
+
beamState: number;
|
|
40
|
+
beamTicks: number;
|
|
41
|
+
timeSignature?: TimeSignature;
|
|
42
|
+
tempo?: SmoTempoText;
|
|
43
|
+
currentTupletLevel: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Convert {@link SmoScore} object into a music XML serialization
|
|
47
|
+
*
|
|
48
|
+
* usage: `xdoc: XmlDocument = SmoToXml.convert(score)`
|
|
49
|
+
* @category serialization
|
|
50
|
+
*/
|
|
51
|
+
export declare class SmoToXml {
|
|
52
|
+
static get beamStates(): Record<string, number>;
|
|
53
|
+
static get defaultState(): SmoState;
|
|
54
|
+
/**
|
|
55
|
+
* see usage
|
|
56
|
+
* @param score
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
static convert(score: SmoScore): XMLDocument;
|
|
60
|
+
/**
|
|
61
|
+
* /score-partwise/part/measure
|
|
62
|
+
* @param measureElement
|
|
63
|
+
* @param smoState
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
static measure(measureElement: Element, smoState: SmoState): void;
|
|
67
|
+
/**
|
|
68
|
+
* /score-partwise/part/measure/barline
|
|
69
|
+
* @param measureElement
|
|
70
|
+
* @param smoState
|
|
71
|
+
* @param start
|
|
72
|
+
*/
|
|
73
|
+
static barline(measureElement: Element, smoState: SmoState, start: boolean): void;
|
|
74
|
+
/**
|
|
75
|
+
* /score-partwise/part/measure/note/tie
|
|
76
|
+
* @param notationsElement
|
|
77
|
+
* @param smoState
|
|
78
|
+
*/
|
|
79
|
+
static tied(notationsElement: Element, smoState: SmoState): void;
|
|
80
|
+
/**
|
|
81
|
+
* /score-partwise/part/measure/note/tie
|
|
82
|
+
* @param noteElement
|
|
83
|
+
* @param smoState
|
|
84
|
+
*/
|
|
85
|
+
static tie(noteElement: Element, smoState: SmoState): void;
|
|
86
|
+
/**
|
|
87
|
+
* /score-partwise/part/measure/note/notations/slur
|
|
88
|
+
* @param notationsElement
|
|
89
|
+
* @param smoState
|
|
90
|
+
*/
|
|
91
|
+
static slur(notationsElement: Element, smoState: SmoState): void;
|
|
92
|
+
/**
|
|
93
|
+
* /score-partwise/measure/note/time-modification
|
|
94
|
+
* /score-partwise/measure/note/tuplet
|
|
95
|
+
*/
|
|
96
|
+
static tupletTime(noteElement: Element, note: SmoNote, measure: SmoMeasure, smoState: SmoState): void;
|
|
97
|
+
static tupletNotation(notationsElement: Element, note: SmoNote, measure: SmoMeasure, smoState: SmoState): void;
|
|
98
|
+
/**
|
|
99
|
+
* /score-partwise/measure/note/pitch
|
|
100
|
+
* @param pitch
|
|
101
|
+
* @param noteElement
|
|
102
|
+
*/
|
|
103
|
+
static pitch(pitch: Pitch, noteElement: Element): void;
|
|
104
|
+
/**
|
|
105
|
+
* /score-partwise/measure/beam
|
|
106
|
+
* @param noteElement
|
|
107
|
+
* @param smoState
|
|
108
|
+
* @returns
|
|
109
|
+
*/
|
|
110
|
+
static beamNote(noteElement: Element, smoState: SmoState): void;
|
|
111
|
+
/**
|
|
112
|
+
* /score-partwise/measure/direction/direction-type
|
|
113
|
+
* @param measureElement
|
|
114
|
+
* @param smoState
|
|
115
|
+
* @param beforeNote
|
|
116
|
+
*/
|
|
117
|
+
static direction(measureElement: Element, smoState: SmoState, beforeNote: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* /score-partwise/measure/note/lyric
|
|
120
|
+
* @param noteElement
|
|
121
|
+
* @param smoState
|
|
122
|
+
*/
|
|
123
|
+
static lyric(noteElement: Element, smoState: SmoState): void;
|
|
124
|
+
/**
|
|
125
|
+
* /score-partwise/measure/note
|
|
126
|
+
* @param measureElement
|
|
127
|
+
* @param smoState
|
|
128
|
+
*/
|
|
129
|
+
static note(measureElement: Element, measure: SmoMeasure, note: SmoNote, smoState: SmoState): void;
|
|
130
|
+
/**
|
|
131
|
+
* /score-partwise/measure/attributes/key
|
|
132
|
+
* @param attributesElement
|
|
133
|
+
* @param smoState
|
|
134
|
+
* @returns
|
|
135
|
+
*/
|
|
136
|
+
static key(attributesElement: Element, measure: SmoMeasure, smoState: SmoState): void;
|
|
137
|
+
/**
|
|
138
|
+
* /score-partwise/part/measure/attributes/time
|
|
139
|
+
* @param attributesElement
|
|
140
|
+
* @param smoState
|
|
141
|
+
* @returns
|
|
142
|
+
*/
|
|
143
|
+
static time(attributesElement: Element, smoState: SmoState): void;
|
|
144
|
+
/**
|
|
145
|
+
* /score-partwise/part/measure/attributes/clef
|
|
146
|
+
* @param attributesElement
|
|
147
|
+
* @param smoState
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
static clef(attributesElement: Element, smoState: SmoState): void;
|
|
151
|
+
/**
|
|
152
|
+
* /score-partwise/part/measure/attributes
|
|
153
|
+
* @param measureElement
|
|
154
|
+
* @param smoState
|
|
155
|
+
*/
|
|
156
|
+
static attributes(measureElement: Element, measure: SmoMeasure, smoState: SmoState): void;
|
|
157
|
+
static staves(attributesElement: Element, smoState: SmoState): void;
|
|
158
|
+
/**
|
|
159
|
+
* /score-partwise/part/measure/attributes/transpose
|
|
160
|
+
* @param attributesElement
|
|
161
|
+
* @param smoState
|
|
162
|
+
* @returns
|
|
163
|
+
*/
|
|
164
|
+
static transpose(attributesElement: Element, smoState: SmoState): void;
|
|
165
|
+
}
|
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { SmoNoteModifierBase } from '../data/noteModifiers';
|
|
2
|
-
import { Pitch } from '../data/common';
|
|
3
|
-
import { SmoSelector } from '../xform/selections';
|
|
4
|
-
import { XmlTupletData } from './xmlState';
|
|
5
|
-
/**
|
|
6
|
-
* @category serialization
|
|
7
|
-
*/
|
|
8
|
-
export interface XmlOrnamentData {
|
|
9
|
-
ctor: string;
|
|
10
|
-
params: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @category serialization
|
|
14
|
-
*/
|
|
15
|
-
export interface XmlSmoMap {
|
|
16
|
-
xml: string;
|
|
17
|
-
smo: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @category serialization
|
|
21
|
-
*/
|
|
22
|
-
export interface XmlDurationAlteration {
|
|
23
|
-
noteCount: number;
|
|
24
|
-
noteDuration: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @category serialization
|
|
28
|
-
*/
|
|
29
|
-
export interface XmlDuration {
|
|
30
|
-
tickCount: number;
|
|
31
|
-
duration: number;
|
|
32
|
-
alteration: XmlDurationAlteration;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Store slur information when parsing xml
|
|
36
|
-
* @category serialization
|
|
37
|
-
*/
|
|
38
|
-
export interface XmlSlurType {
|
|
39
|
-
number: number;
|
|
40
|
-
type: string;
|
|
41
|
-
orientation: string;
|
|
42
|
-
placement: string;
|
|
43
|
-
controlX: number;
|
|
44
|
-
controlY: number;
|
|
45
|
-
selector: SmoSelector;
|
|
46
|
-
yOffset: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Store tie information when parsing xml
|
|
50
|
-
* @category serialization
|
|
51
|
-
*/
|
|
52
|
-
export interface XmlTieType {
|
|
53
|
-
number: number;
|
|
54
|
-
type: string;
|
|
55
|
-
orientation: string;
|
|
56
|
-
selector: SmoSelector;
|
|
57
|
-
pitchIndex: number;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Store tuplet information when parsing xml
|
|
61
|
-
* @category serialization
|
|
62
|
-
*/
|
|
63
|
-
export interface XmlTupletType {
|
|
64
|
-
number: number;
|
|
65
|
-
type: string;
|
|
66
|
-
data: XmlTupletData | null;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @category serialization
|
|
70
|
-
*/
|
|
71
|
-
export interface XmlTimeModificationType {
|
|
72
|
-
actualNotes: number;
|
|
73
|
-
normalNotes: number;
|
|
74
|
-
normalType: number;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @category serialization
|
|
78
|
-
*/
|
|
79
|
-
export interface XmlEndingData {
|
|
80
|
-
numbers: number[];
|
|
81
|
-
type: string;
|
|
82
|
-
}
|
|
83
|
-
export type LyricSyllabic = 'begin' | 'end' | 'middle' | 'single';
|
|
84
|
-
/**
|
|
85
|
-
* Store lyric information when parsing xml
|
|
86
|
-
* @category serialization
|
|
87
|
-
*/
|
|
88
|
-
export interface XmlLyricData {
|
|
89
|
-
_text: string;
|
|
90
|
-
verse: number | string;
|
|
91
|
-
syllabic: LyricSyllabic;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Utilities for parsing and serialzing musicXML.
|
|
95
|
-
* @category serialization
|
|
96
|
-
*/
|
|
97
|
-
export declare class XmlHelpers {
|
|
98
|
-
/**
|
|
99
|
-
* mxml note 'types', really s/b stem types.
|
|
100
|
-
* For grace notes, we use the note type and not duration
|
|
101
|
-
* to get the flag
|
|
102
|
-
*/
|
|
103
|
-
static get noteTypesToSmoMap(): Record<string, number>;
|
|
104
|
-
static readonly _ticksToNoteTypeMap: Record<number, string>;
|
|
105
|
-
static get ticksToNoteTypeMap(): Record<number, string>;
|
|
106
|
-
static closestStemType(ticks: number): string;
|
|
107
|
-
static get beamStates(): Record<string, number>;
|
|
108
|
-
static get ornamentXmlToSmoMap(): Record<string, XmlOrnamentData>;
|
|
109
|
-
static createRootElement(): XMLDocument;
|
|
110
|
-
static getNumberFromElement(parent: Element, path: string, defaults: number): number;
|
|
111
|
-
static getTextFromElement(parent: Element, path: string, defaults: number | string | null): string;
|
|
112
|
-
static getNumberFromAttribute(node: Element, attribute: string, defaults: number): number;
|
|
113
|
-
static getTextFromAttribute(node: Element, attribute: string, defaults: string): string;
|
|
114
|
-
static getChildrenFromPath(parent: Element, pathAr: string[]): Element[];
|
|
115
|
-
static getStemType(noteElement: Element): number;
|
|
116
|
-
static getEnding(barlineNode: Element): XmlEndingData | null;
|
|
117
|
-
static getBarline(barlineNode: Element): number;
|
|
118
|
-
static assignDefaults(node: Element, defObj: any, parameters: XmlSmoMap[]): void;
|
|
119
|
-
static nodeAttributes(node: Element): Record<string, string>;
|
|
120
|
-
static getStaffId(node: Element): number;
|
|
121
|
-
static noteBeamState(noteNode: Element): number;
|
|
122
|
-
static getVoiceId(node: Element): number;
|
|
123
|
-
static smoPitchFromNote(noteNode: Element, defaultPitch: Pitch): Pitch;
|
|
124
|
-
static isGrace(noteNode: Element): boolean;
|
|
125
|
-
static isSystemBreak(measureNode: Element): boolean;
|
|
126
|
-
static durationFromType(noteNode: Element, def: number): number;
|
|
127
|
-
static durationFromNode(noteNode: Element, def: number): number;
|
|
128
|
-
static ticksFromDuration(noteNode: Element, divisions: number, def: number): XmlDuration;
|
|
129
|
-
static getTieData(noteNode: Element, selector: SmoSelector, pitchIndex: number): XmlTieType[];
|
|
130
|
-
static getSlurData(noteNode: Element, selector: SmoSelector): XmlSlurType[];
|
|
131
|
-
static getCrescendoData(directionElement: Element): {};
|
|
132
|
-
static getTimeModificationType(noteNode: Element): XmlTimeModificationType | null;
|
|
133
|
-
static getTupletData(noteNode: Element): XmlTupletType[];
|
|
134
|
-
static articulationsAndOrnaments(noteNode: Element): SmoNoteModifierBase[];
|
|
135
|
-
static lyrics(noteNode: Element): XmlLyricData[];
|
|
136
|
-
static getTimeAlteration(noteNode: Element): XmlDurationAlteration | null;
|
|
137
|
-
static createTextElementChild(parentElement: Element, elementName: string, obj: any, field: string): Element;
|
|
138
|
-
static createAttributes(element: Element, obj: any): void;
|
|
139
|
-
static createAttribute(element: Element, name: string, value: any): void;
|
|
140
|
-
}
|
|
1
|
+
import { SmoNoteModifierBase } from '../data/noteModifiers';
|
|
2
|
+
import { Pitch } from '../data/common';
|
|
3
|
+
import { SmoSelector } from '../xform/selections';
|
|
4
|
+
import { XmlTupletData } from './xmlState';
|
|
5
|
+
/**
|
|
6
|
+
* @category serialization
|
|
7
|
+
*/
|
|
8
|
+
export interface XmlOrnamentData {
|
|
9
|
+
ctor: string;
|
|
10
|
+
params: Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @category serialization
|
|
14
|
+
*/
|
|
15
|
+
export interface XmlSmoMap {
|
|
16
|
+
xml: string;
|
|
17
|
+
smo: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @category serialization
|
|
21
|
+
*/
|
|
22
|
+
export interface XmlDurationAlteration {
|
|
23
|
+
noteCount: number;
|
|
24
|
+
noteDuration: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @category serialization
|
|
28
|
+
*/
|
|
29
|
+
export interface XmlDuration {
|
|
30
|
+
tickCount: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
alteration: XmlDurationAlteration;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Store slur information when parsing xml
|
|
36
|
+
* @category serialization
|
|
37
|
+
*/
|
|
38
|
+
export interface XmlSlurType {
|
|
39
|
+
number: number;
|
|
40
|
+
type: string;
|
|
41
|
+
orientation: string;
|
|
42
|
+
placement: string;
|
|
43
|
+
controlX: number;
|
|
44
|
+
controlY: number;
|
|
45
|
+
selector: SmoSelector;
|
|
46
|
+
yOffset: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Store tie information when parsing xml
|
|
50
|
+
* @category serialization
|
|
51
|
+
*/
|
|
52
|
+
export interface XmlTieType {
|
|
53
|
+
number: number;
|
|
54
|
+
type: string;
|
|
55
|
+
orientation: string;
|
|
56
|
+
selector: SmoSelector;
|
|
57
|
+
pitchIndex: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Store tuplet information when parsing xml
|
|
61
|
+
* @category serialization
|
|
62
|
+
*/
|
|
63
|
+
export interface XmlTupletType {
|
|
64
|
+
number: number;
|
|
65
|
+
type: string;
|
|
66
|
+
data: XmlTupletData | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @category serialization
|
|
70
|
+
*/
|
|
71
|
+
export interface XmlTimeModificationType {
|
|
72
|
+
actualNotes: number;
|
|
73
|
+
normalNotes: number;
|
|
74
|
+
normalType: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @category serialization
|
|
78
|
+
*/
|
|
79
|
+
export interface XmlEndingData {
|
|
80
|
+
numbers: number[];
|
|
81
|
+
type: string;
|
|
82
|
+
}
|
|
83
|
+
export type LyricSyllabic = 'begin' | 'end' | 'middle' | 'single';
|
|
84
|
+
/**
|
|
85
|
+
* Store lyric information when parsing xml
|
|
86
|
+
* @category serialization
|
|
87
|
+
*/
|
|
88
|
+
export interface XmlLyricData {
|
|
89
|
+
_text: string;
|
|
90
|
+
verse: number | string;
|
|
91
|
+
syllabic: LyricSyllabic;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Utilities for parsing and serialzing musicXML.
|
|
95
|
+
* @category serialization
|
|
96
|
+
*/
|
|
97
|
+
export declare class XmlHelpers {
|
|
98
|
+
/**
|
|
99
|
+
* mxml note 'types', really s/b stem types.
|
|
100
|
+
* For grace notes, we use the note type and not duration
|
|
101
|
+
* to get the flag
|
|
102
|
+
*/
|
|
103
|
+
static get noteTypesToSmoMap(): Record<string, number>;
|
|
104
|
+
static readonly _ticksToNoteTypeMap: Record<number, string>;
|
|
105
|
+
static get ticksToNoteTypeMap(): Record<number, string>;
|
|
106
|
+
static closestStemType(ticks: number): string;
|
|
107
|
+
static get beamStates(): Record<string, number>;
|
|
108
|
+
static get ornamentXmlToSmoMap(): Record<string, XmlOrnamentData>;
|
|
109
|
+
static createRootElement(): XMLDocument;
|
|
110
|
+
static getNumberFromElement(parent: Element, path: string, defaults: number): number;
|
|
111
|
+
static getTextFromElement(parent: Element, path: string, defaults: number | string | null): string;
|
|
112
|
+
static getNumberFromAttribute(node: Element, attribute: string, defaults: number): number;
|
|
113
|
+
static getTextFromAttribute(node: Element, attribute: string, defaults: string): string;
|
|
114
|
+
static getChildrenFromPath(parent: Element, pathAr: string[]): Element[];
|
|
115
|
+
static getStemType(noteElement: Element): number;
|
|
116
|
+
static getEnding(barlineNode: Element): XmlEndingData | null;
|
|
117
|
+
static getBarline(barlineNode: Element): number;
|
|
118
|
+
static assignDefaults(node: Element, defObj: any, parameters: XmlSmoMap[]): void;
|
|
119
|
+
static nodeAttributes(node: Element): Record<string, string>;
|
|
120
|
+
static getStaffId(node: Element): number;
|
|
121
|
+
static noteBeamState(noteNode: Element): number;
|
|
122
|
+
static getVoiceId(node: Element): number;
|
|
123
|
+
static smoPitchFromNote(noteNode: Element, defaultPitch: Pitch): Pitch;
|
|
124
|
+
static isGrace(noteNode: Element): boolean;
|
|
125
|
+
static isSystemBreak(measureNode: Element): boolean;
|
|
126
|
+
static durationFromType(noteNode: Element, def: number): number;
|
|
127
|
+
static durationFromNode(noteNode: Element, def: number): number;
|
|
128
|
+
static ticksFromDuration(noteNode: Element, divisions: number, def: number): XmlDuration;
|
|
129
|
+
static getTieData(noteNode: Element, selector: SmoSelector, pitchIndex: number): XmlTieType[];
|
|
130
|
+
static getSlurData(noteNode: Element, selector: SmoSelector): XmlSlurType[];
|
|
131
|
+
static getCrescendoData(directionElement: Element): {};
|
|
132
|
+
static getTimeModificationType(noteNode: Element): XmlTimeModificationType | null;
|
|
133
|
+
static getTupletData(noteNode: Element): XmlTupletType[];
|
|
134
|
+
static articulationsAndOrnaments(noteNode: Element): SmoNoteModifierBase[];
|
|
135
|
+
static lyrics(noteNode: Element): XmlLyricData[];
|
|
136
|
+
static getTimeAlteration(noteNode: Element): XmlDurationAlteration | null;
|
|
137
|
+
static createTextElementChild(parentElement: Element, elementName: string, obj: any, field: string): Element;
|
|
138
|
+
static createAttributes(element: Element, obj: any): void;
|
|
139
|
+
static createAttribute(element: Element, name: string, value: any): void;
|
|
140
|
+
}
|