smoosic 1.0.25 → 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/src/application/exports.ts +1 -0
- 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,590 +1,590 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A note modifier is anything that is mapped to the note, but not part of the
|
|
3
|
-
* pitch itself. This includes grace notes, and note-text like lyrics.
|
|
4
|
-
* @module /smo/data/noteModifiers
|
|
5
|
-
*/
|
|
6
|
-
import { SmoAttrs, Ticks, Pitch, SmoObjectParams, Transposable, SvgBox, SmoModifierBase, Clef, ElementLike } from './common';
|
|
7
|
-
import { FontInfo } from '../../common/vex';
|
|
8
|
-
/**
|
|
9
|
-
* A note modifier is anything that is mapped to the note, but not part of the
|
|
10
|
-
* pitch itself. This includes grace notes, and note-text like lyrics.
|
|
11
|
-
* All note modifiers have a serialize method and a 'ctor' parameter or deserialization
|
|
12
|
-
* @category SmoObject
|
|
13
|
-
*/
|
|
14
|
-
export declare abstract class SmoNoteModifierBase implements SmoModifierBase {
|
|
15
|
-
attrs: SmoAttrs;
|
|
16
|
-
ctor: string;
|
|
17
|
-
logicalBox: SvgBox | null;
|
|
18
|
-
element: ElementLike;
|
|
19
|
-
constructor(ctor: string);
|
|
20
|
-
static deserialize(jsonObj: SmoObjectParams): any;
|
|
21
|
-
abstract serialize(): any;
|
|
22
|
-
}
|
|
23
|
-
export declare function isClefChangeParamsSer(params: Partial<SmoClefChangeParamsSer>): params is SmoClefChangeParamsSer;
|
|
24
|
-
/**
|
|
25
|
-
* @category SmoObject
|
|
26
|
-
*/
|
|
27
|
-
export interface SmoClefChangeParams {
|
|
28
|
-
clef: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @category serialization
|
|
32
|
-
*/
|
|
33
|
-
export interface SmoClefChangeParamsSer extends SmoClefChangeParams {
|
|
34
|
-
/**
|
|
35
|
-
* constructor
|
|
36
|
-
*/
|
|
37
|
-
ctor: string;
|
|
38
|
-
/**
|
|
39
|
-
* attributes for ID
|
|
40
|
-
*/
|
|
41
|
-
attrs: SmoAttrs;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @category SmoObject
|
|
45
|
-
*/
|
|
46
|
-
export declare class SmoClefChange extends SmoNoteModifierBase {
|
|
47
|
-
clef: Clef;
|
|
48
|
-
static get defaults(): SmoClefChangeParamsSer;
|
|
49
|
-
constructor(clefParams: SmoClefChangeParams);
|
|
50
|
-
serialize(): SmoClefChangeParamsSer;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* used to construct {@link SmoGraceNote}
|
|
54
|
-
* beam group.
|
|
55
|
-
* @category SmoObject
|
|
56
|
-
*/
|
|
57
|
-
export interface GraceNoteParams extends SmoModifierBase {
|
|
58
|
-
/**
|
|
59
|
-
* up, down, or auto
|
|
60
|
-
*/
|
|
61
|
-
flagState: number;
|
|
62
|
-
/**
|
|
63
|
-
* same as for {@link SmoNote}
|
|
64
|
-
*/
|
|
65
|
-
noteType: string;
|
|
66
|
-
/**
|
|
67
|
-
* same as for {@link SmoNote}
|
|
68
|
-
*/
|
|
69
|
-
beamBeats: number;
|
|
70
|
-
/**
|
|
71
|
-
* same as for {@link SmoNote}. Indicates break in beam group
|
|
72
|
-
*/
|
|
73
|
-
endBeam: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* should be same as note?
|
|
76
|
-
*/
|
|
77
|
-
clef: string;
|
|
78
|
-
/**
|
|
79
|
-
* there's probably a name for this...
|
|
80
|
-
*/
|
|
81
|
-
slash: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* only used for beaming
|
|
84
|
-
*/
|
|
85
|
-
ticks: Ticks;
|
|
86
|
-
/**
|
|
87
|
-
* Pitch, same as for {@link SmoNote}
|
|
88
|
-
*/
|
|
89
|
-
pitches: Pitch[];
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* serialized grace note
|
|
93
|
-
* @category serialization
|
|
94
|
-
*/
|
|
95
|
-
export interface GraceNoteParamsSer extends GraceNoteParams {
|
|
96
|
-
/**
|
|
97
|
-
* constructor
|
|
98
|
-
*/
|
|
99
|
-
ctor: string;
|
|
100
|
-
/**
|
|
101
|
-
* attributes for ID
|
|
102
|
-
*/
|
|
103
|
-
attrs: SmoAttrs;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* A grace notes has many of the things an 'actual' note can have, but it doesn't take up
|
|
107
|
-
* time against the time signature
|
|
108
|
-
* @category SmoObject
|
|
109
|
-
*/
|
|
110
|
-
export declare class SmoGraceNote extends SmoNoteModifierBase implements Transposable {
|
|
111
|
-
static get flagStates(): {
|
|
112
|
-
auto: number;
|
|
113
|
-
up: number;
|
|
114
|
-
down: number;
|
|
115
|
-
};
|
|
116
|
-
static get defaults(): GraceNoteParams;
|
|
117
|
-
static get parameterArray(): string[];
|
|
118
|
-
ticks: Ticks;
|
|
119
|
-
pitches: Pitch[];
|
|
120
|
-
slash: boolean;
|
|
121
|
-
clef: string;
|
|
122
|
-
noteType: string;
|
|
123
|
-
renderId: string | null;
|
|
124
|
-
hasTabNote: boolean;
|
|
125
|
-
tickCount(): number;
|
|
126
|
-
toVexGraceNote(): {
|
|
127
|
-
duration: string;
|
|
128
|
-
keys: string[];
|
|
129
|
-
slash: boolean;
|
|
130
|
-
};
|
|
131
|
-
serialize(): GraceNoteParamsSer;
|
|
132
|
-
constructor(parameters: Partial<GraceNoteParams>);
|
|
133
|
-
}
|
|
134
|
-
export type SmoArpeggioType = 'directionless' | 'rasquedo_up' | 'rasquedo_down' | 'roll_up' | 'roll_down' | 'brush_up' | 'brush_down' | 'none';
|
|
135
|
-
export declare const SmoArpeggioTypes: string[];
|
|
136
|
-
/**
|
|
137
|
-
* @category SmoObject
|
|
138
|
-
*/
|
|
139
|
-
export interface SmoArpeggioParams {
|
|
140
|
-
type: SmoArpeggioType;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @category serialization
|
|
144
|
-
*/
|
|
145
|
-
export interface SmoArpeggioParamsSer {
|
|
146
|
-
ctor: string;
|
|
147
|
-
/**
|
|
148
|
-
* stringified arpeggion enumeration
|
|
149
|
-
*/
|
|
150
|
-
type: string;
|
|
151
|
-
}
|
|
152
|
-
export declare function isArpeggioType(tp: SmoArpeggioType | string): tp is SmoArpeggioType;
|
|
153
|
-
/**
|
|
154
|
-
* A 'splatter' symbol next to a chord.
|
|
155
|
-
* @category SmoObject
|
|
156
|
-
*/
|
|
157
|
-
export declare class SmoArpeggio extends SmoNoteModifierBase {
|
|
158
|
-
static _types: Record<string, number>;
|
|
159
|
-
static get types(): Record<string, number>;
|
|
160
|
-
typeCode: number;
|
|
161
|
-
constructor(params: SmoArpeggioParams);
|
|
162
|
-
get typeString(): SmoArpeggioType;
|
|
163
|
-
serialize(): SmoArpeggioParamsSer;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Constructor parameters for {@link SmoMicrotone}
|
|
167
|
-
* @category SmoObject
|
|
168
|
-
*/
|
|
169
|
-
export interface SmoMicrotoneParams extends SmoObjectParams {
|
|
170
|
-
/**
|
|
171
|
-
* indicates which modifier to alter the tone (e.g. 1/4 sharp)
|
|
172
|
-
*/
|
|
173
|
-
tone: string;
|
|
174
|
-
/**
|
|
175
|
-
* the index of the pitch to alter
|
|
176
|
-
*/
|
|
177
|
-
pitch: number;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* serialized microtones.
|
|
181
|
-
* @category serialization
|
|
182
|
-
*/
|
|
183
|
-
export interface SmoMicrotoneParamsSer extends SmoMicrotoneParams {
|
|
184
|
-
ctor: string;
|
|
185
|
-
attrs: SmoAttrs;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Microtones are treated similarly to ornaments. There are not
|
|
189
|
-
* rules for persisting throughout a measure, cancel etc.
|
|
190
|
-
* @category SmoObject
|
|
191
|
-
*/
|
|
192
|
-
export declare class SmoMicrotone extends SmoNoteModifierBase {
|
|
193
|
-
tone: string;
|
|
194
|
-
pitchIndex: number;
|
|
195
|
-
static readonly smoToVex: Record<string, string>;
|
|
196
|
-
static readonly pitchCoeff: Record<string, number>;
|
|
197
|
-
get toPitchCoeff(): number;
|
|
198
|
-
get toVex(): string;
|
|
199
|
-
static get defaults(): SmoMicrotoneParams;
|
|
200
|
-
static get parameterArray(): string[];
|
|
201
|
-
serialize(): SmoMicrotoneParamsSer;
|
|
202
|
-
constructor(parameters: SmoMicrotoneParams);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Constructor for {@link SmoOrnament}
|
|
206
|
-
* @category SmoObject
|
|
207
|
-
*/
|
|
208
|
-
export interface SmoOrnamentParams {
|
|
209
|
-
/**
|
|
210
|
-
* postition, above or below
|
|
211
|
-
*/
|
|
212
|
-
position?: string;
|
|
213
|
-
/**
|
|
214
|
-
* horizontal offset from note head
|
|
215
|
-
*/
|
|
216
|
-
offset?: string;
|
|
217
|
-
/**
|
|
218
|
-
* accidental above/below
|
|
219
|
-
*/
|
|
220
|
-
accidentalAbove?: string;
|
|
221
|
-
accidentalBelow?: string;
|
|
222
|
-
/**
|
|
223
|
-
* code for the ornament
|
|
224
|
-
*/
|
|
225
|
-
ornament: string;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* serializable ornament
|
|
229
|
-
* @category serialization
|
|
230
|
-
*/
|
|
231
|
-
export interface SmoOrnamentParamsSer extends SmoOrnamentParams {
|
|
232
|
-
/**
|
|
233
|
-
* constructor
|
|
234
|
-
*/
|
|
235
|
-
ctor: string;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Ornaments map to vex ornaments. articulations vs. ornaments
|
|
239
|
-
* is kind of arbitrary
|
|
240
|
-
* @category SmoObject
|
|
241
|
-
*/
|
|
242
|
-
export declare class SmoOrnament extends SmoNoteModifierBase {
|
|
243
|
-
static readonly ornaments: Record<string, string>;
|
|
244
|
-
static readonly xmlOrnaments: Record<string, string>;
|
|
245
|
-
static get mordents(): string[];
|
|
246
|
-
static get turns(): string[];
|
|
247
|
-
static readonly textNoteOrnaments: Record<string, string>;
|
|
248
|
-
static readonly xmlJazz: Record<string, string>;
|
|
249
|
-
static get jazzOrnaments(): string[];
|
|
250
|
-
static get legacyJazz(): Record<string, string>;
|
|
251
|
-
toVex(): string;
|
|
252
|
-
isJazz(): boolean;
|
|
253
|
-
isMordent(): boolean;
|
|
254
|
-
isTurn(): boolean;
|
|
255
|
-
position: string;
|
|
256
|
-
offset: string;
|
|
257
|
-
ornament: string;
|
|
258
|
-
static get parameterArray(): string[];
|
|
259
|
-
static get positions(): {
|
|
260
|
-
above: string;
|
|
261
|
-
below: string;
|
|
262
|
-
auto: string;
|
|
263
|
-
};
|
|
264
|
-
static get offsets(): {
|
|
265
|
-
on: string;
|
|
266
|
-
after: string;
|
|
267
|
-
};
|
|
268
|
-
static get defaults(): SmoOrnamentParams;
|
|
269
|
-
serialize(): SmoOrnamentParamsSer;
|
|
270
|
-
constructor(parameters: SmoOrnamentParams);
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Constructor parameters for {@link SmoArticulation}
|
|
274
|
-
* @category SmoObject
|
|
275
|
-
*/
|
|
276
|
-
export interface SmoArticulationParameters {
|
|
277
|
-
/**
|
|
278
|
-
* position, above or below
|
|
279
|
-
*/
|
|
280
|
-
position?: string;
|
|
281
|
-
/**
|
|
282
|
-
* x offset
|
|
283
|
-
*/
|
|
284
|
-
offset?: number;
|
|
285
|
-
/**
|
|
286
|
-
* articulation code
|
|
287
|
-
*/
|
|
288
|
-
articulation: string;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* @category serialization
|
|
292
|
-
*/
|
|
293
|
-
export interface SmoArticulationParametersSer extends SmoArticulationParameters {
|
|
294
|
-
ctor: string;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Articulations map to notes, can be placed above/below
|
|
298
|
-
* @category SmoObject
|
|
299
|
-
*/
|
|
300
|
-
export declare class SmoArticulation extends SmoNoteModifierBase {
|
|
301
|
-
static get articulations(): Record<string, string>;
|
|
302
|
-
static readonly xmlArticulations: Record<string, string>;
|
|
303
|
-
static get positions(): {
|
|
304
|
-
above: string;
|
|
305
|
-
below: string;
|
|
306
|
-
auto: string;
|
|
307
|
-
};
|
|
308
|
-
static get articulationToVex(): Record<string, string>;
|
|
309
|
-
static get vexToArticulation(): Record<string, string>;
|
|
310
|
-
static get parameterArray(): string[];
|
|
311
|
-
static get positionToVex(): Record<string, number>;
|
|
312
|
-
static get defaults(): SmoArticulationParameters;
|
|
313
|
-
position: string;
|
|
314
|
-
offset: number;
|
|
315
|
-
articulation: string;
|
|
316
|
-
adjX: number;
|
|
317
|
-
serialize(): SmoArticulationParametersSer;
|
|
318
|
-
constructor(parameters: SmoArticulationParameters);
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* @internal
|
|
322
|
-
*/
|
|
323
|
-
export interface VexAnnotationParams {
|
|
324
|
-
glyph?: string;
|
|
325
|
-
symbolModifier?: number;
|
|
326
|
-
text?: string;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* The persist-y parts of {@link SmoLyricParams}. We don't persist the selector
|
|
330
|
-
* since that can change based on the position of the parent note
|
|
331
|
-
* @category serialization
|
|
332
|
-
*/
|
|
333
|
-
export interface SmoLyricParamsSer extends SmoObjectParams {
|
|
334
|
-
/**
|
|
335
|
-
* constructor
|
|
336
|
-
*/
|
|
337
|
-
ctor: string;
|
|
338
|
-
/**
|
|
339
|
-
* attributes for ID
|
|
340
|
-
*/
|
|
341
|
-
attrs: SmoAttrs;
|
|
342
|
-
/**
|
|
343
|
-
* the lyric font
|
|
344
|
-
*/
|
|
345
|
-
fontInfo: FontInfo;
|
|
346
|
-
/**
|
|
347
|
-
* classes for styling
|
|
348
|
-
*/
|
|
349
|
-
classes: string;
|
|
350
|
-
/**
|
|
351
|
-
* which verse the lyric goes with
|
|
352
|
-
*/
|
|
353
|
-
verse: number;
|
|
354
|
-
/**
|
|
355
|
-
* lyrics are used for chord changes or annotations, parser is different for each
|
|
356
|
-
*/
|
|
357
|
-
parser: number;
|
|
358
|
-
/**
|
|
359
|
-
* indicates we should format for the width of the lyric
|
|
360
|
-
*/
|
|
361
|
-
adjustNoteWidthLyric: boolean;
|
|
362
|
-
/**
|
|
363
|
-
* indicates we should format for the width of the chord
|
|
364
|
-
*/
|
|
365
|
-
adjustNoteWidthChord: boolean;
|
|
366
|
-
/**
|
|
367
|
-
* fill color for text
|
|
368
|
-
*/
|
|
369
|
-
fill: string;
|
|
370
|
-
/**
|
|
371
|
-
* translate to align lyrics. Possibly this should not be serialized
|
|
372
|
-
*/
|
|
373
|
-
translateX: number;
|
|
374
|
-
/**
|
|
375
|
-
* translate to align lyrics. Possibly this should not be serialized
|
|
376
|
-
*/
|
|
377
|
-
translateY: number;
|
|
378
|
-
/**
|
|
379
|
-
* the actual text
|
|
380
|
-
*/
|
|
381
|
-
text: string | null;
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Used to construct a {@link SmoLyric} for both chords and lyrics
|
|
385
|
-
* @category SmoObject
|
|
386
|
-
*/
|
|
387
|
-
export interface SmoLyricParams {
|
|
388
|
-
/**
|
|
389
|
-
* the lyric font
|
|
390
|
-
*/
|
|
391
|
-
fontInfo: FontInfo;
|
|
392
|
-
/**
|
|
393
|
-
* classes for styling
|
|
394
|
-
*/
|
|
395
|
-
classes: string;
|
|
396
|
-
/**
|
|
397
|
-
* which verse the lyric goes with
|
|
398
|
-
*/
|
|
399
|
-
verse: number;
|
|
400
|
-
/**
|
|
401
|
-
* lyrics are used for chord changes or annotations, parser is different for each
|
|
402
|
-
*/
|
|
403
|
-
parser: number;
|
|
404
|
-
/**
|
|
405
|
-
* indicates we should format for the width of the lyric
|
|
406
|
-
*/
|
|
407
|
-
adjustNoteWidthLyric: boolean;
|
|
408
|
-
/**
|
|
409
|
-
* indicates we should format for the width of the chord
|
|
410
|
-
*/
|
|
411
|
-
adjustNoteWidthChord: boolean;
|
|
412
|
-
/**
|
|
413
|
-
* fill color for text
|
|
414
|
-
*/
|
|
415
|
-
fill: string;
|
|
416
|
-
/**
|
|
417
|
-
* translate to align lyrics. Possibly this should not be serialized
|
|
418
|
-
*/
|
|
419
|
-
translateX: number;
|
|
420
|
-
/**
|
|
421
|
-
* translate to align lyrics. Possibly this should not be serialized
|
|
422
|
-
*/
|
|
423
|
-
translateY: number;
|
|
424
|
-
/**
|
|
425
|
-
* the actual text
|
|
426
|
-
*/
|
|
427
|
-
text: string | null;
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* SmoLyric covers both chords and lyrics. The parser tells you which
|
|
431
|
-
* one you get.
|
|
432
|
-
* @category SmoObject
|
|
433
|
-
*/
|
|
434
|
-
export declare class SmoLyric extends SmoNoteModifierBase {
|
|
435
|
-
static readonly parsers: Record<string, number>;
|
|
436
|
-
static get defaults(): SmoLyricParams;
|
|
437
|
-
static get symbolPosition(): {
|
|
438
|
-
SUPERSCRIPT: number;
|
|
439
|
-
SUBSCRIPT: number;
|
|
440
|
-
NORMAL: number;
|
|
441
|
-
};
|
|
442
|
-
static get persistArray(): string[];
|
|
443
|
-
static get parameterArray(): string[];
|
|
444
|
-
ctor: string;
|
|
445
|
-
text: string;
|
|
446
|
-
fontInfo: FontInfo;
|
|
447
|
-
parser: number;
|
|
448
|
-
selector: string | null;
|
|
449
|
-
adjustNoteWidthLyric: boolean;
|
|
450
|
-
adjustNoteWidthChord: boolean;
|
|
451
|
-
verse: number;
|
|
452
|
-
skipRender: boolean;
|
|
453
|
-
fill: string;
|
|
454
|
-
translateX: number;
|
|
455
|
-
translateY: number;
|
|
456
|
-
classes: string;
|
|
457
|
-
adjX: number;
|
|
458
|
-
adjY: number;
|
|
459
|
-
musicYOffset: number;
|
|
460
|
-
hyphenX: number;
|
|
461
|
-
deleted: boolean;
|
|
462
|
-
serialize(): SmoLyricParamsSer;
|
|
463
|
-
get adjustNoteWidth(): boolean;
|
|
464
|
-
set adjustNoteWidth(val: boolean);
|
|
465
|
-
static transposeChordToKey(chord: SmoLyric, offset: number, srcKey: string, destKey: string): SmoLyric;
|
|
466
|
-
getClassSelector(): string;
|
|
467
|
-
setText(text: string): void;
|
|
468
|
-
isHyphenated(): boolean | 0;
|
|
469
|
-
getText(): any;
|
|
470
|
-
isDash(): boolean | 0;
|
|
471
|
-
static _chordGlyphFromCode(code: string): string;
|
|
472
|
-
static _tokenizeChordString(str: string): string[];
|
|
473
|
-
constructor(parameters: SmoLyricParams);
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Used to create a {@link SmoBarline}
|
|
477
|
-
* @category SmoObject
|
|
478
|
-
*/
|
|
479
|
-
export interface SmoNoteBarParams {
|
|
480
|
-
barline: number;
|
|
481
|
-
}
|
|
482
|
-
export interface SmoNoteBarParamsSer extends SmoNoteBarParams {
|
|
483
|
-
ctor: string;
|
|
484
|
-
barline: number;
|
|
485
|
-
}
|
|
486
|
-
export declare class SmoNoteBar extends SmoNoteModifierBase {
|
|
487
|
-
barline: number;
|
|
488
|
-
static get defaults(): SmoNoteBarParams;
|
|
489
|
-
static get parameterArray(): string[];
|
|
490
|
-
static readonly barlines: Record<string, number>;
|
|
491
|
-
constructor(parameters: SmoNoteBarParams);
|
|
492
|
-
serialize(): SmoNoteBarParamsSer;
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* The persisted bits of {@link SmoDynamicTextParams}
|
|
496
|
-
* @category serialization
|
|
497
|
-
*/
|
|
498
|
-
export interface SmoDynamicTextSer extends SmoObjectParams {
|
|
499
|
-
ctor: string;
|
|
500
|
-
xOffset: number;
|
|
501
|
-
fontSize: number;
|
|
502
|
-
yOffsetLine: number;
|
|
503
|
-
yOffsetPixels: number;
|
|
504
|
-
text: string;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Constructor parameters for {@link SmoDynamicText}
|
|
508
|
-
* @category SmoObject
|
|
509
|
-
*/
|
|
510
|
-
export interface SmoDynamicTextParams extends SmoDynamicTextSer {
|
|
511
|
-
ctor: string;
|
|
512
|
-
xOffset: number;
|
|
513
|
-
fontSize: number;
|
|
514
|
-
yOffsetLine: number;
|
|
515
|
-
yOffsetPixels: number;
|
|
516
|
-
text: string;
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Dynamic text tells you how loud not to play.
|
|
520
|
-
* @category SmoObject
|
|
521
|
-
*/
|
|
522
|
-
export declare class SmoDynamicText extends SmoNoteModifierBase {
|
|
523
|
-
static get dynamics(): Record<string, string>;
|
|
524
|
-
static get defaults(): SmoDynamicTextParams;
|
|
525
|
-
static get persistArray(): string[];
|
|
526
|
-
static get parameterArray(): string[];
|
|
527
|
-
text: string;
|
|
528
|
-
yOffsetLine: number;
|
|
529
|
-
yOffsetPixels: number;
|
|
530
|
-
xOffset: number;
|
|
531
|
-
fontSize: number;
|
|
532
|
-
serialize(): object;
|
|
533
|
-
constructor(parameters: SmoDynamicTextParams);
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* @category SmoObject
|
|
537
|
-
*/
|
|
538
|
-
export interface SmoTabBend {
|
|
539
|
-
bendType: number;
|
|
540
|
-
release: boolean;
|
|
541
|
-
text: string;
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* @category SmoObject
|
|
545
|
-
*/
|
|
546
|
-
export interface SmoFretPosition {
|
|
547
|
-
string: number;
|
|
548
|
-
fret: number;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* @category SmoObject
|
|
552
|
-
*/
|
|
553
|
-
export interface SmoTabNoteParams {
|
|
554
|
-
positions: SmoFretPosition[];
|
|
555
|
-
noteId: string;
|
|
556
|
-
flagState: number;
|
|
557
|
-
flagThrough: boolean;
|
|
558
|
-
noteHead: number;
|
|
559
|
-
isAssigned: boolean;
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* @category serialization
|
|
563
|
-
*/
|
|
564
|
-
export interface SmoTabNoteParamsSer extends SmoTabNoteParams {
|
|
565
|
-
ctor: string;
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* @category SmoObject
|
|
569
|
-
*/
|
|
570
|
-
export declare class SmoTabNote extends SmoNoteModifierBase {
|
|
571
|
-
static get defaults(): SmoTabNoteParams;
|
|
572
|
-
positions: SmoFretPosition[];
|
|
573
|
-
noteId: string;
|
|
574
|
-
isAssigned: boolean;
|
|
575
|
-
noteHead: number;
|
|
576
|
-
flagState: number;
|
|
577
|
-
flagThrough: boolean;
|
|
578
|
-
static get flagStates(): {
|
|
579
|
-
None: number;
|
|
580
|
-
Up: number;
|
|
581
|
-
Down: number;
|
|
582
|
-
};
|
|
583
|
-
static get noteHeads(): {
|
|
584
|
-
number: number;
|
|
585
|
-
x: number;
|
|
586
|
-
};
|
|
587
|
-
constructor(params: SmoTabNoteParams);
|
|
588
|
-
serialize(): SmoTabNoteParamsSer;
|
|
589
|
-
}
|
|
590
|
-
export declare const noteModifierDynamicCtorInit: () => void;
|
|
1
|
+
/**
|
|
2
|
+
* A note modifier is anything that is mapped to the note, but not part of the
|
|
3
|
+
* pitch itself. This includes grace notes, and note-text like lyrics.
|
|
4
|
+
* @module /smo/data/noteModifiers
|
|
5
|
+
*/
|
|
6
|
+
import { SmoAttrs, Ticks, Pitch, SmoObjectParams, Transposable, SvgBox, SmoModifierBase, Clef, ElementLike } from './common';
|
|
7
|
+
import { FontInfo } from '../../common/vex';
|
|
8
|
+
/**
|
|
9
|
+
* A note modifier is anything that is mapped to the note, but not part of the
|
|
10
|
+
* pitch itself. This includes grace notes, and note-text like lyrics.
|
|
11
|
+
* All note modifiers have a serialize method and a 'ctor' parameter or deserialization
|
|
12
|
+
* @category SmoObject
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class SmoNoteModifierBase implements SmoModifierBase {
|
|
15
|
+
attrs: SmoAttrs;
|
|
16
|
+
ctor: string;
|
|
17
|
+
logicalBox: SvgBox | null;
|
|
18
|
+
element: ElementLike;
|
|
19
|
+
constructor(ctor: string);
|
|
20
|
+
static deserialize(jsonObj: SmoObjectParams): any;
|
|
21
|
+
abstract serialize(): any;
|
|
22
|
+
}
|
|
23
|
+
export declare function isClefChangeParamsSer(params: Partial<SmoClefChangeParamsSer>): params is SmoClefChangeParamsSer;
|
|
24
|
+
/**
|
|
25
|
+
* @category SmoObject
|
|
26
|
+
*/
|
|
27
|
+
export interface SmoClefChangeParams {
|
|
28
|
+
clef: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @category serialization
|
|
32
|
+
*/
|
|
33
|
+
export interface SmoClefChangeParamsSer extends SmoClefChangeParams {
|
|
34
|
+
/**
|
|
35
|
+
* constructor
|
|
36
|
+
*/
|
|
37
|
+
ctor: string;
|
|
38
|
+
/**
|
|
39
|
+
* attributes for ID
|
|
40
|
+
*/
|
|
41
|
+
attrs: SmoAttrs;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @category SmoObject
|
|
45
|
+
*/
|
|
46
|
+
export declare class SmoClefChange extends SmoNoteModifierBase {
|
|
47
|
+
clef: Clef;
|
|
48
|
+
static get defaults(): SmoClefChangeParamsSer;
|
|
49
|
+
constructor(clefParams: SmoClefChangeParams);
|
|
50
|
+
serialize(): SmoClefChangeParamsSer;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* used to construct {@link SmoGraceNote}
|
|
54
|
+
* beam group.
|
|
55
|
+
* @category SmoObject
|
|
56
|
+
*/
|
|
57
|
+
export interface GraceNoteParams extends SmoModifierBase {
|
|
58
|
+
/**
|
|
59
|
+
* up, down, or auto
|
|
60
|
+
*/
|
|
61
|
+
flagState: number;
|
|
62
|
+
/**
|
|
63
|
+
* same as for {@link SmoNote}
|
|
64
|
+
*/
|
|
65
|
+
noteType: string;
|
|
66
|
+
/**
|
|
67
|
+
* same as for {@link SmoNote}
|
|
68
|
+
*/
|
|
69
|
+
beamBeats: number;
|
|
70
|
+
/**
|
|
71
|
+
* same as for {@link SmoNote}. Indicates break in beam group
|
|
72
|
+
*/
|
|
73
|
+
endBeam: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* should be same as note?
|
|
76
|
+
*/
|
|
77
|
+
clef: string;
|
|
78
|
+
/**
|
|
79
|
+
* there's probably a name for this...
|
|
80
|
+
*/
|
|
81
|
+
slash: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* only used for beaming
|
|
84
|
+
*/
|
|
85
|
+
ticks: Ticks;
|
|
86
|
+
/**
|
|
87
|
+
* Pitch, same as for {@link SmoNote}
|
|
88
|
+
*/
|
|
89
|
+
pitches: Pitch[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* serialized grace note
|
|
93
|
+
* @category serialization
|
|
94
|
+
*/
|
|
95
|
+
export interface GraceNoteParamsSer extends GraceNoteParams {
|
|
96
|
+
/**
|
|
97
|
+
* constructor
|
|
98
|
+
*/
|
|
99
|
+
ctor: string;
|
|
100
|
+
/**
|
|
101
|
+
* attributes for ID
|
|
102
|
+
*/
|
|
103
|
+
attrs: SmoAttrs;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A grace notes has many of the things an 'actual' note can have, but it doesn't take up
|
|
107
|
+
* time against the time signature
|
|
108
|
+
* @category SmoObject
|
|
109
|
+
*/
|
|
110
|
+
export declare class SmoGraceNote extends SmoNoteModifierBase implements Transposable {
|
|
111
|
+
static get flagStates(): {
|
|
112
|
+
auto: number;
|
|
113
|
+
up: number;
|
|
114
|
+
down: number;
|
|
115
|
+
};
|
|
116
|
+
static get defaults(): GraceNoteParams;
|
|
117
|
+
static get parameterArray(): string[];
|
|
118
|
+
ticks: Ticks;
|
|
119
|
+
pitches: Pitch[];
|
|
120
|
+
slash: boolean;
|
|
121
|
+
clef: string;
|
|
122
|
+
noteType: string;
|
|
123
|
+
renderId: string | null;
|
|
124
|
+
hasTabNote: boolean;
|
|
125
|
+
tickCount(): number;
|
|
126
|
+
toVexGraceNote(): {
|
|
127
|
+
duration: string;
|
|
128
|
+
keys: string[];
|
|
129
|
+
slash: boolean;
|
|
130
|
+
};
|
|
131
|
+
serialize(): GraceNoteParamsSer;
|
|
132
|
+
constructor(parameters: Partial<GraceNoteParams>);
|
|
133
|
+
}
|
|
134
|
+
export type SmoArpeggioType = 'directionless' | 'rasquedo_up' | 'rasquedo_down' | 'roll_up' | 'roll_down' | 'brush_up' | 'brush_down' | 'none';
|
|
135
|
+
export declare const SmoArpeggioTypes: string[];
|
|
136
|
+
/**
|
|
137
|
+
* @category SmoObject
|
|
138
|
+
*/
|
|
139
|
+
export interface SmoArpeggioParams {
|
|
140
|
+
type: SmoArpeggioType;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @category serialization
|
|
144
|
+
*/
|
|
145
|
+
export interface SmoArpeggioParamsSer {
|
|
146
|
+
ctor: string;
|
|
147
|
+
/**
|
|
148
|
+
* stringified arpeggion enumeration
|
|
149
|
+
*/
|
|
150
|
+
type: string;
|
|
151
|
+
}
|
|
152
|
+
export declare function isArpeggioType(tp: SmoArpeggioType | string): tp is SmoArpeggioType;
|
|
153
|
+
/**
|
|
154
|
+
* A 'splatter' symbol next to a chord.
|
|
155
|
+
* @category SmoObject
|
|
156
|
+
*/
|
|
157
|
+
export declare class SmoArpeggio extends SmoNoteModifierBase {
|
|
158
|
+
static _types: Record<string, number>;
|
|
159
|
+
static get types(): Record<string, number>;
|
|
160
|
+
typeCode: number;
|
|
161
|
+
constructor(params: SmoArpeggioParams);
|
|
162
|
+
get typeString(): SmoArpeggioType;
|
|
163
|
+
serialize(): SmoArpeggioParamsSer;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Constructor parameters for {@link SmoMicrotone}
|
|
167
|
+
* @category SmoObject
|
|
168
|
+
*/
|
|
169
|
+
export interface SmoMicrotoneParams extends SmoObjectParams {
|
|
170
|
+
/**
|
|
171
|
+
* indicates which modifier to alter the tone (e.g. 1/4 sharp)
|
|
172
|
+
*/
|
|
173
|
+
tone: string;
|
|
174
|
+
/**
|
|
175
|
+
* the index of the pitch to alter
|
|
176
|
+
*/
|
|
177
|
+
pitch: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* serialized microtones.
|
|
181
|
+
* @category serialization
|
|
182
|
+
*/
|
|
183
|
+
export interface SmoMicrotoneParamsSer extends SmoMicrotoneParams {
|
|
184
|
+
ctor: string;
|
|
185
|
+
attrs: SmoAttrs;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Microtones are treated similarly to ornaments. There are not
|
|
189
|
+
* rules for persisting throughout a measure, cancel etc.
|
|
190
|
+
* @category SmoObject
|
|
191
|
+
*/
|
|
192
|
+
export declare class SmoMicrotone extends SmoNoteModifierBase {
|
|
193
|
+
tone: string;
|
|
194
|
+
pitchIndex: number;
|
|
195
|
+
static readonly smoToVex: Record<string, string>;
|
|
196
|
+
static readonly pitchCoeff: Record<string, number>;
|
|
197
|
+
get toPitchCoeff(): number;
|
|
198
|
+
get toVex(): string;
|
|
199
|
+
static get defaults(): SmoMicrotoneParams;
|
|
200
|
+
static get parameterArray(): string[];
|
|
201
|
+
serialize(): SmoMicrotoneParamsSer;
|
|
202
|
+
constructor(parameters: SmoMicrotoneParams);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Constructor for {@link SmoOrnament}
|
|
206
|
+
* @category SmoObject
|
|
207
|
+
*/
|
|
208
|
+
export interface SmoOrnamentParams {
|
|
209
|
+
/**
|
|
210
|
+
* postition, above or below
|
|
211
|
+
*/
|
|
212
|
+
position?: string;
|
|
213
|
+
/**
|
|
214
|
+
* horizontal offset from note head
|
|
215
|
+
*/
|
|
216
|
+
offset?: string;
|
|
217
|
+
/**
|
|
218
|
+
* accidental above/below
|
|
219
|
+
*/
|
|
220
|
+
accidentalAbove?: string;
|
|
221
|
+
accidentalBelow?: string;
|
|
222
|
+
/**
|
|
223
|
+
* code for the ornament
|
|
224
|
+
*/
|
|
225
|
+
ornament: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* serializable ornament
|
|
229
|
+
* @category serialization
|
|
230
|
+
*/
|
|
231
|
+
export interface SmoOrnamentParamsSer extends SmoOrnamentParams {
|
|
232
|
+
/**
|
|
233
|
+
* constructor
|
|
234
|
+
*/
|
|
235
|
+
ctor: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Ornaments map to vex ornaments. articulations vs. ornaments
|
|
239
|
+
* is kind of arbitrary
|
|
240
|
+
* @category SmoObject
|
|
241
|
+
*/
|
|
242
|
+
export declare class SmoOrnament extends SmoNoteModifierBase {
|
|
243
|
+
static readonly ornaments: Record<string, string>;
|
|
244
|
+
static readonly xmlOrnaments: Record<string, string>;
|
|
245
|
+
static get mordents(): string[];
|
|
246
|
+
static get turns(): string[];
|
|
247
|
+
static readonly textNoteOrnaments: Record<string, string>;
|
|
248
|
+
static readonly xmlJazz: Record<string, string>;
|
|
249
|
+
static get jazzOrnaments(): string[];
|
|
250
|
+
static get legacyJazz(): Record<string, string>;
|
|
251
|
+
toVex(): string;
|
|
252
|
+
isJazz(): boolean;
|
|
253
|
+
isMordent(): boolean;
|
|
254
|
+
isTurn(): boolean;
|
|
255
|
+
position: string;
|
|
256
|
+
offset: string;
|
|
257
|
+
ornament: string;
|
|
258
|
+
static get parameterArray(): string[];
|
|
259
|
+
static get positions(): {
|
|
260
|
+
above: string;
|
|
261
|
+
below: string;
|
|
262
|
+
auto: string;
|
|
263
|
+
};
|
|
264
|
+
static get offsets(): {
|
|
265
|
+
on: string;
|
|
266
|
+
after: string;
|
|
267
|
+
};
|
|
268
|
+
static get defaults(): SmoOrnamentParams;
|
|
269
|
+
serialize(): SmoOrnamentParamsSer;
|
|
270
|
+
constructor(parameters: SmoOrnamentParams);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Constructor parameters for {@link SmoArticulation}
|
|
274
|
+
* @category SmoObject
|
|
275
|
+
*/
|
|
276
|
+
export interface SmoArticulationParameters {
|
|
277
|
+
/**
|
|
278
|
+
* position, above or below
|
|
279
|
+
*/
|
|
280
|
+
position?: string;
|
|
281
|
+
/**
|
|
282
|
+
* x offset
|
|
283
|
+
*/
|
|
284
|
+
offset?: number;
|
|
285
|
+
/**
|
|
286
|
+
* articulation code
|
|
287
|
+
*/
|
|
288
|
+
articulation: string;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @category serialization
|
|
292
|
+
*/
|
|
293
|
+
export interface SmoArticulationParametersSer extends SmoArticulationParameters {
|
|
294
|
+
ctor: string;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Articulations map to notes, can be placed above/below
|
|
298
|
+
* @category SmoObject
|
|
299
|
+
*/
|
|
300
|
+
export declare class SmoArticulation extends SmoNoteModifierBase {
|
|
301
|
+
static get articulations(): Record<string, string>;
|
|
302
|
+
static readonly xmlArticulations: Record<string, string>;
|
|
303
|
+
static get positions(): {
|
|
304
|
+
above: string;
|
|
305
|
+
below: string;
|
|
306
|
+
auto: string;
|
|
307
|
+
};
|
|
308
|
+
static get articulationToVex(): Record<string, string>;
|
|
309
|
+
static get vexToArticulation(): Record<string, string>;
|
|
310
|
+
static get parameterArray(): string[];
|
|
311
|
+
static get positionToVex(): Record<string, number>;
|
|
312
|
+
static get defaults(): SmoArticulationParameters;
|
|
313
|
+
position: string;
|
|
314
|
+
offset: number;
|
|
315
|
+
articulation: string;
|
|
316
|
+
adjX: number;
|
|
317
|
+
serialize(): SmoArticulationParametersSer;
|
|
318
|
+
constructor(parameters: SmoArticulationParameters);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* @internal
|
|
322
|
+
*/
|
|
323
|
+
export interface VexAnnotationParams {
|
|
324
|
+
glyph?: string;
|
|
325
|
+
symbolModifier?: number;
|
|
326
|
+
text?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* The persist-y parts of {@link SmoLyricParams}. We don't persist the selector
|
|
330
|
+
* since that can change based on the position of the parent note
|
|
331
|
+
* @category serialization
|
|
332
|
+
*/
|
|
333
|
+
export interface SmoLyricParamsSer extends SmoObjectParams {
|
|
334
|
+
/**
|
|
335
|
+
* constructor
|
|
336
|
+
*/
|
|
337
|
+
ctor: string;
|
|
338
|
+
/**
|
|
339
|
+
* attributes for ID
|
|
340
|
+
*/
|
|
341
|
+
attrs: SmoAttrs;
|
|
342
|
+
/**
|
|
343
|
+
* the lyric font
|
|
344
|
+
*/
|
|
345
|
+
fontInfo: FontInfo;
|
|
346
|
+
/**
|
|
347
|
+
* classes for styling
|
|
348
|
+
*/
|
|
349
|
+
classes: string;
|
|
350
|
+
/**
|
|
351
|
+
* which verse the lyric goes with
|
|
352
|
+
*/
|
|
353
|
+
verse: number;
|
|
354
|
+
/**
|
|
355
|
+
* lyrics are used for chord changes or annotations, parser is different for each
|
|
356
|
+
*/
|
|
357
|
+
parser: number;
|
|
358
|
+
/**
|
|
359
|
+
* indicates we should format for the width of the lyric
|
|
360
|
+
*/
|
|
361
|
+
adjustNoteWidthLyric: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* indicates we should format for the width of the chord
|
|
364
|
+
*/
|
|
365
|
+
adjustNoteWidthChord: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* fill color for text
|
|
368
|
+
*/
|
|
369
|
+
fill: string;
|
|
370
|
+
/**
|
|
371
|
+
* translate to align lyrics. Possibly this should not be serialized
|
|
372
|
+
*/
|
|
373
|
+
translateX: number;
|
|
374
|
+
/**
|
|
375
|
+
* translate to align lyrics. Possibly this should not be serialized
|
|
376
|
+
*/
|
|
377
|
+
translateY: number;
|
|
378
|
+
/**
|
|
379
|
+
* the actual text
|
|
380
|
+
*/
|
|
381
|
+
text: string | null;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Used to construct a {@link SmoLyric} for both chords and lyrics
|
|
385
|
+
* @category SmoObject
|
|
386
|
+
*/
|
|
387
|
+
export interface SmoLyricParams {
|
|
388
|
+
/**
|
|
389
|
+
* the lyric font
|
|
390
|
+
*/
|
|
391
|
+
fontInfo: FontInfo;
|
|
392
|
+
/**
|
|
393
|
+
* classes for styling
|
|
394
|
+
*/
|
|
395
|
+
classes: string;
|
|
396
|
+
/**
|
|
397
|
+
* which verse the lyric goes with
|
|
398
|
+
*/
|
|
399
|
+
verse: number;
|
|
400
|
+
/**
|
|
401
|
+
* lyrics are used for chord changes or annotations, parser is different for each
|
|
402
|
+
*/
|
|
403
|
+
parser: number;
|
|
404
|
+
/**
|
|
405
|
+
* indicates we should format for the width of the lyric
|
|
406
|
+
*/
|
|
407
|
+
adjustNoteWidthLyric: boolean;
|
|
408
|
+
/**
|
|
409
|
+
* indicates we should format for the width of the chord
|
|
410
|
+
*/
|
|
411
|
+
adjustNoteWidthChord: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* fill color for text
|
|
414
|
+
*/
|
|
415
|
+
fill: string;
|
|
416
|
+
/**
|
|
417
|
+
* translate to align lyrics. Possibly this should not be serialized
|
|
418
|
+
*/
|
|
419
|
+
translateX: number;
|
|
420
|
+
/**
|
|
421
|
+
* translate to align lyrics. Possibly this should not be serialized
|
|
422
|
+
*/
|
|
423
|
+
translateY: number;
|
|
424
|
+
/**
|
|
425
|
+
* the actual text
|
|
426
|
+
*/
|
|
427
|
+
text: string | null;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* SmoLyric covers both chords and lyrics. The parser tells you which
|
|
431
|
+
* one you get.
|
|
432
|
+
* @category SmoObject
|
|
433
|
+
*/
|
|
434
|
+
export declare class SmoLyric extends SmoNoteModifierBase {
|
|
435
|
+
static readonly parsers: Record<string, number>;
|
|
436
|
+
static get defaults(): SmoLyricParams;
|
|
437
|
+
static get symbolPosition(): {
|
|
438
|
+
SUPERSCRIPT: number;
|
|
439
|
+
SUBSCRIPT: number;
|
|
440
|
+
NORMAL: number;
|
|
441
|
+
};
|
|
442
|
+
static get persistArray(): string[];
|
|
443
|
+
static get parameterArray(): string[];
|
|
444
|
+
ctor: string;
|
|
445
|
+
text: string;
|
|
446
|
+
fontInfo: FontInfo;
|
|
447
|
+
parser: number;
|
|
448
|
+
selector: string | null;
|
|
449
|
+
adjustNoteWidthLyric: boolean;
|
|
450
|
+
adjustNoteWidthChord: boolean;
|
|
451
|
+
verse: number;
|
|
452
|
+
skipRender: boolean;
|
|
453
|
+
fill: string;
|
|
454
|
+
translateX: number;
|
|
455
|
+
translateY: number;
|
|
456
|
+
classes: string;
|
|
457
|
+
adjX: number;
|
|
458
|
+
adjY: number;
|
|
459
|
+
musicYOffset: number;
|
|
460
|
+
hyphenX: number;
|
|
461
|
+
deleted: boolean;
|
|
462
|
+
serialize(): SmoLyricParamsSer;
|
|
463
|
+
get adjustNoteWidth(): boolean;
|
|
464
|
+
set adjustNoteWidth(val: boolean);
|
|
465
|
+
static transposeChordToKey(chord: SmoLyric, offset: number, srcKey: string, destKey: string): SmoLyric;
|
|
466
|
+
getClassSelector(): string;
|
|
467
|
+
setText(text: string): void;
|
|
468
|
+
isHyphenated(): boolean | 0;
|
|
469
|
+
getText(): any;
|
|
470
|
+
isDash(): boolean | 0;
|
|
471
|
+
static _chordGlyphFromCode(code: string): string;
|
|
472
|
+
static _tokenizeChordString(str: string): string[];
|
|
473
|
+
constructor(parameters: SmoLyricParams);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Used to create a {@link SmoBarline}
|
|
477
|
+
* @category SmoObject
|
|
478
|
+
*/
|
|
479
|
+
export interface SmoNoteBarParams {
|
|
480
|
+
barline: number;
|
|
481
|
+
}
|
|
482
|
+
export interface SmoNoteBarParamsSer extends SmoNoteBarParams {
|
|
483
|
+
ctor: string;
|
|
484
|
+
barline: number;
|
|
485
|
+
}
|
|
486
|
+
export declare class SmoNoteBar extends SmoNoteModifierBase {
|
|
487
|
+
barline: number;
|
|
488
|
+
static get defaults(): SmoNoteBarParams;
|
|
489
|
+
static get parameterArray(): string[];
|
|
490
|
+
static readonly barlines: Record<string, number>;
|
|
491
|
+
constructor(parameters: SmoNoteBarParams);
|
|
492
|
+
serialize(): SmoNoteBarParamsSer;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* The persisted bits of {@link SmoDynamicTextParams}
|
|
496
|
+
* @category serialization
|
|
497
|
+
*/
|
|
498
|
+
export interface SmoDynamicTextSer extends SmoObjectParams {
|
|
499
|
+
ctor: string;
|
|
500
|
+
xOffset: number;
|
|
501
|
+
fontSize: number;
|
|
502
|
+
yOffsetLine: number;
|
|
503
|
+
yOffsetPixels: number;
|
|
504
|
+
text: string;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Constructor parameters for {@link SmoDynamicText}
|
|
508
|
+
* @category SmoObject
|
|
509
|
+
*/
|
|
510
|
+
export interface SmoDynamicTextParams extends SmoDynamicTextSer {
|
|
511
|
+
ctor: string;
|
|
512
|
+
xOffset: number;
|
|
513
|
+
fontSize: number;
|
|
514
|
+
yOffsetLine: number;
|
|
515
|
+
yOffsetPixels: number;
|
|
516
|
+
text: string;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Dynamic text tells you how loud not to play.
|
|
520
|
+
* @category SmoObject
|
|
521
|
+
*/
|
|
522
|
+
export declare class SmoDynamicText extends SmoNoteModifierBase {
|
|
523
|
+
static get dynamics(): Record<string, string>;
|
|
524
|
+
static get defaults(): SmoDynamicTextParams;
|
|
525
|
+
static get persistArray(): string[];
|
|
526
|
+
static get parameterArray(): string[];
|
|
527
|
+
text: string;
|
|
528
|
+
yOffsetLine: number;
|
|
529
|
+
yOffsetPixels: number;
|
|
530
|
+
xOffset: number;
|
|
531
|
+
fontSize: number;
|
|
532
|
+
serialize(): object;
|
|
533
|
+
constructor(parameters: SmoDynamicTextParams);
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* @category SmoObject
|
|
537
|
+
*/
|
|
538
|
+
export interface SmoTabBend {
|
|
539
|
+
bendType: number;
|
|
540
|
+
release: boolean;
|
|
541
|
+
text: string;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* @category SmoObject
|
|
545
|
+
*/
|
|
546
|
+
export interface SmoFretPosition {
|
|
547
|
+
string: number;
|
|
548
|
+
fret: number;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @category SmoObject
|
|
552
|
+
*/
|
|
553
|
+
export interface SmoTabNoteParams {
|
|
554
|
+
positions: SmoFretPosition[];
|
|
555
|
+
noteId: string;
|
|
556
|
+
flagState: number;
|
|
557
|
+
flagThrough: boolean;
|
|
558
|
+
noteHead: number;
|
|
559
|
+
isAssigned: boolean;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* @category serialization
|
|
563
|
+
*/
|
|
564
|
+
export interface SmoTabNoteParamsSer extends SmoTabNoteParams {
|
|
565
|
+
ctor: string;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @category SmoObject
|
|
569
|
+
*/
|
|
570
|
+
export declare class SmoTabNote extends SmoNoteModifierBase {
|
|
571
|
+
static get defaults(): SmoTabNoteParams;
|
|
572
|
+
positions: SmoFretPosition[];
|
|
573
|
+
noteId: string;
|
|
574
|
+
isAssigned: boolean;
|
|
575
|
+
noteHead: number;
|
|
576
|
+
flagState: number;
|
|
577
|
+
flagThrough: boolean;
|
|
578
|
+
static get flagStates(): {
|
|
579
|
+
None: number;
|
|
580
|
+
Up: number;
|
|
581
|
+
Down: number;
|
|
582
|
+
};
|
|
583
|
+
static get noteHeads(): {
|
|
584
|
+
number: number;
|
|
585
|
+
x: number;
|
|
586
|
+
};
|
|
587
|
+
constructor(params: SmoTabNoteParams);
|
|
588
|
+
serialize(): SmoTabNoteParamsSer;
|
|
589
|
+
}
|
|
590
|
+
export declare const noteModifierDynamicCtorInit: () => void;
|