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,506 +1,506 @@
|
|
|
1
|
-
import { SmoAttrs, MeasureNumber, SmoObjectParams, SvgBox, SmoModifierBase, ElementLike } from './common';
|
|
2
|
-
import { SmoSelector } from '../xform/selections';
|
|
3
|
-
import { FontInfo } from '../../common/vex';
|
|
4
|
-
/**
|
|
5
|
-
* Measure modifiers are attached to the measure itself. Each instance has a
|
|
6
|
-
* `serialize()` method and a `ctor` attribute for deserialization.
|
|
7
|
-
* @category SmoObject
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class SmoMeasureModifierBase implements SmoModifierBase {
|
|
10
|
-
attrs: SmoAttrs;
|
|
11
|
-
ctor: string;
|
|
12
|
-
logicalBox: SvgBox | null;
|
|
13
|
-
constructor(ctor: string);
|
|
14
|
-
static deserialize(jsonObj: SmoObjectParams): any;
|
|
15
|
-
abstract serialize(): any;
|
|
16
|
-
}
|
|
17
|
-
export type SmoMeasureFormatNumberAttributes = 'customStretch' | 'proportionality' | 'padLeft' | 'measureIndex';
|
|
18
|
-
export declare const SmoMeasureFormatNumberKeys: SmoMeasureFormatNumberAttributes[];
|
|
19
|
-
export type SmoMeasueFormatBooleanAttributes = 'autoJustify' | 'systemBreak' | 'skipMeasureCount' | 'pageBreak' | 'padAllInSystem' | 'restBreak' | 'forceRest';
|
|
20
|
-
export declare const SmoMeasureFormatBooleanKeys: SmoMeasueFormatBooleanAttributes[];
|
|
21
|
-
/**
|
|
22
|
-
* Constructor parameter for measure formatting object
|
|
23
|
-
* @category SmoObject
|
|
24
|
-
*/
|
|
25
|
-
export interface SmoMeasureFormatParams {
|
|
26
|
-
/**
|
|
27
|
-
* additional pixels to a measure (plus or minus)
|
|
28
|
-
*/
|
|
29
|
-
customStretch: number | null;
|
|
30
|
-
/**
|
|
31
|
-
* softmax factor, controls how tightly rhythms are formatted
|
|
32
|
-
*/
|
|
33
|
-
proportionality: number | null;
|
|
34
|
-
/**
|
|
35
|
-
* break justification for this column
|
|
36
|
-
*/
|
|
37
|
-
autoJustify: boolean | null;
|
|
38
|
-
/**
|
|
39
|
-
* create a new system before this measure
|
|
40
|
-
*/
|
|
41
|
-
systemBreak: boolean | null;
|
|
42
|
-
/**
|
|
43
|
-
* create a new system before this page
|
|
44
|
-
*/
|
|
45
|
-
pageBreak: boolean | null;
|
|
46
|
-
/**
|
|
47
|
-
* force a break in multi-measure rest
|
|
48
|
-
*/
|
|
49
|
-
restBreak: boolean | null;
|
|
50
|
-
/**
|
|
51
|
-
* treat this measure like a whole rest
|
|
52
|
-
*/
|
|
53
|
-
forceRest: boolean | null;
|
|
54
|
-
/**
|
|
55
|
-
* if score is grouping measures per system, skip this measure in the count
|
|
56
|
-
* (used for short measures, or pickups)
|
|
57
|
-
*/
|
|
58
|
-
skipMeasureCount: boolean | null;
|
|
59
|
-
/**
|
|
60
|
-
* pad left, e.g. for the first stave in a system
|
|
61
|
-
*/
|
|
62
|
-
padLeft: number | null;
|
|
63
|
-
/**
|
|
64
|
-
* if padding left, pad all the measures in the column
|
|
65
|
-
*/
|
|
66
|
-
padAllInSystem: boolean | null;
|
|
67
|
-
/**
|
|
68
|
-
* renumber measures
|
|
69
|
-
*/
|
|
70
|
-
measureIndex: number | null;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Serialization for measure formatting customization, like system break
|
|
74
|
-
* @category serialization
|
|
75
|
-
*/
|
|
76
|
-
export interface SmoMeasureFormatParamsSer extends SmoMeasureFormatParams {
|
|
77
|
-
/**
|
|
78
|
-
* class name for deserialization
|
|
79
|
-
*/
|
|
80
|
-
ctor: string;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* ISmoMeasureFormatMgr is the DI interface to the
|
|
84
|
-
* format manager. Measure formats are often the same to multiple measures
|
|
85
|
-
* so we don't serialize each one - instead we map them with this interface
|
|
86
|
-
* @category SmoObject
|
|
87
|
-
*/
|
|
88
|
-
export interface ISmoMeasureFormatMgr {
|
|
89
|
-
format: SmoMeasureFormatParams;
|
|
90
|
-
measureNumber: MeasureNumber;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Measure format holds parameters about the automatic formatting of the measure itself, such as the witch and
|
|
94
|
-
* how the durations are proportioned. Note that measure formatting is also controlled by the justification
|
|
95
|
-
* between voices and staves. For instance, 2 measures in different staves will have to have the same width
|
|
96
|
-
* @category SmoObject
|
|
97
|
-
*/
|
|
98
|
-
export declare class SmoMeasureFormat extends SmoMeasureModifierBase implements SmoMeasureFormatParams {
|
|
99
|
-
static get attributes(): string[];
|
|
100
|
-
static get formatAttributes(): string[];
|
|
101
|
-
static get defaultProportionality(): number;
|
|
102
|
-
static get legacyProportionality(): number;
|
|
103
|
-
static fromLegacyMeasure(measure: any): SmoMeasureFormat;
|
|
104
|
-
static get defaults(): SmoMeasureFormatParams;
|
|
105
|
-
customStretch: number;
|
|
106
|
-
proportionality: number;
|
|
107
|
-
systemBreak: boolean;
|
|
108
|
-
pageBreak: boolean;
|
|
109
|
-
restBreak: boolean;
|
|
110
|
-
skipMeasureCount: boolean;
|
|
111
|
-
forceRest: boolean;
|
|
112
|
-
padLeft: number;
|
|
113
|
-
padAllInSystem: boolean;
|
|
114
|
-
autoJustify: boolean;
|
|
115
|
-
measureIndex: number;
|
|
116
|
-
eq(o: SmoMeasureFormatParams): boolean;
|
|
117
|
-
get isDefault(): boolean;
|
|
118
|
-
constructor(parameters: SmoMeasureFormatParams);
|
|
119
|
-
formatMeasure(mm: ISmoMeasureFormatMgr): void;
|
|
120
|
-
serialize(): SmoMeasureFormatParamsSer;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Used to create a {@link SmoBarline}
|
|
124
|
-
* @category SmoObject
|
|
125
|
-
*/
|
|
126
|
-
export interface SmoBarlineParams {
|
|
127
|
-
position: number | null;
|
|
128
|
-
barline: number | null;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* @category serialization
|
|
132
|
-
*/
|
|
133
|
-
export interface SmoBarlineParamsSer extends SmoBarlineParams {
|
|
134
|
-
ctor: string;
|
|
135
|
-
position: number | null;
|
|
136
|
-
barline: number | null;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Barline is just that, there is a start and end in each measure, which defaults to 'single'.
|
|
140
|
-
* @category SmoObject
|
|
141
|
-
*/
|
|
142
|
-
export declare class SmoBarline extends SmoMeasureModifierBase {
|
|
143
|
-
static readonly positions: Record<string, number>;
|
|
144
|
-
static readonly barlines: Record<string, number>;
|
|
145
|
-
static get _barlineToString(): string[];
|
|
146
|
-
static barlineString(inst: SmoBarline): string;
|
|
147
|
-
static get defaults(): SmoBarlineParams;
|
|
148
|
-
static get attributes(): string[];
|
|
149
|
-
serialize(): SmoBarlineParamsSer;
|
|
150
|
-
constructor(parameters: SmoBarlineParams | null);
|
|
151
|
-
barline: number;
|
|
152
|
-
position: number;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Constructor for SmoRepeatSymbol
|
|
156
|
-
* @category SmoObject
|
|
157
|
-
*/
|
|
158
|
-
export interface SmoRepeatSymbolParams {
|
|
159
|
-
/**
|
|
160
|
-
* The symbol enumeration
|
|
161
|
-
*/
|
|
162
|
-
symbol: number;
|
|
163
|
-
/**
|
|
164
|
-
* x offset for DC, sign etc.
|
|
165
|
-
*/
|
|
166
|
-
xOffset: number;
|
|
167
|
-
/**
|
|
168
|
-
* y offset for DC, sign etc.
|
|
169
|
-
*/
|
|
170
|
-
yOffset: number;
|
|
171
|
-
/**
|
|
172
|
-
* position, above or below
|
|
173
|
-
*/
|
|
174
|
-
position: number;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @category serialization
|
|
178
|
-
*/
|
|
179
|
-
export interface SmoRepeatSymbolParamsSer extends SmoRepeatSymbolParams {
|
|
180
|
-
/**
|
|
181
|
-
* constructor
|
|
182
|
-
*/
|
|
183
|
-
ctor: string;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Repeat symbols like DC, Fine etc. Note: voltas are their own thing,
|
|
187
|
-
* and repeats are types of barlines.
|
|
188
|
-
* @category SmoObject
|
|
189
|
-
*/
|
|
190
|
-
export declare class SmoRepeatSymbol extends SmoMeasureModifierBase {
|
|
191
|
-
static readonly symbols: Record<string, number>;
|
|
192
|
-
static readonly _repeatSymbolStrings: Record<number, string>;
|
|
193
|
-
static repeatSymbolString(symbol: SmoRepeatSymbol): string;
|
|
194
|
-
static readonly positions: Record<string, number>;
|
|
195
|
-
static get defaults(): SmoRepeatSymbolParams;
|
|
196
|
-
static get attributes(): string[];
|
|
197
|
-
symbol: number;
|
|
198
|
-
xOffset: number;
|
|
199
|
-
yOffset: number;
|
|
200
|
-
position: number;
|
|
201
|
-
serialize(): SmoRepeatSymbolParamsSer;
|
|
202
|
-
constructor(parameters: SmoRepeatSymbolParams);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Constructor parameters for {@link SmoVolta} (2nd ending)
|
|
206
|
-
* @category SmoObject
|
|
207
|
-
*/
|
|
208
|
-
export interface SmoVoltaParams {
|
|
209
|
-
/**
|
|
210
|
-
* start bar of ending
|
|
211
|
-
*/
|
|
212
|
-
startBar: number;
|
|
213
|
-
/**
|
|
214
|
-
* end bar (how long it stretches)
|
|
215
|
-
*/
|
|
216
|
-
endBar: number;
|
|
217
|
-
/**
|
|
218
|
-
* xoffset for start, for collisions
|
|
219
|
-
*/
|
|
220
|
-
xOffsetStart: number;
|
|
221
|
-
/**
|
|
222
|
-
* xoffset for end, for collisions
|
|
223
|
-
*/
|
|
224
|
-
xOffsetEnd: number;
|
|
225
|
-
/**
|
|
226
|
-
* yOffset, for collisions
|
|
227
|
-
*/
|
|
228
|
-
yOffset: number;
|
|
229
|
-
/**
|
|
230
|
-
* 2nd ending, 3rd etc.
|
|
231
|
-
*/
|
|
232
|
-
number: number;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* serializable bits of volta/endings
|
|
236
|
-
* @category serialization
|
|
237
|
-
*/
|
|
238
|
-
export interface SmoVoltaParamsSer extends SmoVoltaParams {
|
|
239
|
-
/**
|
|
240
|
-
* constructor
|
|
241
|
-
*/
|
|
242
|
-
ctor: string;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Voltas (2nd endings) behave more like staff modifiers, but they are associated with the measure
|
|
246
|
-
* since each measure has it's own rules for displaying part of the volta.
|
|
247
|
-
* @category SmoObject
|
|
248
|
-
*/
|
|
249
|
-
export declare class SmoVolta extends SmoMeasureModifierBase {
|
|
250
|
-
startBar: number;
|
|
251
|
-
endBar: number;
|
|
252
|
-
xOffsetStart: number;
|
|
253
|
-
xOffsetEnd: number;
|
|
254
|
-
yOffset: number;
|
|
255
|
-
number: number;
|
|
256
|
-
endingId: string | null;
|
|
257
|
-
startSelector: SmoSelector | null;
|
|
258
|
-
endSelector: SmoSelector | null;
|
|
259
|
-
elements: ElementLike[];
|
|
260
|
-
constructor(parameters: SmoVoltaParams);
|
|
261
|
-
get id(): string;
|
|
262
|
-
get type(): string;
|
|
263
|
-
static get attributes(): string[];
|
|
264
|
-
static get editableAttributes(): string[];
|
|
265
|
-
serialize(): SmoVoltaParamsSer;
|
|
266
|
-
static get defaults(): SmoVoltaParams;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Constructor parameters for {@link SmoMeasureText}
|
|
270
|
-
* @category SmoObject
|
|
271
|
-
*/
|
|
272
|
-
export interface SmoMeasureTextParams {
|
|
273
|
-
position: number;
|
|
274
|
-
fontInfo: FontInfo;
|
|
275
|
-
text: string;
|
|
276
|
-
adjustX: number;
|
|
277
|
-
adjustY: number;
|
|
278
|
-
justification: number;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Serialized fields of SmoMeasureTextParams
|
|
282
|
-
* @category serialization
|
|
283
|
-
*/
|
|
284
|
-
export interface SmoMeasureTextParamsSer extends SmoMeasureTextParams {
|
|
285
|
-
/**
|
|
286
|
-
* constructor
|
|
287
|
-
*/
|
|
288
|
-
ctor: string;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Measure text is just that. Now that score text can be associated with musical elements, this
|
|
292
|
-
* class has falled into disrepair. It may be used for part notations in the score later.
|
|
293
|
-
* @category SmoObject
|
|
294
|
-
*/
|
|
295
|
-
export declare class SmoMeasureText extends SmoMeasureModifierBase {
|
|
296
|
-
static readonly positions: Record<string, number>;
|
|
297
|
-
static readonly justifications: Record<string, number>;
|
|
298
|
-
static readonly _positionToString: string[];
|
|
299
|
-
static get attributes(): string[];
|
|
300
|
-
static readonly defaults: SmoMeasureTextParams;
|
|
301
|
-
justification: number;
|
|
302
|
-
position: number;
|
|
303
|
-
text: string;
|
|
304
|
-
adjustX: number;
|
|
305
|
-
adjustY: number;
|
|
306
|
-
fontInfo: FontInfo;
|
|
307
|
-
serialize(): SmoMeasureTextParamsSer;
|
|
308
|
-
constructor(parameters: SmoMeasureTextParams | null);
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Used to construct {@link SmoRehearsalMark}
|
|
312
|
-
* @internal
|
|
313
|
-
* */
|
|
314
|
-
export interface SmoRehearsalMarkParams {
|
|
315
|
-
/**
|
|
316
|
-
* cardinal position
|
|
317
|
-
*/
|
|
318
|
-
position: number;
|
|
319
|
-
/**
|
|
320
|
-
* Symbol. by default, letters that auto-increment
|
|
321
|
-
*/
|
|
322
|
-
symbol: string;
|
|
323
|
-
/**
|
|
324
|
-
* future, define how increment works
|
|
325
|
-
*/
|
|
326
|
-
cardinality: string;
|
|
327
|
-
/**
|
|
328
|
-
* disable to make your own symbols for each new one.
|
|
329
|
-
*/
|
|
330
|
-
increment: boolean;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Serialized fields for rehearsal mark
|
|
334
|
-
* @category serialization
|
|
335
|
-
*/
|
|
336
|
-
export interface SmoRehearsalMarkParamsSer extends SmoRehearsalMarkParams {
|
|
337
|
-
/**
|
|
338
|
-
* constructor
|
|
339
|
-
*/
|
|
340
|
-
ctor: string;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Rehearsal marks are some type of auto-incrementing markers on a measure index.
|
|
344
|
-
* @category SmoObject
|
|
345
|
-
*/
|
|
346
|
-
export declare class SmoRehearsalMark extends SmoMeasureModifierBase {
|
|
347
|
-
static readonly cardinalities: Record<string, string>;
|
|
348
|
-
static readonly positions: Record<string, number>;
|
|
349
|
-
static get _positionToString(): string[];
|
|
350
|
-
static get defaults(): SmoRehearsalMarkParams;
|
|
351
|
-
static get attributes(): string[];
|
|
352
|
-
position: number;
|
|
353
|
-
cardinality: string;
|
|
354
|
-
symbol: string;
|
|
355
|
-
increment: boolean;
|
|
356
|
-
getIncrement(): string;
|
|
357
|
-
getInitial(): "a" | "A" | "1";
|
|
358
|
-
serialize(): SmoRehearsalMarkParamsSer;
|
|
359
|
-
constructor(parameters: SmoRehearsalMarkParams);
|
|
360
|
-
}
|
|
361
|
-
export type SmoTempoNumberAttribute = 'bpm' | 'beatDuration' | 'yOffset';
|
|
362
|
-
export type SmoTempoStringAttribute = 'tempoMode' | 'tempoText' | 'customText';
|
|
363
|
-
export type SmoTempoBooleanAttribute = 'display';
|
|
364
|
-
export type SmoTempoMode = 'duration' | 'text' | 'custom';
|
|
365
|
-
/**
|
|
366
|
-
* constructor parameters for {@link SmoTempoText}
|
|
367
|
-
* @category SmoObject
|
|
368
|
-
*/
|
|
369
|
-
export interface SmoTempoTextParams {
|
|
370
|
-
/**
|
|
371
|
-
* text (e.g. Allegro) or bpm
|
|
372
|
-
*/
|
|
373
|
-
tempoMode: string;
|
|
374
|
-
/**
|
|
375
|
-
* playback bpm
|
|
376
|
-
*/
|
|
377
|
-
bpm: number;
|
|
378
|
-
/**
|
|
379
|
-
* note type for a metronome beat
|
|
380
|
-
*/
|
|
381
|
-
beatDuration: number;
|
|
382
|
-
/**
|
|
383
|
-
* if text mode, the text
|
|
384
|
-
*/
|
|
385
|
-
tempoText: string;
|
|
386
|
-
/**
|
|
387
|
-
* move the text to keep it from colliding with other things
|
|
388
|
-
*/
|
|
389
|
-
yOffset: number;
|
|
390
|
-
/**
|
|
391
|
-
* indicate if we are displaying, false if only affects playback
|
|
392
|
-
*/
|
|
393
|
-
display: boolean;
|
|
394
|
-
/**
|
|
395
|
-
* text taht is not a standards notation
|
|
396
|
-
*/
|
|
397
|
-
customText: string;
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* serialized tempo parameters
|
|
401
|
-
* @category serialization
|
|
402
|
-
*/
|
|
403
|
-
export interface SmoTempoTextParamsSer extends SmoTempoTextParams {
|
|
404
|
-
ctor: string;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* @internal
|
|
408
|
-
*/
|
|
409
|
-
export interface VexTempoTextParams {
|
|
410
|
-
duration?: string;
|
|
411
|
-
dots?: number;
|
|
412
|
-
bpm?: number;
|
|
413
|
-
name?: string;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Information about both playback tempo and how the tempo is notated.
|
|
417
|
-
* @category SmoObject
|
|
418
|
-
*/
|
|
419
|
-
export declare class SmoTempoText extends SmoMeasureModifierBase implements SmoTempoTextParams {
|
|
420
|
-
static get tempoModes(): Record<string, SmoTempoMode>;
|
|
421
|
-
static get tempoTexts(): Record<string, string>;
|
|
422
|
-
/**
|
|
423
|
-
* create defaults for tempo initialization
|
|
424
|
-
*/
|
|
425
|
-
static get defaults(): SmoTempoTextParams;
|
|
426
|
-
static get attributes(): string[];
|
|
427
|
-
tempoMode: SmoTempoMode;
|
|
428
|
-
bpm: number;
|
|
429
|
-
beatDuration: number;
|
|
430
|
-
tempoText: string;
|
|
431
|
-
yOffset: number;
|
|
432
|
-
display: boolean;
|
|
433
|
-
customText: string;
|
|
434
|
-
_toVexTextTempo(): VexTempoTextParams;
|
|
435
|
-
/**
|
|
436
|
-
* Return equality wrt the tempo marking, e.g. 2 allegro in textMode will be equal but
|
|
437
|
-
* an allegro and duration 120bpm will not.
|
|
438
|
-
* @param t1
|
|
439
|
-
* @param t2
|
|
440
|
-
* @returns
|
|
441
|
-
*/
|
|
442
|
-
static eq(t1: SmoTempoText, t2: SmoTempoText): boolean;
|
|
443
|
-
static get bpmFromText(): Record<string, number>;
|
|
444
|
-
_toVexDurationTempo(): VexTempoTextParams;
|
|
445
|
-
toVexTempo(): VexTempoTextParams;
|
|
446
|
-
serialize(): SmoTempoTextParamsSer;
|
|
447
|
-
constructor(parameters: SmoTempoTextParams | null);
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Constructor parameters for a time signature
|
|
451
|
-
* @category SmoObject
|
|
452
|
-
*/
|
|
453
|
-
export interface TimeSignatureParameters {
|
|
454
|
-
/**
|
|
455
|
-
* numerator
|
|
456
|
-
*/
|
|
457
|
-
actualBeats: number;
|
|
458
|
-
/**
|
|
459
|
-
* denominator, always power of 2
|
|
460
|
-
*/
|
|
461
|
-
beatDuration: number;
|
|
462
|
-
/**
|
|
463
|
-
* indicates cut time/common time
|
|
464
|
-
*/
|
|
465
|
-
useSymbol: boolean;
|
|
466
|
-
/**
|
|
467
|
-
* display, else just affects measure lengths.
|
|
468
|
-
*/
|
|
469
|
-
display: boolean;
|
|
470
|
-
/**
|
|
471
|
-
* for pickups, display the non-pickup value
|
|
472
|
-
*/
|
|
473
|
-
displayString: string;
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* serialized time signature
|
|
477
|
-
* @category serialization
|
|
478
|
-
*/
|
|
479
|
-
export interface TimeSignatureParametersSer extends TimeSignatureParameters {
|
|
480
|
-
/**
|
|
481
|
-
* constructor
|
|
482
|
-
*/
|
|
483
|
-
ctor: string;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Time signatures contain duration information for a measure, and information
|
|
487
|
-
* about the display of the time signature.
|
|
488
|
-
* @category SmoObject
|
|
489
|
-
*/
|
|
490
|
-
export declare class TimeSignature extends SmoMeasureModifierBase {
|
|
491
|
-
static get defaults(): TimeSignatureParameters;
|
|
492
|
-
static equal(ts1: TimeSignature, ts2: TimeSignature): boolean;
|
|
493
|
-
static createFromPartial(value: Partial<TimeSignatureParameters>): TimeSignature;
|
|
494
|
-
actualBeats: number;
|
|
495
|
-
beatDuration: number;
|
|
496
|
-
useSymbol: boolean;
|
|
497
|
-
display: boolean;
|
|
498
|
-
displayString: string;
|
|
499
|
-
get timeSignature(): string;
|
|
500
|
-
static get parameters(): string[];
|
|
501
|
-
static get boolParameters(): never[];
|
|
502
|
-
set timeSignature(value: string);
|
|
503
|
-
serialize(): TimeSignatureParametersSer;
|
|
504
|
-
constructor(params: TimeSignatureParameters);
|
|
505
|
-
}
|
|
506
|
-
export declare const measureModifierDynamicCtorInit: () => void;
|
|
1
|
+
import { SmoAttrs, MeasureNumber, SmoObjectParams, SvgBox, SmoModifierBase, ElementLike } from './common';
|
|
2
|
+
import { SmoSelector } from '../xform/selections';
|
|
3
|
+
import { FontInfo } from '../../common/vex';
|
|
4
|
+
/**
|
|
5
|
+
* Measure modifiers are attached to the measure itself. Each instance has a
|
|
6
|
+
* `serialize()` method and a `ctor` attribute for deserialization.
|
|
7
|
+
* @category SmoObject
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class SmoMeasureModifierBase implements SmoModifierBase {
|
|
10
|
+
attrs: SmoAttrs;
|
|
11
|
+
ctor: string;
|
|
12
|
+
logicalBox: SvgBox | null;
|
|
13
|
+
constructor(ctor: string);
|
|
14
|
+
static deserialize(jsonObj: SmoObjectParams): any;
|
|
15
|
+
abstract serialize(): any;
|
|
16
|
+
}
|
|
17
|
+
export type SmoMeasureFormatNumberAttributes = 'customStretch' | 'proportionality' | 'padLeft' | 'measureIndex';
|
|
18
|
+
export declare const SmoMeasureFormatNumberKeys: SmoMeasureFormatNumberAttributes[];
|
|
19
|
+
export type SmoMeasueFormatBooleanAttributes = 'autoJustify' | 'systemBreak' | 'skipMeasureCount' | 'pageBreak' | 'padAllInSystem' | 'restBreak' | 'forceRest';
|
|
20
|
+
export declare const SmoMeasureFormatBooleanKeys: SmoMeasueFormatBooleanAttributes[];
|
|
21
|
+
/**
|
|
22
|
+
* Constructor parameter for measure formatting object
|
|
23
|
+
* @category SmoObject
|
|
24
|
+
*/
|
|
25
|
+
export interface SmoMeasureFormatParams {
|
|
26
|
+
/**
|
|
27
|
+
* additional pixels to a measure (plus or minus)
|
|
28
|
+
*/
|
|
29
|
+
customStretch: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* softmax factor, controls how tightly rhythms are formatted
|
|
32
|
+
*/
|
|
33
|
+
proportionality: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* break justification for this column
|
|
36
|
+
*/
|
|
37
|
+
autoJustify: boolean | null;
|
|
38
|
+
/**
|
|
39
|
+
* create a new system before this measure
|
|
40
|
+
*/
|
|
41
|
+
systemBreak: boolean | null;
|
|
42
|
+
/**
|
|
43
|
+
* create a new system before this page
|
|
44
|
+
*/
|
|
45
|
+
pageBreak: boolean | null;
|
|
46
|
+
/**
|
|
47
|
+
* force a break in multi-measure rest
|
|
48
|
+
*/
|
|
49
|
+
restBreak: boolean | null;
|
|
50
|
+
/**
|
|
51
|
+
* treat this measure like a whole rest
|
|
52
|
+
*/
|
|
53
|
+
forceRest: boolean | null;
|
|
54
|
+
/**
|
|
55
|
+
* if score is grouping measures per system, skip this measure in the count
|
|
56
|
+
* (used for short measures, or pickups)
|
|
57
|
+
*/
|
|
58
|
+
skipMeasureCount: boolean | null;
|
|
59
|
+
/**
|
|
60
|
+
* pad left, e.g. for the first stave in a system
|
|
61
|
+
*/
|
|
62
|
+
padLeft: number | null;
|
|
63
|
+
/**
|
|
64
|
+
* if padding left, pad all the measures in the column
|
|
65
|
+
*/
|
|
66
|
+
padAllInSystem: boolean | null;
|
|
67
|
+
/**
|
|
68
|
+
* renumber measures
|
|
69
|
+
*/
|
|
70
|
+
measureIndex: number | null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Serialization for measure formatting customization, like system break
|
|
74
|
+
* @category serialization
|
|
75
|
+
*/
|
|
76
|
+
export interface SmoMeasureFormatParamsSer extends SmoMeasureFormatParams {
|
|
77
|
+
/**
|
|
78
|
+
* class name for deserialization
|
|
79
|
+
*/
|
|
80
|
+
ctor: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* ISmoMeasureFormatMgr is the DI interface to the
|
|
84
|
+
* format manager. Measure formats are often the same to multiple measures
|
|
85
|
+
* so we don't serialize each one - instead we map them with this interface
|
|
86
|
+
* @category SmoObject
|
|
87
|
+
*/
|
|
88
|
+
export interface ISmoMeasureFormatMgr {
|
|
89
|
+
format: SmoMeasureFormatParams;
|
|
90
|
+
measureNumber: MeasureNumber;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Measure format holds parameters about the automatic formatting of the measure itself, such as the witch and
|
|
94
|
+
* how the durations are proportioned. Note that measure formatting is also controlled by the justification
|
|
95
|
+
* between voices and staves. For instance, 2 measures in different staves will have to have the same width
|
|
96
|
+
* @category SmoObject
|
|
97
|
+
*/
|
|
98
|
+
export declare class SmoMeasureFormat extends SmoMeasureModifierBase implements SmoMeasureFormatParams {
|
|
99
|
+
static get attributes(): string[];
|
|
100
|
+
static get formatAttributes(): string[];
|
|
101
|
+
static get defaultProportionality(): number;
|
|
102
|
+
static get legacyProportionality(): number;
|
|
103
|
+
static fromLegacyMeasure(measure: any): SmoMeasureFormat;
|
|
104
|
+
static get defaults(): SmoMeasureFormatParams;
|
|
105
|
+
customStretch: number;
|
|
106
|
+
proportionality: number;
|
|
107
|
+
systemBreak: boolean;
|
|
108
|
+
pageBreak: boolean;
|
|
109
|
+
restBreak: boolean;
|
|
110
|
+
skipMeasureCount: boolean;
|
|
111
|
+
forceRest: boolean;
|
|
112
|
+
padLeft: number;
|
|
113
|
+
padAllInSystem: boolean;
|
|
114
|
+
autoJustify: boolean;
|
|
115
|
+
measureIndex: number;
|
|
116
|
+
eq(o: SmoMeasureFormatParams): boolean;
|
|
117
|
+
get isDefault(): boolean;
|
|
118
|
+
constructor(parameters: SmoMeasureFormatParams);
|
|
119
|
+
formatMeasure(mm: ISmoMeasureFormatMgr): void;
|
|
120
|
+
serialize(): SmoMeasureFormatParamsSer;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Used to create a {@link SmoBarline}
|
|
124
|
+
* @category SmoObject
|
|
125
|
+
*/
|
|
126
|
+
export interface SmoBarlineParams {
|
|
127
|
+
position: number | null;
|
|
128
|
+
barline: number | null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @category serialization
|
|
132
|
+
*/
|
|
133
|
+
export interface SmoBarlineParamsSer extends SmoBarlineParams {
|
|
134
|
+
ctor: string;
|
|
135
|
+
position: number | null;
|
|
136
|
+
barline: number | null;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Barline is just that, there is a start and end in each measure, which defaults to 'single'.
|
|
140
|
+
* @category SmoObject
|
|
141
|
+
*/
|
|
142
|
+
export declare class SmoBarline extends SmoMeasureModifierBase {
|
|
143
|
+
static readonly positions: Record<string, number>;
|
|
144
|
+
static readonly barlines: Record<string, number>;
|
|
145
|
+
static get _barlineToString(): string[];
|
|
146
|
+
static barlineString(inst: SmoBarline): string;
|
|
147
|
+
static get defaults(): SmoBarlineParams;
|
|
148
|
+
static get attributes(): string[];
|
|
149
|
+
serialize(): SmoBarlineParamsSer;
|
|
150
|
+
constructor(parameters: SmoBarlineParams | null);
|
|
151
|
+
barline: number;
|
|
152
|
+
position: number;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Constructor for SmoRepeatSymbol
|
|
156
|
+
* @category SmoObject
|
|
157
|
+
*/
|
|
158
|
+
export interface SmoRepeatSymbolParams {
|
|
159
|
+
/**
|
|
160
|
+
* The symbol enumeration
|
|
161
|
+
*/
|
|
162
|
+
symbol: number;
|
|
163
|
+
/**
|
|
164
|
+
* x offset for DC, sign etc.
|
|
165
|
+
*/
|
|
166
|
+
xOffset: number;
|
|
167
|
+
/**
|
|
168
|
+
* y offset for DC, sign etc.
|
|
169
|
+
*/
|
|
170
|
+
yOffset: number;
|
|
171
|
+
/**
|
|
172
|
+
* position, above or below
|
|
173
|
+
*/
|
|
174
|
+
position: number;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @category serialization
|
|
178
|
+
*/
|
|
179
|
+
export interface SmoRepeatSymbolParamsSer extends SmoRepeatSymbolParams {
|
|
180
|
+
/**
|
|
181
|
+
* constructor
|
|
182
|
+
*/
|
|
183
|
+
ctor: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Repeat symbols like DC, Fine etc. Note: voltas are their own thing,
|
|
187
|
+
* and repeats are types of barlines.
|
|
188
|
+
* @category SmoObject
|
|
189
|
+
*/
|
|
190
|
+
export declare class SmoRepeatSymbol extends SmoMeasureModifierBase {
|
|
191
|
+
static readonly symbols: Record<string, number>;
|
|
192
|
+
static readonly _repeatSymbolStrings: Record<number, string>;
|
|
193
|
+
static repeatSymbolString(symbol: SmoRepeatSymbol): string;
|
|
194
|
+
static readonly positions: Record<string, number>;
|
|
195
|
+
static get defaults(): SmoRepeatSymbolParams;
|
|
196
|
+
static get attributes(): string[];
|
|
197
|
+
symbol: number;
|
|
198
|
+
xOffset: number;
|
|
199
|
+
yOffset: number;
|
|
200
|
+
position: number;
|
|
201
|
+
serialize(): SmoRepeatSymbolParamsSer;
|
|
202
|
+
constructor(parameters: SmoRepeatSymbolParams);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Constructor parameters for {@link SmoVolta} (2nd ending)
|
|
206
|
+
* @category SmoObject
|
|
207
|
+
*/
|
|
208
|
+
export interface SmoVoltaParams {
|
|
209
|
+
/**
|
|
210
|
+
* start bar of ending
|
|
211
|
+
*/
|
|
212
|
+
startBar: number;
|
|
213
|
+
/**
|
|
214
|
+
* end bar (how long it stretches)
|
|
215
|
+
*/
|
|
216
|
+
endBar: number;
|
|
217
|
+
/**
|
|
218
|
+
* xoffset for start, for collisions
|
|
219
|
+
*/
|
|
220
|
+
xOffsetStart: number;
|
|
221
|
+
/**
|
|
222
|
+
* xoffset for end, for collisions
|
|
223
|
+
*/
|
|
224
|
+
xOffsetEnd: number;
|
|
225
|
+
/**
|
|
226
|
+
* yOffset, for collisions
|
|
227
|
+
*/
|
|
228
|
+
yOffset: number;
|
|
229
|
+
/**
|
|
230
|
+
* 2nd ending, 3rd etc.
|
|
231
|
+
*/
|
|
232
|
+
number: number;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* serializable bits of volta/endings
|
|
236
|
+
* @category serialization
|
|
237
|
+
*/
|
|
238
|
+
export interface SmoVoltaParamsSer extends SmoVoltaParams {
|
|
239
|
+
/**
|
|
240
|
+
* constructor
|
|
241
|
+
*/
|
|
242
|
+
ctor: string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Voltas (2nd endings) behave more like staff modifiers, but they are associated with the measure
|
|
246
|
+
* since each measure has it's own rules for displaying part of the volta.
|
|
247
|
+
* @category SmoObject
|
|
248
|
+
*/
|
|
249
|
+
export declare class SmoVolta extends SmoMeasureModifierBase {
|
|
250
|
+
startBar: number;
|
|
251
|
+
endBar: number;
|
|
252
|
+
xOffsetStart: number;
|
|
253
|
+
xOffsetEnd: number;
|
|
254
|
+
yOffset: number;
|
|
255
|
+
number: number;
|
|
256
|
+
endingId: string | null;
|
|
257
|
+
startSelector: SmoSelector | null;
|
|
258
|
+
endSelector: SmoSelector | null;
|
|
259
|
+
elements: ElementLike[];
|
|
260
|
+
constructor(parameters: SmoVoltaParams);
|
|
261
|
+
get id(): string;
|
|
262
|
+
get type(): string;
|
|
263
|
+
static get attributes(): string[];
|
|
264
|
+
static get editableAttributes(): string[];
|
|
265
|
+
serialize(): SmoVoltaParamsSer;
|
|
266
|
+
static get defaults(): SmoVoltaParams;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Constructor parameters for {@link SmoMeasureText}
|
|
270
|
+
* @category SmoObject
|
|
271
|
+
*/
|
|
272
|
+
export interface SmoMeasureTextParams {
|
|
273
|
+
position: number;
|
|
274
|
+
fontInfo: FontInfo;
|
|
275
|
+
text: string;
|
|
276
|
+
adjustX: number;
|
|
277
|
+
adjustY: number;
|
|
278
|
+
justification: number;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Serialized fields of SmoMeasureTextParams
|
|
282
|
+
* @category serialization
|
|
283
|
+
*/
|
|
284
|
+
export interface SmoMeasureTextParamsSer extends SmoMeasureTextParams {
|
|
285
|
+
/**
|
|
286
|
+
* constructor
|
|
287
|
+
*/
|
|
288
|
+
ctor: string;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Measure text is just that. Now that score text can be associated with musical elements, this
|
|
292
|
+
* class has falled into disrepair. It may be used for part notations in the score later.
|
|
293
|
+
* @category SmoObject
|
|
294
|
+
*/
|
|
295
|
+
export declare class SmoMeasureText extends SmoMeasureModifierBase {
|
|
296
|
+
static readonly positions: Record<string, number>;
|
|
297
|
+
static readonly justifications: Record<string, number>;
|
|
298
|
+
static readonly _positionToString: string[];
|
|
299
|
+
static get attributes(): string[];
|
|
300
|
+
static readonly defaults: SmoMeasureTextParams;
|
|
301
|
+
justification: number;
|
|
302
|
+
position: number;
|
|
303
|
+
text: string;
|
|
304
|
+
adjustX: number;
|
|
305
|
+
adjustY: number;
|
|
306
|
+
fontInfo: FontInfo;
|
|
307
|
+
serialize(): SmoMeasureTextParamsSer;
|
|
308
|
+
constructor(parameters: SmoMeasureTextParams | null);
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Used to construct {@link SmoRehearsalMark}
|
|
312
|
+
* @internal
|
|
313
|
+
* */
|
|
314
|
+
export interface SmoRehearsalMarkParams {
|
|
315
|
+
/**
|
|
316
|
+
* cardinal position
|
|
317
|
+
*/
|
|
318
|
+
position: number;
|
|
319
|
+
/**
|
|
320
|
+
* Symbol. by default, letters that auto-increment
|
|
321
|
+
*/
|
|
322
|
+
symbol: string;
|
|
323
|
+
/**
|
|
324
|
+
* future, define how increment works
|
|
325
|
+
*/
|
|
326
|
+
cardinality: string;
|
|
327
|
+
/**
|
|
328
|
+
* disable to make your own symbols for each new one.
|
|
329
|
+
*/
|
|
330
|
+
increment: boolean;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Serialized fields for rehearsal mark
|
|
334
|
+
* @category serialization
|
|
335
|
+
*/
|
|
336
|
+
export interface SmoRehearsalMarkParamsSer extends SmoRehearsalMarkParams {
|
|
337
|
+
/**
|
|
338
|
+
* constructor
|
|
339
|
+
*/
|
|
340
|
+
ctor: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Rehearsal marks are some type of auto-incrementing markers on a measure index.
|
|
344
|
+
* @category SmoObject
|
|
345
|
+
*/
|
|
346
|
+
export declare class SmoRehearsalMark extends SmoMeasureModifierBase {
|
|
347
|
+
static readonly cardinalities: Record<string, string>;
|
|
348
|
+
static readonly positions: Record<string, number>;
|
|
349
|
+
static get _positionToString(): string[];
|
|
350
|
+
static get defaults(): SmoRehearsalMarkParams;
|
|
351
|
+
static get attributes(): string[];
|
|
352
|
+
position: number;
|
|
353
|
+
cardinality: string;
|
|
354
|
+
symbol: string;
|
|
355
|
+
increment: boolean;
|
|
356
|
+
getIncrement(): string;
|
|
357
|
+
getInitial(): "a" | "A" | "1";
|
|
358
|
+
serialize(): SmoRehearsalMarkParamsSer;
|
|
359
|
+
constructor(parameters: SmoRehearsalMarkParams);
|
|
360
|
+
}
|
|
361
|
+
export type SmoTempoNumberAttribute = 'bpm' | 'beatDuration' | 'yOffset';
|
|
362
|
+
export type SmoTempoStringAttribute = 'tempoMode' | 'tempoText' | 'customText';
|
|
363
|
+
export type SmoTempoBooleanAttribute = 'display';
|
|
364
|
+
export type SmoTempoMode = 'duration' | 'text' | 'custom';
|
|
365
|
+
/**
|
|
366
|
+
* constructor parameters for {@link SmoTempoText}
|
|
367
|
+
* @category SmoObject
|
|
368
|
+
*/
|
|
369
|
+
export interface SmoTempoTextParams {
|
|
370
|
+
/**
|
|
371
|
+
* text (e.g. Allegro) or bpm
|
|
372
|
+
*/
|
|
373
|
+
tempoMode: string;
|
|
374
|
+
/**
|
|
375
|
+
* playback bpm
|
|
376
|
+
*/
|
|
377
|
+
bpm: number;
|
|
378
|
+
/**
|
|
379
|
+
* note type for a metronome beat
|
|
380
|
+
*/
|
|
381
|
+
beatDuration: number;
|
|
382
|
+
/**
|
|
383
|
+
* if text mode, the text
|
|
384
|
+
*/
|
|
385
|
+
tempoText: string;
|
|
386
|
+
/**
|
|
387
|
+
* move the text to keep it from colliding with other things
|
|
388
|
+
*/
|
|
389
|
+
yOffset: number;
|
|
390
|
+
/**
|
|
391
|
+
* indicate if we are displaying, false if only affects playback
|
|
392
|
+
*/
|
|
393
|
+
display: boolean;
|
|
394
|
+
/**
|
|
395
|
+
* text taht is not a standards notation
|
|
396
|
+
*/
|
|
397
|
+
customText: string;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* serialized tempo parameters
|
|
401
|
+
* @category serialization
|
|
402
|
+
*/
|
|
403
|
+
export interface SmoTempoTextParamsSer extends SmoTempoTextParams {
|
|
404
|
+
ctor: string;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* @internal
|
|
408
|
+
*/
|
|
409
|
+
export interface VexTempoTextParams {
|
|
410
|
+
duration?: string;
|
|
411
|
+
dots?: number;
|
|
412
|
+
bpm?: number;
|
|
413
|
+
name?: string;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Information about both playback tempo and how the tempo is notated.
|
|
417
|
+
* @category SmoObject
|
|
418
|
+
*/
|
|
419
|
+
export declare class SmoTempoText extends SmoMeasureModifierBase implements SmoTempoTextParams {
|
|
420
|
+
static get tempoModes(): Record<string, SmoTempoMode>;
|
|
421
|
+
static get tempoTexts(): Record<string, string>;
|
|
422
|
+
/**
|
|
423
|
+
* create defaults for tempo initialization
|
|
424
|
+
*/
|
|
425
|
+
static get defaults(): SmoTempoTextParams;
|
|
426
|
+
static get attributes(): string[];
|
|
427
|
+
tempoMode: SmoTempoMode;
|
|
428
|
+
bpm: number;
|
|
429
|
+
beatDuration: number;
|
|
430
|
+
tempoText: string;
|
|
431
|
+
yOffset: number;
|
|
432
|
+
display: boolean;
|
|
433
|
+
customText: string;
|
|
434
|
+
_toVexTextTempo(): VexTempoTextParams;
|
|
435
|
+
/**
|
|
436
|
+
* Return equality wrt the tempo marking, e.g. 2 allegro in textMode will be equal but
|
|
437
|
+
* an allegro and duration 120bpm will not.
|
|
438
|
+
* @param t1
|
|
439
|
+
* @param t2
|
|
440
|
+
* @returns
|
|
441
|
+
*/
|
|
442
|
+
static eq(t1: SmoTempoText, t2: SmoTempoText): boolean;
|
|
443
|
+
static get bpmFromText(): Record<string, number>;
|
|
444
|
+
_toVexDurationTempo(): VexTempoTextParams;
|
|
445
|
+
toVexTempo(): VexTempoTextParams;
|
|
446
|
+
serialize(): SmoTempoTextParamsSer;
|
|
447
|
+
constructor(parameters: SmoTempoTextParams | null);
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Constructor parameters for a time signature
|
|
451
|
+
* @category SmoObject
|
|
452
|
+
*/
|
|
453
|
+
export interface TimeSignatureParameters {
|
|
454
|
+
/**
|
|
455
|
+
* numerator
|
|
456
|
+
*/
|
|
457
|
+
actualBeats: number;
|
|
458
|
+
/**
|
|
459
|
+
* denominator, always power of 2
|
|
460
|
+
*/
|
|
461
|
+
beatDuration: number;
|
|
462
|
+
/**
|
|
463
|
+
* indicates cut time/common time
|
|
464
|
+
*/
|
|
465
|
+
useSymbol: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* display, else just affects measure lengths.
|
|
468
|
+
*/
|
|
469
|
+
display: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* for pickups, display the non-pickup value
|
|
472
|
+
*/
|
|
473
|
+
displayString: string;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* serialized time signature
|
|
477
|
+
* @category serialization
|
|
478
|
+
*/
|
|
479
|
+
export interface TimeSignatureParametersSer extends TimeSignatureParameters {
|
|
480
|
+
/**
|
|
481
|
+
* constructor
|
|
482
|
+
*/
|
|
483
|
+
ctor: string;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Time signatures contain duration information for a measure, and information
|
|
487
|
+
* about the display of the time signature.
|
|
488
|
+
* @category SmoObject
|
|
489
|
+
*/
|
|
490
|
+
export declare class TimeSignature extends SmoMeasureModifierBase {
|
|
491
|
+
static get defaults(): TimeSignatureParameters;
|
|
492
|
+
static equal(ts1: TimeSignature, ts2: TimeSignature): boolean;
|
|
493
|
+
static createFromPartial(value: Partial<TimeSignatureParameters>): TimeSignature;
|
|
494
|
+
actualBeats: number;
|
|
495
|
+
beatDuration: number;
|
|
496
|
+
useSymbol: boolean;
|
|
497
|
+
display: boolean;
|
|
498
|
+
displayString: string;
|
|
499
|
+
get timeSignature(): string;
|
|
500
|
+
static get parameters(): string[];
|
|
501
|
+
static get boolParameters(): never[];
|
|
502
|
+
set timeSignature(value: string);
|
|
503
|
+
serialize(): TimeSignatureParametersSer;
|
|
504
|
+
constructor(params: TimeSignatureParameters);
|
|
505
|
+
}
|
|
506
|
+
export declare const measureModifierDynamicCtorInit: () => void;
|