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,767 +1,767 @@
|
|
|
1
|
-
import { SmoSelector } from '../xform/selections';
|
|
2
|
-
import { SmoNote } from './note';
|
|
3
|
-
import { SmoAttrs, SvgPoint, SmoObjectParams, Clef, SvgBox, SmoModifierBase, Pitch, ElementLike } from './common';
|
|
4
|
-
import { SmoTabNote, SmoFretPosition } from './noteModifiers';
|
|
5
|
-
/**
|
|
6
|
-
* Base class that mostly standardizes the interface and deals with serialization.
|
|
7
|
-
* @param ctor constructor for derived class
|
|
8
|
-
* @param logicalBox bounding box in SVG coordinates, if rendered
|
|
9
|
-
* @param attrs object identification
|
|
10
|
-
* @param startSelector where the modifier starts
|
|
11
|
-
* @param endSelector where it ends
|
|
12
|
-
* @category SmoObject
|
|
13
|
-
* */
|
|
14
|
-
export declare abstract class StaffModifierBase implements SmoModifierBase {
|
|
15
|
-
attrs: SmoAttrs;
|
|
16
|
-
ctor: string;
|
|
17
|
-
associatedStaff: number;
|
|
18
|
-
startSelector: SmoSelector;
|
|
19
|
-
endSelector: SmoSelector;
|
|
20
|
-
logicalBox: SvgBox | null;
|
|
21
|
-
element: ElementLike;
|
|
22
|
-
constructor(ctor: string);
|
|
23
|
-
static deserialize(params: SmoObjectParams): any;
|
|
24
|
-
static cloneWithId(o: StaffModifierBase): any;
|
|
25
|
-
serializeWithId(): any;
|
|
26
|
-
abstract serialize(): any;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @category serialization
|
|
30
|
-
*/
|
|
31
|
-
export interface StaffModifierBaseSer {
|
|
32
|
-
attrs: SmoAttrs;
|
|
33
|
-
ctor: string;
|
|
34
|
-
associatedStaff: number;
|
|
35
|
-
startSelector: SmoSelector;
|
|
36
|
-
endSelector: SmoSelector;
|
|
37
|
-
}
|
|
38
|
-
export type SoundSustain = 'percussive' | 'sustained';
|
|
39
|
-
export type oscillatorType = 'sample' | 'sine' | 'sawtooth' | 'square' | 'triangle' | 'custom';
|
|
40
|
-
export type oscillatorOptions = 'plucked' | 'bowed' | 'muted' | 'accented' | 'frequency-sweep' | 'na';
|
|
41
|
-
/**
|
|
42
|
-
* Parameters of an instrument used to create audio nodes
|
|
43
|
-
* @category SmoObject
|
|
44
|
-
*/
|
|
45
|
-
export interface SmoOscillatorInfo {
|
|
46
|
-
waveform: oscillatorType;
|
|
47
|
-
sustain: SoundSustain;
|
|
48
|
-
realOvertones: number[];
|
|
49
|
-
imaginaryOvertones: number[];
|
|
50
|
-
sample: string | null;
|
|
51
|
-
family: string;
|
|
52
|
-
instrument: string;
|
|
53
|
-
nativeFrequency: number;
|
|
54
|
-
dynamic: number;
|
|
55
|
-
options: oscillatorOptions[];
|
|
56
|
-
minDuration: number;
|
|
57
|
-
maxDuration: number;
|
|
58
|
-
}
|
|
59
|
-
export type SmoOscillatorInfoNumberType = 'minDuration' | 'maxDuration' | 'dynamic' | 'nativeFrequency';
|
|
60
|
-
export type SmoOscillatorInfoNumberArType = 'realOvertones' | 'imaginaryOvertones';
|
|
61
|
-
export type SmoOscillatorInfoStringType = 'family';
|
|
62
|
-
export type SmoOscillatorInfoStringNullType = 'sample';
|
|
63
|
-
export type SmoOscillatorInfoWaveformType = 'waveform';
|
|
64
|
-
export type SmoOscillatorInfoSustainType = 'sustain';
|
|
65
|
-
export type SmoOscillatorInfoOptionsType = 'options';
|
|
66
|
-
export declare const SmoOscillatorInfoAllTypes: string[];
|
|
67
|
-
export type SmoOscillatorAnyType = SmoOscillatorInfoNumberType | SmoOscillatorInfoNumberArType | SmoOscillatorInfoStringType | SmoOscillatorInfoStringNullType | oscillatorType | SoundSustain;
|
|
68
|
-
/**
|
|
69
|
-
* Define an instrument. An instrument is associated with a part, but a part can have instrument changes
|
|
70
|
-
* and thus contain multiple instruments at different points in the score.
|
|
71
|
-
* Not all of these parameters are fully utilized yet, and there are plans to greatly expand what
|
|
72
|
-
* an SmoInstrument is. Note I may move this to PartInfo module.
|
|
73
|
-
* @category SmoObject
|
|
74
|
-
*/
|
|
75
|
-
export interface SmoInstrumentParams {
|
|
76
|
-
/**
|
|
77
|
-
* where instrument starts to take effect
|
|
78
|
-
*/
|
|
79
|
-
startSelector: SmoSelector;
|
|
80
|
-
/**
|
|
81
|
-
* where instrument changes
|
|
82
|
-
*/
|
|
83
|
-
endSelector: SmoSelector;
|
|
84
|
-
/**
|
|
85
|
-
* name, for metadata
|
|
86
|
-
*/
|
|
87
|
-
instrumentName: string;
|
|
88
|
-
/**
|
|
89
|
-
* woodwind, brass etc.
|
|
90
|
-
*/
|
|
91
|
-
family: string;
|
|
92
|
-
/**
|
|
93
|
-
* instrument sample
|
|
94
|
-
*/
|
|
95
|
-
instrument: string;
|
|
96
|
-
/**
|
|
97
|
-
* abbreviation for score
|
|
98
|
-
*/
|
|
99
|
-
abbreviation: string;
|
|
100
|
-
/**
|
|
101
|
-
* -2 indicates key of Bb
|
|
102
|
-
*/
|
|
103
|
-
keyOffset: number;
|
|
104
|
-
usePercussionNoteheads: boolean;
|
|
105
|
-
percussionMap: Record<number, number>;
|
|
106
|
-
/**
|
|
107
|
-
* for future
|
|
108
|
-
*/
|
|
109
|
-
midiInstrument: number;
|
|
110
|
-
/**
|
|
111
|
-
* for future
|
|
112
|
-
*/
|
|
113
|
-
midichannel: number;
|
|
114
|
-
/**
|
|
115
|
-
* for future
|
|
116
|
-
*/
|
|
117
|
-
midiport: number;
|
|
118
|
-
/**
|
|
119
|
-
* default clef
|
|
120
|
-
*/
|
|
121
|
-
clef: Clef;
|
|
122
|
-
/**
|
|
123
|
-
* future, can be used to set sample
|
|
124
|
-
*/
|
|
125
|
-
mutes?: string;
|
|
126
|
-
lines: number;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Serialization of instrument-specific settings, such as sound and key
|
|
130
|
-
* @category serialization
|
|
131
|
-
*/
|
|
132
|
-
export interface SmoInstrumentParamsSer extends SmoInstrumentParams {
|
|
133
|
-
/**
|
|
134
|
-
* constructor
|
|
135
|
-
*/
|
|
136
|
-
ctor: string;
|
|
137
|
-
}
|
|
138
|
-
export type SmoInstrumentNumParamType = 'keyOffset' | 'midichannel' | 'midiport' | 'midiInstrument' | 'lines';
|
|
139
|
-
export declare const SmoInstrumentNumParams: SmoInstrumentNumParamType[];
|
|
140
|
-
export type SmoInstrumentStringParamType = 'instrumentName' | 'abbreviation' | 'family' | 'instrument' | 'clef';
|
|
141
|
-
export declare const SmoInstrumentStringParams: SmoInstrumentStringParamType[];
|
|
142
|
-
export type SmoInstrumentBooleanParamType = 'usePercussionNoteheads';
|
|
143
|
-
export declare const SmoInstrumentBooleanParams: SmoInstrumentBooleanParamType[];
|
|
144
|
-
/**
|
|
145
|
-
* Define an instrument. An instrument is associated with a part, but a part can have instrument changes
|
|
146
|
-
* and thus contain multiple instruments at different points in the score.
|
|
147
|
-
* Not all of these parameters are fully utilized yet, and there are plans to greatly expand what
|
|
148
|
-
* an SmoInstrument is. Note I may move this to PartInfo module.
|
|
149
|
-
* @category SmoObject
|
|
150
|
-
*/
|
|
151
|
-
export declare class SmoInstrument extends StaffModifierBase {
|
|
152
|
-
static get attributes(): string[];
|
|
153
|
-
static instrumentMidiMap: Record<string, number>;
|
|
154
|
-
static instrumentKeyOffset: Record<string, number>;
|
|
155
|
-
static defaultDrumMidiMap: Record<number, number>;
|
|
156
|
-
static xNoteheadInstruments: number[];
|
|
157
|
-
static triNoteheadInstruments: number[];
|
|
158
|
-
startSelector: SmoSelector;
|
|
159
|
-
endSelector: SmoSelector;
|
|
160
|
-
instrumentName: string;
|
|
161
|
-
abbreviation: string;
|
|
162
|
-
keyOffset: number;
|
|
163
|
-
clef: Clef;
|
|
164
|
-
midiInstrument: number;
|
|
165
|
-
usePercussionNoteheads: boolean;
|
|
166
|
-
percussionMap: Record<number, number>;
|
|
167
|
-
lines: number;
|
|
168
|
-
midichannel: number;
|
|
169
|
-
midiport: number;
|
|
170
|
-
family: string;
|
|
171
|
-
get midiInstrumentDefault(): number;
|
|
172
|
-
instrument: string;
|
|
173
|
-
articulation?: string;
|
|
174
|
-
mutes?: string;
|
|
175
|
-
static get defaults(): SmoInstrumentParams;
|
|
176
|
-
static get defaultOscillatorParam(): SmoOscillatorInfo;
|
|
177
|
-
constructor(params: SmoInstrumentParams);
|
|
178
|
-
serialize(): SmoInstrumentParamsSer;
|
|
179
|
-
get isPercussion(): boolean;
|
|
180
|
-
eq(other: SmoInstrument): boolean;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* @category SmoObject
|
|
184
|
-
*/
|
|
185
|
-
export interface SmoInstrumentMeasure {
|
|
186
|
-
measureIndex: number;
|
|
187
|
-
instrument: SmoInstrumentParams;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* constructor params for {@link SmoStaffHairpin}
|
|
191
|
-
* @category SmoObject
|
|
192
|
-
*/
|
|
193
|
-
export interface SmoStaffHairpinParams {
|
|
194
|
-
/**
|
|
195
|
-
* extra x on start of shape
|
|
196
|
-
*/
|
|
197
|
-
xOffsetLeft: number;
|
|
198
|
-
/**
|
|
199
|
-
* extra x on end of shape
|
|
200
|
-
*/
|
|
201
|
-
xOffsetRight: number;
|
|
202
|
-
/**
|
|
203
|
-
* yOffset
|
|
204
|
-
*/
|
|
205
|
-
yOffset: number;
|
|
206
|
-
/**
|
|
207
|
-
* flare-out pixels
|
|
208
|
-
*/
|
|
209
|
-
height: number;
|
|
210
|
-
/**
|
|
211
|
-
* above, below
|
|
212
|
-
*/
|
|
213
|
-
position: number;
|
|
214
|
-
/**
|
|
215
|
-
* cresc, dim.
|
|
216
|
-
*/
|
|
217
|
-
hairpinType: number;
|
|
218
|
-
/**
|
|
219
|
-
* where it starts
|
|
220
|
-
*/
|
|
221
|
-
startSelector: SmoSelector;
|
|
222
|
-
/**
|
|
223
|
-
* where it starts
|
|
224
|
-
*/
|
|
225
|
-
endSelector: SmoSelector;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Serialized dynamic marking (hairpin)
|
|
229
|
-
* @category serialization
|
|
230
|
-
*/
|
|
231
|
-
export interface SmoStaffHairpinParamsSer extends StaffModifierBaseSer {
|
|
232
|
-
/**
|
|
233
|
-
* extra x on start of shape
|
|
234
|
-
*/
|
|
235
|
-
xOffsetLeft: number;
|
|
236
|
-
/**
|
|
237
|
-
* extra x on end of shape
|
|
238
|
-
*/
|
|
239
|
-
xOffsetRight: number;
|
|
240
|
-
/**
|
|
241
|
-
* yOffset
|
|
242
|
-
*/
|
|
243
|
-
yOffset: number;
|
|
244
|
-
/**
|
|
245
|
-
* flare-out pixels
|
|
246
|
-
*/
|
|
247
|
-
height: number;
|
|
248
|
-
/**
|
|
249
|
-
* above, below
|
|
250
|
-
*/
|
|
251
|
-
position: number;
|
|
252
|
-
/**
|
|
253
|
-
* cresc, dim.
|
|
254
|
-
*/
|
|
255
|
-
hairpinType: number;
|
|
256
|
-
/**
|
|
257
|
-
* where it starts
|
|
258
|
-
*/
|
|
259
|
-
startSelector: SmoSelector;
|
|
260
|
-
/**
|
|
261
|
-
* where it starts
|
|
262
|
-
*/
|
|
263
|
-
endSelector: SmoSelector;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Also called crescendo etc.
|
|
267
|
-
* @category SmoObject
|
|
268
|
-
*/
|
|
269
|
-
export declare class SmoStaffHairpin extends StaffModifierBase {
|
|
270
|
-
static get editableAttributes(): string[];
|
|
271
|
-
static get defaults(): SmoStaffHairpinParams;
|
|
272
|
-
static get positions(): {
|
|
273
|
-
LEFT: number;
|
|
274
|
-
RIGHT: number;
|
|
275
|
-
ABOVE: number;
|
|
276
|
-
BELOW: number;
|
|
277
|
-
};
|
|
278
|
-
static get types(): {
|
|
279
|
-
CRESCENDO: number;
|
|
280
|
-
DECRESCENDO: number;
|
|
281
|
-
};
|
|
282
|
-
static get attributes(): string[];
|
|
283
|
-
xOffsetLeft: number;
|
|
284
|
-
xOffsetRight: number;
|
|
285
|
-
yOffset: number;
|
|
286
|
-
height: number;
|
|
287
|
-
position: number;
|
|
288
|
-
hairpinType: number;
|
|
289
|
-
startSelector: SmoSelector;
|
|
290
|
-
endSelector: SmoSelector;
|
|
291
|
-
serialize(): SmoStaffHairpinParamsSer;
|
|
292
|
-
constructor(params: SmoStaffHairpinParams);
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* constructor params for {@link SmoStaffTextBracket}
|
|
296
|
-
* @category SmoObject
|
|
297
|
-
*/
|
|
298
|
-
export interface SmoStaffTextBracketParams {
|
|
299
|
-
/**
|
|
300
|
-
* the ledger line
|
|
301
|
-
*/
|
|
302
|
-
line: number;
|
|
303
|
-
/**
|
|
304
|
-
* above or below
|
|
305
|
-
*/
|
|
306
|
-
position: number;
|
|
307
|
-
/**
|
|
308
|
-
* the text to display
|
|
309
|
-
*/
|
|
310
|
-
text: string;
|
|
311
|
-
/**
|
|
312
|
-
* text can have superscript
|
|
313
|
-
*/
|
|
314
|
-
superscript: string;
|
|
315
|
-
/**
|
|
316
|
-
* extend of the line
|
|
317
|
-
*/
|
|
318
|
-
startSelector: SmoSelector;
|
|
319
|
-
/**
|
|
320
|
-
* extend of the line
|
|
321
|
-
*/
|
|
322
|
-
endSelector: SmoSelector;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* serializable bits of SmoStaffTextBracket
|
|
326
|
-
* @category serialization
|
|
327
|
-
*/
|
|
328
|
-
export interface SmoStaffTextBracketParamsSer extends StaffModifierBaseSer {
|
|
329
|
-
/**
|
|
330
|
-
* constructor
|
|
331
|
-
*/
|
|
332
|
-
ctor: string;
|
|
333
|
-
attrs: SmoAttrs;
|
|
334
|
-
/**
|
|
335
|
-
* the ledger line
|
|
336
|
-
*/
|
|
337
|
-
line: number;
|
|
338
|
-
/**
|
|
339
|
-
* above or below
|
|
340
|
-
*/
|
|
341
|
-
position: number;
|
|
342
|
-
/**
|
|
343
|
-
* the text to display
|
|
344
|
-
*/
|
|
345
|
-
text: string;
|
|
346
|
-
/**
|
|
347
|
-
* text can have superscript
|
|
348
|
-
*/
|
|
349
|
-
superscript: string;
|
|
350
|
-
/**
|
|
351
|
-
* extend of the line
|
|
352
|
-
*/
|
|
353
|
-
startSelector: SmoSelector;
|
|
354
|
-
/**
|
|
355
|
-
* extend of the line
|
|
356
|
-
*/
|
|
357
|
-
endSelector: SmoSelector;
|
|
358
|
-
}
|
|
359
|
-
export type SmoTextBracketStringType = 'text' | 'superscript';
|
|
360
|
-
export declare const SmoTextBracketStringTypes: SmoTextBracketStringType[];
|
|
361
|
-
export type SmoTextBracketNumberType = 'line' | 'position';
|
|
362
|
-
export declare const SmoTextBracketNumberTypes: SmoTextBracketNumberType[];
|
|
363
|
-
/**
|
|
364
|
-
* Text like 8va, rit. that is bracketed on a system
|
|
365
|
-
* @category SmoObject
|
|
366
|
-
*/
|
|
367
|
-
export declare class SmoStaffTextBracket extends StaffModifierBase {
|
|
368
|
-
static RITARD: string;
|
|
369
|
-
static ACCEL: string;
|
|
370
|
-
static CRESCENDO: string;
|
|
371
|
-
static DIMENUENDO: string;
|
|
372
|
-
static OCTAVEUP: string;
|
|
373
|
-
static OCTAVEDOWN: string;
|
|
374
|
-
static OCTAVEUP2: string;
|
|
375
|
-
static OCTAVE2DOWN: string;
|
|
376
|
-
static get defaults(): SmoStaffTextBracketParams;
|
|
377
|
-
static get positions(): {
|
|
378
|
-
TOP: number;
|
|
379
|
-
BOTTOM: number;
|
|
380
|
-
};
|
|
381
|
-
static get attributes(): string[];
|
|
382
|
-
position: number;
|
|
383
|
-
text: string;
|
|
384
|
-
superscript: string;
|
|
385
|
-
line: number;
|
|
386
|
-
startSelector: SmoSelector;
|
|
387
|
-
endSelector: SmoSelector;
|
|
388
|
-
serialize(): SmoStaffTextBracketParamsSer;
|
|
389
|
-
serializeWithId(): SmoStaffTextBracketParamsSer;
|
|
390
|
-
constructor(params: SmoStaffTextBracketParams);
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* used for debugging
|
|
394
|
-
* @internal
|
|
395
|
-
*/
|
|
396
|
-
export interface SlurDefaultParams {
|
|
397
|
-
stemDir1: number;
|
|
398
|
-
stemDir2: number;
|
|
399
|
-
line1: number;
|
|
400
|
-
line2: number;
|
|
401
|
-
lineMin: number;
|
|
402
|
-
lineMax: number;
|
|
403
|
-
position: number;
|
|
404
|
-
orientation: number;
|
|
405
|
-
sameBeam: number;
|
|
406
|
-
}
|
|
407
|
-
export type SlurNumberParam = 'spacing' | 'thickness' | 'xOffset' | 'yOffset' | 'position' | 'position_end' | 'cp1x' | 'cp1y' | 'cp2x' | 'cp2y';
|
|
408
|
-
export declare const SlurNumberParams: SlurNumberParam[];
|
|
409
|
-
/**
|
|
410
|
-
* parameters for a slur
|
|
411
|
-
* @param spacing between note and curve
|
|
412
|
-
* @param thickness thickness of the line
|
|
413
|
-
* @param xOffset in pixels
|
|
414
|
-
* @param yOffset in pixels
|
|
415
|
-
* @param position top or bottom of the chord we are attached to
|
|
416
|
-
* @param position_end top or bottom of the chord we are attached to
|
|
417
|
-
* @param invert turns that frown upside down
|
|
418
|
-
* @param cp1x bz control point
|
|
419
|
-
* @param cp1y bz control point
|
|
420
|
-
* @param cp2x bz control point
|
|
421
|
-
* @param cp2y bz control point
|
|
422
|
-
* @param startSelector the start note we are attached to
|
|
423
|
-
* @param endSelector the end note we are attached to
|
|
424
|
-
* @category SmoObject
|
|
425
|
-
*/
|
|
426
|
-
export interface SmoSlurParams {
|
|
427
|
-
/**
|
|
428
|
-
* spacing between note and curve
|
|
429
|
-
* */
|
|
430
|
-
spacing: number;
|
|
431
|
-
/**
|
|
432
|
-
* thickness of the curve
|
|
433
|
-
*/
|
|
434
|
-
thickness: number;
|
|
435
|
-
/**
|
|
436
|
-
* x offset on both ends
|
|
437
|
-
*/
|
|
438
|
-
xOffset: number;
|
|
439
|
-
/**
|
|
440
|
-
* move whole curve up or down
|
|
441
|
-
*/
|
|
442
|
-
yOffset: number;
|
|
443
|
-
/**
|
|
444
|
-
* VF position, whether head-end or stem end
|
|
445
|
-
*/
|
|
446
|
-
position: number;
|
|
447
|
-
/**
|
|
448
|
-
* VF position for right side of slur
|
|
449
|
-
*/
|
|
450
|
-
position_end: number;
|
|
451
|
-
/**
|
|
452
|
-
* indicates whether the user wants up, down or 'auto'.
|
|
453
|
-
* internally, sets the 'invert' flag
|
|
454
|
-
*/
|
|
455
|
-
orientation: number;
|
|
456
|
-
/**
|
|
457
|
-
* control point for bz curve
|
|
458
|
-
*/
|
|
459
|
-
cp1x: number;
|
|
460
|
-
/**
|
|
461
|
-
* control point for bz curve
|
|
462
|
-
*/
|
|
463
|
-
cp1y: number;
|
|
464
|
-
/**
|
|
465
|
-
* control point for bz curve
|
|
466
|
-
*/
|
|
467
|
-
cp2x: number;
|
|
468
|
-
/**
|
|
469
|
-
* control point for bz curve
|
|
470
|
-
*/
|
|
471
|
-
cp2y: number;
|
|
472
|
-
/**
|
|
473
|
-
* start note of the curve
|
|
474
|
-
*/
|
|
475
|
-
startSelector: SmoSelector;
|
|
476
|
-
/**
|
|
477
|
-
* start note of the curve
|
|
478
|
-
*/
|
|
479
|
-
endSelector: SmoSelector;
|
|
480
|
-
/**
|
|
481
|
-
* optional for debugging
|
|
482
|
-
*/
|
|
483
|
-
debugParams?: SlurDefaultParams;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* serializable bits of slur
|
|
487
|
-
* @category serialization
|
|
488
|
-
*/
|
|
489
|
-
export interface SmoSlurParamsSer extends SmoSlurParams {
|
|
490
|
-
/**
|
|
491
|
-
* constructor
|
|
492
|
-
*/
|
|
493
|
-
ctor: string;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Defines a slur
|
|
497
|
-
* @category SmoObject
|
|
498
|
-
*/
|
|
499
|
-
export declare class SmoSlur extends StaffModifierBase {
|
|
500
|
-
static get defaults(): SmoSlurParams;
|
|
501
|
-
static get positions(): {
|
|
502
|
-
HEAD: number;
|
|
503
|
-
TOP: number;
|
|
504
|
-
ABOVE: number;
|
|
505
|
-
BELOW: number;
|
|
506
|
-
AUTO: number;
|
|
507
|
-
};
|
|
508
|
-
static get orientations(): {
|
|
509
|
-
AUTO: number;
|
|
510
|
-
UP: number;
|
|
511
|
-
DOWN: number;
|
|
512
|
-
};
|
|
513
|
-
static get parameterArray(): string[];
|
|
514
|
-
spacing: number;
|
|
515
|
-
thickness: number;
|
|
516
|
-
xOffset: number;
|
|
517
|
-
yOffset: number;
|
|
518
|
-
position: number;
|
|
519
|
-
position_end: number;
|
|
520
|
-
orientation: number;
|
|
521
|
-
cp1x: number;
|
|
522
|
-
cp1y: number;
|
|
523
|
-
cp2x: number;
|
|
524
|
-
cp2y: number;
|
|
525
|
-
startSelector: SmoSelector;
|
|
526
|
-
endSelector: SmoSelector;
|
|
527
|
-
serialize(): SmoSlurParamsSer;
|
|
528
|
-
get controlPoints(): SvgPoint[];
|
|
529
|
-
constructor(params: SmoSlurParams);
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Map pitch indices of the tie line
|
|
533
|
-
* @category SmoObject
|
|
534
|
-
*/
|
|
535
|
-
export interface TieLine {
|
|
536
|
-
from: number;
|
|
537
|
-
to: number;
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* Constructor parameters for a tie.
|
|
541
|
-
* @category SmoObject
|
|
542
|
-
*/
|
|
543
|
-
export interface SmoTieParams {
|
|
544
|
-
/**
|
|
545
|
-
* future: x offset on both sides
|
|
546
|
-
*/
|
|
547
|
-
tie_spacing: number;
|
|
548
|
-
/**
|
|
549
|
-
* x coord of cp for bz curve
|
|
550
|
-
*/
|
|
551
|
-
cp1: number;
|
|
552
|
-
/**
|
|
553
|
-
* x coord of cp for bz curve
|
|
554
|
-
*/
|
|
555
|
-
cp2: number;
|
|
556
|
-
/**
|
|
557
|
-
* x offset
|
|
558
|
-
*/
|
|
559
|
-
first_x_shift: number;
|
|
560
|
-
/**
|
|
561
|
-
* x offset end
|
|
562
|
-
*/
|
|
563
|
-
last_x_shift: number;
|
|
564
|
-
/**
|
|
565
|
-
* y offset for all the curves
|
|
566
|
-
*/
|
|
567
|
-
y_shift: number;
|
|
568
|
-
/**
|
|
569
|
-
* map of lines for the pitches
|
|
570
|
-
*/
|
|
571
|
-
lines: TieLine[];
|
|
572
|
-
/**
|
|
573
|
-
* start note
|
|
574
|
-
*/
|
|
575
|
-
startSelector: SmoSelector | null;
|
|
576
|
-
/**
|
|
577
|
-
* end note
|
|
578
|
-
*/
|
|
579
|
-
endSelector: SmoSelector | null;
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* serializable bits of SmoTie
|
|
583
|
-
* @category serialization
|
|
584
|
-
*/
|
|
585
|
-
export interface SmoTieParamsSer extends SmoTieParams {
|
|
586
|
-
/**
|
|
587
|
-
* constructor
|
|
588
|
-
*/
|
|
589
|
-
ctor: string;
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* Like slur, but multiple pitches.
|
|
593
|
-
* @category SmoObject
|
|
594
|
-
*/
|
|
595
|
-
export declare class SmoTie extends StaffModifierBase {
|
|
596
|
-
invert: boolean;
|
|
597
|
-
cp1: number;
|
|
598
|
-
cp2: number;
|
|
599
|
-
first_x_shift: number;
|
|
600
|
-
last_x_shift: number;
|
|
601
|
-
y_shift: number;
|
|
602
|
-
tie_spacing: number;
|
|
603
|
-
lines: TieLine[];
|
|
604
|
-
startSelector: SmoSelector;
|
|
605
|
-
endSelector: SmoSelector;
|
|
606
|
-
static get defaults(): SmoTieParams;
|
|
607
|
-
static get parameterArray(): string[];
|
|
608
|
-
static get vexParameters(): string[];
|
|
609
|
-
static isTie(modifier: SmoTie | SmoModifierBase): modifier is SmoTie;
|
|
610
|
-
static createLines(fromNote: SmoNote, toNote: SmoNote): TieLine[];
|
|
611
|
-
serialize(): SmoTieParamsSer;
|
|
612
|
-
checkLines(fromNote: SmoNote, toNote: SmoNote): void;
|
|
613
|
-
constructor(params: SmoTieParams);
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
* Parameters for SmoTabStave
|
|
617
|
-
* @category SmoObject
|
|
618
|
-
*/
|
|
619
|
-
export interface SmoTabStaveParams {
|
|
620
|
-
/**
|
|
621
|
-
* start selector, by measure
|
|
622
|
-
*/
|
|
623
|
-
startSelector: SmoSelector;
|
|
624
|
-
/**
|
|
625
|
-
* end selector, by measure
|
|
626
|
-
*/
|
|
627
|
-
endSelector: SmoSelector;
|
|
628
|
-
/**
|
|
629
|
-
* space between staves, in pixels
|
|
630
|
-
*/
|
|
631
|
-
spacing: number;
|
|
632
|
-
/**
|
|
633
|
-
* number of lines
|
|
634
|
-
*/
|
|
635
|
-
numLines: number;
|
|
636
|
-
/**
|
|
637
|
-
* Default setting of showing stems
|
|
638
|
-
*/
|
|
639
|
-
showStems: boolean;
|
|
640
|
-
/**
|
|
641
|
-
* If true, the score should keep a single tab stave for all measures
|
|
642
|
-
*/
|
|
643
|
-
allMeasures: boolean;
|
|
644
|
-
/**
|
|
645
|
-
* The strings for each line
|
|
646
|
-
*/
|
|
647
|
-
stringPitches?: Pitch[];
|
|
648
|
-
}
|
|
649
|
-
export interface SmoTabStaveParamsSer extends SmoTabStaveParams {
|
|
650
|
-
ctor: string;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* A stave for guitar tablature sits below the music stave.
|
|
654
|
-
* @category SmoObject
|
|
655
|
-
*/
|
|
656
|
-
export declare class SmoTabStave extends StaffModifierBase {
|
|
657
|
-
startSelector: SmoSelector;
|
|
658
|
-
endSelector: SmoSelector;
|
|
659
|
-
spacing: number;
|
|
660
|
-
numLines: number;
|
|
661
|
-
showStems: boolean;
|
|
662
|
-
allMeasures: boolean;
|
|
663
|
-
stringPitches: Pitch[];
|
|
664
|
-
/** The default guitar tuning. Different instruments could have different tuning */
|
|
665
|
-
static get defaultStringPitches(): Pitch[];
|
|
666
|
-
/**
|
|
667
|
-
* Get default tab note position for a pitch on a music staff
|
|
668
|
-
* @param pitch
|
|
669
|
-
* @param stringPitches
|
|
670
|
-
* @returns
|
|
671
|
-
*/
|
|
672
|
-
static getDefaultPositionForStaff(pitch: Pitch, stringPitches: Pitch[], transposeIndex: number, stringIndex?: number): SmoFretPosition;
|
|
673
|
-
/**
|
|
674
|
-
* Find default fret positions for a set of pitches from a note
|
|
675
|
-
* @param pitches
|
|
676
|
-
* @param stringPitches
|
|
677
|
-
* @returns
|
|
678
|
-
*/
|
|
679
|
-
static getDefaultPositionsForStaff(pitches: Pitch[], stringPitches: Pitch[], transposeIndex: number): SmoFretPosition[];
|
|
680
|
-
static get defaults(): SmoTabStaveParams;
|
|
681
|
-
static parameterArray: string[];
|
|
682
|
-
static featuresEqual(st1: SmoTabStave, st2: SmoTabStave): boolean;
|
|
683
|
-
static overlaps(st1: StaffModifierBase, st2: StaffModifierBase): boolean;
|
|
684
|
-
getTabNoteFromNote(note: SmoNote, transposeIndex: number): SmoTabNote;
|
|
685
|
-
constructor(params: SmoTabStaveParams);
|
|
686
|
-
serialize(): any;
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* @category SmoObject
|
|
690
|
-
*/
|
|
691
|
-
export interface SmoTabTieParams {
|
|
692
|
-
startSelector: SmoSelector;
|
|
693
|
-
endSelector: SmoSelector;
|
|
694
|
-
hammerType: number;
|
|
695
|
-
slideType: number;
|
|
696
|
-
isTap: boolean;
|
|
697
|
-
text: string;
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* @category serialization
|
|
701
|
-
*/
|
|
702
|
-
export interface SmoTabTieParamsSer extends SmoTabTieParams {
|
|
703
|
-
ctor: string;
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* @category SmoObject
|
|
707
|
-
*/
|
|
708
|
-
export declare class SmoTabTie extends StaffModifierBase {
|
|
709
|
-
startSelector: SmoSelector;
|
|
710
|
-
endSelector: SmoSelector;
|
|
711
|
-
hammerType: number;
|
|
712
|
-
slideType: number;
|
|
713
|
-
isTap: boolean;
|
|
714
|
-
text: string;
|
|
715
|
-
static get hammerType(): {
|
|
716
|
-
None: number;
|
|
717
|
-
Hammeron: number;
|
|
718
|
-
Pulloff: number;
|
|
719
|
-
};
|
|
720
|
-
static get slideType(): {
|
|
721
|
-
None: number;
|
|
722
|
-
SlideUp: number;
|
|
723
|
-
SlideDown: number;
|
|
724
|
-
};
|
|
725
|
-
static get defaults(): SmoTabTieParams;
|
|
726
|
-
static get parameterArray(): string[];
|
|
727
|
-
constructor(params: SmoTabTieParams);
|
|
728
|
-
serialize(): Partial<SmoTabTieParamsSer>;
|
|
729
|
-
}
|
|
730
|
-
/**
|
|
731
|
-
* @category SmoObject
|
|
732
|
-
*/
|
|
733
|
-
export interface SmoPedalMarkingParams {
|
|
734
|
-
startSelector: SmoSelector;
|
|
735
|
-
endSelector: SmoSelector;
|
|
736
|
-
startMark: boolean;
|
|
737
|
-
releaseMark: boolean;
|
|
738
|
-
bracket: boolean;
|
|
739
|
-
depressText: string;
|
|
740
|
-
releaseText: string;
|
|
741
|
-
releases: SmoSelector[];
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* @category serialization
|
|
745
|
-
*/
|
|
746
|
-
export interface SmoPedalMarkingParamsSer extends SmoPedalMarkingParams {
|
|
747
|
-
ctor: string;
|
|
748
|
-
}
|
|
749
|
-
export declare function isSmoPedalMarkingParamsSer(params: Partial<SmoPedalMarkingParamsSer>): params is SmoPedalMarkingParamsSer;
|
|
750
|
-
/**
|
|
751
|
-
* @category SmoObject
|
|
752
|
-
*/
|
|
753
|
-
export declare class SmoPedalMarking extends StaffModifierBase {
|
|
754
|
-
startSelector: SmoSelector;
|
|
755
|
-
endSelector: SmoSelector;
|
|
756
|
-
startMark: boolean;
|
|
757
|
-
releaseMark: boolean;
|
|
758
|
-
bracket: boolean;
|
|
759
|
-
depressText: string;
|
|
760
|
-
releaseText: string;
|
|
761
|
-
releases: SmoSelector[];
|
|
762
|
-
static get defaults(): SmoPedalMarkingParams;
|
|
763
|
-
static get parameterArray(): string[];
|
|
764
|
-
constructor(params: SmoPedalMarkingParams);
|
|
765
|
-
serialize(): SmoPedalMarkingParamsSer;
|
|
766
|
-
}
|
|
767
|
-
export declare const staffModifierDynamicCtorInit: () => void;
|
|
1
|
+
import { SmoSelector } from '../xform/selections';
|
|
2
|
+
import { SmoNote } from './note';
|
|
3
|
+
import { SmoAttrs, SvgPoint, SmoObjectParams, Clef, SvgBox, SmoModifierBase, Pitch, ElementLike } from './common';
|
|
4
|
+
import { SmoTabNote, SmoFretPosition } from './noteModifiers';
|
|
5
|
+
/**
|
|
6
|
+
* Base class that mostly standardizes the interface and deals with serialization.
|
|
7
|
+
* @param ctor constructor for derived class
|
|
8
|
+
* @param logicalBox bounding box in SVG coordinates, if rendered
|
|
9
|
+
* @param attrs object identification
|
|
10
|
+
* @param startSelector where the modifier starts
|
|
11
|
+
* @param endSelector where it ends
|
|
12
|
+
* @category SmoObject
|
|
13
|
+
* */
|
|
14
|
+
export declare abstract class StaffModifierBase implements SmoModifierBase {
|
|
15
|
+
attrs: SmoAttrs;
|
|
16
|
+
ctor: string;
|
|
17
|
+
associatedStaff: number;
|
|
18
|
+
startSelector: SmoSelector;
|
|
19
|
+
endSelector: SmoSelector;
|
|
20
|
+
logicalBox: SvgBox | null;
|
|
21
|
+
element: ElementLike;
|
|
22
|
+
constructor(ctor: string);
|
|
23
|
+
static deserialize(params: SmoObjectParams): any;
|
|
24
|
+
static cloneWithId(o: StaffModifierBase): any;
|
|
25
|
+
serializeWithId(): any;
|
|
26
|
+
abstract serialize(): any;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @category serialization
|
|
30
|
+
*/
|
|
31
|
+
export interface StaffModifierBaseSer {
|
|
32
|
+
attrs: SmoAttrs;
|
|
33
|
+
ctor: string;
|
|
34
|
+
associatedStaff: number;
|
|
35
|
+
startSelector: SmoSelector;
|
|
36
|
+
endSelector: SmoSelector;
|
|
37
|
+
}
|
|
38
|
+
export type SoundSustain = 'percussive' | 'sustained';
|
|
39
|
+
export type oscillatorType = 'sample' | 'sine' | 'sawtooth' | 'square' | 'triangle' | 'custom';
|
|
40
|
+
export type oscillatorOptions = 'plucked' | 'bowed' | 'muted' | 'accented' | 'frequency-sweep' | 'na';
|
|
41
|
+
/**
|
|
42
|
+
* Parameters of an instrument used to create audio nodes
|
|
43
|
+
* @category SmoObject
|
|
44
|
+
*/
|
|
45
|
+
export interface SmoOscillatorInfo {
|
|
46
|
+
waveform: oscillatorType;
|
|
47
|
+
sustain: SoundSustain;
|
|
48
|
+
realOvertones: number[];
|
|
49
|
+
imaginaryOvertones: number[];
|
|
50
|
+
sample: string | null;
|
|
51
|
+
family: string;
|
|
52
|
+
instrument: string;
|
|
53
|
+
nativeFrequency: number;
|
|
54
|
+
dynamic: number;
|
|
55
|
+
options: oscillatorOptions[];
|
|
56
|
+
minDuration: number;
|
|
57
|
+
maxDuration: number;
|
|
58
|
+
}
|
|
59
|
+
export type SmoOscillatorInfoNumberType = 'minDuration' | 'maxDuration' | 'dynamic' | 'nativeFrequency';
|
|
60
|
+
export type SmoOscillatorInfoNumberArType = 'realOvertones' | 'imaginaryOvertones';
|
|
61
|
+
export type SmoOscillatorInfoStringType = 'family';
|
|
62
|
+
export type SmoOscillatorInfoStringNullType = 'sample';
|
|
63
|
+
export type SmoOscillatorInfoWaveformType = 'waveform';
|
|
64
|
+
export type SmoOscillatorInfoSustainType = 'sustain';
|
|
65
|
+
export type SmoOscillatorInfoOptionsType = 'options';
|
|
66
|
+
export declare const SmoOscillatorInfoAllTypes: string[];
|
|
67
|
+
export type SmoOscillatorAnyType = SmoOscillatorInfoNumberType | SmoOscillatorInfoNumberArType | SmoOscillatorInfoStringType | SmoOscillatorInfoStringNullType | oscillatorType | SoundSustain;
|
|
68
|
+
/**
|
|
69
|
+
* Define an instrument. An instrument is associated with a part, but a part can have instrument changes
|
|
70
|
+
* and thus contain multiple instruments at different points in the score.
|
|
71
|
+
* Not all of these parameters are fully utilized yet, and there are plans to greatly expand what
|
|
72
|
+
* an SmoInstrument is. Note I may move this to PartInfo module.
|
|
73
|
+
* @category SmoObject
|
|
74
|
+
*/
|
|
75
|
+
export interface SmoInstrumentParams {
|
|
76
|
+
/**
|
|
77
|
+
* where instrument starts to take effect
|
|
78
|
+
*/
|
|
79
|
+
startSelector: SmoSelector;
|
|
80
|
+
/**
|
|
81
|
+
* where instrument changes
|
|
82
|
+
*/
|
|
83
|
+
endSelector: SmoSelector;
|
|
84
|
+
/**
|
|
85
|
+
* name, for metadata
|
|
86
|
+
*/
|
|
87
|
+
instrumentName: string;
|
|
88
|
+
/**
|
|
89
|
+
* woodwind, brass etc.
|
|
90
|
+
*/
|
|
91
|
+
family: string;
|
|
92
|
+
/**
|
|
93
|
+
* instrument sample
|
|
94
|
+
*/
|
|
95
|
+
instrument: string;
|
|
96
|
+
/**
|
|
97
|
+
* abbreviation for score
|
|
98
|
+
*/
|
|
99
|
+
abbreviation: string;
|
|
100
|
+
/**
|
|
101
|
+
* -2 indicates key of Bb
|
|
102
|
+
*/
|
|
103
|
+
keyOffset: number;
|
|
104
|
+
usePercussionNoteheads: boolean;
|
|
105
|
+
percussionMap: Record<number, number>;
|
|
106
|
+
/**
|
|
107
|
+
* for future
|
|
108
|
+
*/
|
|
109
|
+
midiInstrument: number;
|
|
110
|
+
/**
|
|
111
|
+
* for future
|
|
112
|
+
*/
|
|
113
|
+
midichannel: number;
|
|
114
|
+
/**
|
|
115
|
+
* for future
|
|
116
|
+
*/
|
|
117
|
+
midiport: number;
|
|
118
|
+
/**
|
|
119
|
+
* default clef
|
|
120
|
+
*/
|
|
121
|
+
clef: Clef;
|
|
122
|
+
/**
|
|
123
|
+
* future, can be used to set sample
|
|
124
|
+
*/
|
|
125
|
+
mutes?: string;
|
|
126
|
+
lines: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Serialization of instrument-specific settings, such as sound and key
|
|
130
|
+
* @category serialization
|
|
131
|
+
*/
|
|
132
|
+
export interface SmoInstrumentParamsSer extends SmoInstrumentParams {
|
|
133
|
+
/**
|
|
134
|
+
* constructor
|
|
135
|
+
*/
|
|
136
|
+
ctor: string;
|
|
137
|
+
}
|
|
138
|
+
export type SmoInstrumentNumParamType = 'keyOffset' | 'midichannel' | 'midiport' | 'midiInstrument' | 'lines';
|
|
139
|
+
export declare const SmoInstrumentNumParams: SmoInstrumentNumParamType[];
|
|
140
|
+
export type SmoInstrumentStringParamType = 'instrumentName' | 'abbreviation' | 'family' | 'instrument' | 'clef';
|
|
141
|
+
export declare const SmoInstrumentStringParams: SmoInstrumentStringParamType[];
|
|
142
|
+
export type SmoInstrumentBooleanParamType = 'usePercussionNoteheads';
|
|
143
|
+
export declare const SmoInstrumentBooleanParams: SmoInstrumentBooleanParamType[];
|
|
144
|
+
/**
|
|
145
|
+
* Define an instrument. An instrument is associated with a part, but a part can have instrument changes
|
|
146
|
+
* and thus contain multiple instruments at different points in the score.
|
|
147
|
+
* Not all of these parameters are fully utilized yet, and there are plans to greatly expand what
|
|
148
|
+
* an SmoInstrument is. Note I may move this to PartInfo module.
|
|
149
|
+
* @category SmoObject
|
|
150
|
+
*/
|
|
151
|
+
export declare class SmoInstrument extends StaffModifierBase {
|
|
152
|
+
static get attributes(): string[];
|
|
153
|
+
static instrumentMidiMap: Record<string, number>;
|
|
154
|
+
static instrumentKeyOffset: Record<string, number>;
|
|
155
|
+
static defaultDrumMidiMap: Record<number, number>;
|
|
156
|
+
static xNoteheadInstruments: number[];
|
|
157
|
+
static triNoteheadInstruments: number[];
|
|
158
|
+
startSelector: SmoSelector;
|
|
159
|
+
endSelector: SmoSelector;
|
|
160
|
+
instrumentName: string;
|
|
161
|
+
abbreviation: string;
|
|
162
|
+
keyOffset: number;
|
|
163
|
+
clef: Clef;
|
|
164
|
+
midiInstrument: number;
|
|
165
|
+
usePercussionNoteheads: boolean;
|
|
166
|
+
percussionMap: Record<number, number>;
|
|
167
|
+
lines: number;
|
|
168
|
+
midichannel: number;
|
|
169
|
+
midiport: number;
|
|
170
|
+
family: string;
|
|
171
|
+
get midiInstrumentDefault(): number;
|
|
172
|
+
instrument: string;
|
|
173
|
+
articulation?: string;
|
|
174
|
+
mutes?: string;
|
|
175
|
+
static get defaults(): SmoInstrumentParams;
|
|
176
|
+
static get defaultOscillatorParam(): SmoOscillatorInfo;
|
|
177
|
+
constructor(params: SmoInstrumentParams);
|
|
178
|
+
serialize(): SmoInstrumentParamsSer;
|
|
179
|
+
get isPercussion(): boolean;
|
|
180
|
+
eq(other: SmoInstrument): boolean;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @category SmoObject
|
|
184
|
+
*/
|
|
185
|
+
export interface SmoInstrumentMeasure {
|
|
186
|
+
measureIndex: number;
|
|
187
|
+
instrument: SmoInstrumentParams;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* constructor params for {@link SmoStaffHairpin}
|
|
191
|
+
* @category SmoObject
|
|
192
|
+
*/
|
|
193
|
+
export interface SmoStaffHairpinParams {
|
|
194
|
+
/**
|
|
195
|
+
* extra x on start of shape
|
|
196
|
+
*/
|
|
197
|
+
xOffsetLeft: number;
|
|
198
|
+
/**
|
|
199
|
+
* extra x on end of shape
|
|
200
|
+
*/
|
|
201
|
+
xOffsetRight: number;
|
|
202
|
+
/**
|
|
203
|
+
* yOffset
|
|
204
|
+
*/
|
|
205
|
+
yOffset: number;
|
|
206
|
+
/**
|
|
207
|
+
* flare-out pixels
|
|
208
|
+
*/
|
|
209
|
+
height: number;
|
|
210
|
+
/**
|
|
211
|
+
* above, below
|
|
212
|
+
*/
|
|
213
|
+
position: number;
|
|
214
|
+
/**
|
|
215
|
+
* cresc, dim.
|
|
216
|
+
*/
|
|
217
|
+
hairpinType: number;
|
|
218
|
+
/**
|
|
219
|
+
* where it starts
|
|
220
|
+
*/
|
|
221
|
+
startSelector: SmoSelector;
|
|
222
|
+
/**
|
|
223
|
+
* where it starts
|
|
224
|
+
*/
|
|
225
|
+
endSelector: SmoSelector;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Serialized dynamic marking (hairpin)
|
|
229
|
+
* @category serialization
|
|
230
|
+
*/
|
|
231
|
+
export interface SmoStaffHairpinParamsSer extends StaffModifierBaseSer {
|
|
232
|
+
/**
|
|
233
|
+
* extra x on start of shape
|
|
234
|
+
*/
|
|
235
|
+
xOffsetLeft: number;
|
|
236
|
+
/**
|
|
237
|
+
* extra x on end of shape
|
|
238
|
+
*/
|
|
239
|
+
xOffsetRight: number;
|
|
240
|
+
/**
|
|
241
|
+
* yOffset
|
|
242
|
+
*/
|
|
243
|
+
yOffset: number;
|
|
244
|
+
/**
|
|
245
|
+
* flare-out pixels
|
|
246
|
+
*/
|
|
247
|
+
height: number;
|
|
248
|
+
/**
|
|
249
|
+
* above, below
|
|
250
|
+
*/
|
|
251
|
+
position: number;
|
|
252
|
+
/**
|
|
253
|
+
* cresc, dim.
|
|
254
|
+
*/
|
|
255
|
+
hairpinType: number;
|
|
256
|
+
/**
|
|
257
|
+
* where it starts
|
|
258
|
+
*/
|
|
259
|
+
startSelector: SmoSelector;
|
|
260
|
+
/**
|
|
261
|
+
* where it starts
|
|
262
|
+
*/
|
|
263
|
+
endSelector: SmoSelector;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Also called crescendo etc.
|
|
267
|
+
* @category SmoObject
|
|
268
|
+
*/
|
|
269
|
+
export declare class SmoStaffHairpin extends StaffModifierBase {
|
|
270
|
+
static get editableAttributes(): string[];
|
|
271
|
+
static get defaults(): SmoStaffHairpinParams;
|
|
272
|
+
static get positions(): {
|
|
273
|
+
LEFT: number;
|
|
274
|
+
RIGHT: number;
|
|
275
|
+
ABOVE: number;
|
|
276
|
+
BELOW: number;
|
|
277
|
+
};
|
|
278
|
+
static get types(): {
|
|
279
|
+
CRESCENDO: number;
|
|
280
|
+
DECRESCENDO: number;
|
|
281
|
+
};
|
|
282
|
+
static get attributes(): string[];
|
|
283
|
+
xOffsetLeft: number;
|
|
284
|
+
xOffsetRight: number;
|
|
285
|
+
yOffset: number;
|
|
286
|
+
height: number;
|
|
287
|
+
position: number;
|
|
288
|
+
hairpinType: number;
|
|
289
|
+
startSelector: SmoSelector;
|
|
290
|
+
endSelector: SmoSelector;
|
|
291
|
+
serialize(): SmoStaffHairpinParamsSer;
|
|
292
|
+
constructor(params: SmoStaffHairpinParams);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* constructor params for {@link SmoStaffTextBracket}
|
|
296
|
+
* @category SmoObject
|
|
297
|
+
*/
|
|
298
|
+
export interface SmoStaffTextBracketParams {
|
|
299
|
+
/**
|
|
300
|
+
* the ledger line
|
|
301
|
+
*/
|
|
302
|
+
line: number;
|
|
303
|
+
/**
|
|
304
|
+
* above or below
|
|
305
|
+
*/
|
|
306
|
+
position: number;
|
|
307
|
+
/**
|
|
308
|
+
* the text to display
|
|
309
|
+
*/
|
|
310
|
+
text: string;
|
|
311
|
+
/**
|
|
312
|
+
* text can have superscript
|
|
313
|
+
*/
|
|
314
|
+
superscript: string;
|
|
315
|
+
/**
|
|
316
|
+
* extend of the line
|
|
317
|
+
*/
|
|
318
|
+
startSelector: SmoSelector;
|
|
319
|
+
/**
|
|
320
|
+
* extend of the line
|
|
321
|
+
*/
|
|
322
|
+
endSelector: SmoSelector;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* serializable bits of SmoStaffTextBracket
|
|
326
|
+
* @category serialization
|
|
327
|
+
*/
|
|
328
|
+
export interface SmoStaffTextBracketParamsSer extends StaffModifierBaseSer {
|
|
329
|
+
/**
|
|
330
|
+
* constructor
|
|
331
|
+
*/
|
|
332
|
+
ctor: string;
|
|
333
|
+
attrs: SmoAttrs;
|
|
334
|
+
/**
|
|
335
|
+
* the ledger line
|
|
336
|
+
*/
|
|
337
|
+
line: number;
|
|
338
|
+
/**
|
|
339
|
+
* above or below
|
|
340
|
+
*/
|
|
341
|
+
position: number;
|
|
342
|
+
/**
|
|
343
|
+
* the text to display
|
|
344
|
+
*/
|
|
345
|
+
text: string;
|
|
346
|
+
/**
|
|
347
|
+
* text can have superscript
|
|
348
|
+
*/
|
|
349
|
+
superscript: string;
|
|
350
|
+
/**
|
|
351
|
+
* extend of the line
|
|
352
|
+
*/
|
|
353
|
+
startSelector: SmoSelector;
|
|
354
|
+
/**
|
|
355
|
+
* extend of the line
|
|
356
|
+
*/
|
|
357
|
+
endSelector: SmoSelector;
|
|
358
|
+
}
|
|
359
|
+
export type SmoTextBracketStringType = 'text' | 'superscript';
|
|
360
|
+
export declare const SmoTextBracketStringTypes: SmoTextBracketStringType[];
|
|
361
|
+
export type SmoTextBracketNumberType = 'line' | 'position';
|
|
362
|
+
export declare const SmoTextBracketNumberTypes: SmoTextBracketNumberType[];
|
|
363
|
+
/**
|
|
364
|
+
* Text like 8va, rit. that is bracketed on a system
|
|
365
|
+
* @category SmoObject
|
|
366
|
+
*/
|
|
367
|
+
export declare class SmoStaffTextBracket extends StaffModifierBase {
|
|
368
|
+
static RITARD: string;
|
|
369
|
+
static ACCEL: string;
|
|
370
|
+
static CRESCENDO: string;
|
|
371
|
+
static DIMENUENDO: string;
|
|
372
|
+
static OCTAVEUP: string;
|
|
373
|
+
static OCTAVEDOWN: string;
|
|
374
|
+
static OCTAVEUP2: string;
|
|
375
|
+
static OCTAVE2DOWN: string;
|
|
376
|
+
static get defaults(): SmoStaffTextBracketParams;
|
|
377
|
+
static get positions(): {
|
|
378
|
+
TOP: number;
|
|
379
|
+
BOTTOM: number;
|
|
380
|
+
};
|
|
381
|
+
static get attributes(): string[];
|
|
382
|
+
position: number;
|
|
383
|
+
text: string;
|
|
384
|
+
superscript: string;
|
|
385
|
+
line: number;
|
|
386
|
+
startSelector: SmoSelector;
|
|
387
|
+
endSelector: SmoSelector;
|
|
388
|
+
serialize(): SmoStaffTextBracketParamsSer;
|
|
389
|
+
serializeWithId(): SmoStaffTextBracketParamsSer;
|
|
390
|
+
constructor(params: SmoStaffTextBracketParams);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* used for debugging
|
|
394
|
+
* @internal
|
|
395
|
+
*/
|
|
396
|
+
export interface SlurDefaultParams {
|
|
397
|
+
stemDir1: number;
|
|
398
|
+
stemDir2: number;
|
|
399
|
+
line1: number;
|
|
400
|
+
line2: number;
|
|
401
|
+
lineMin: number;
|
|
402
|
+
lineMax: number;
|
|
403
|
+
position: number;
|
|
404
|
+
orientation: number;
|
|
405
|
+
sameBeam: number;
|
|
406
|
+
}
|
|
407
|
+
export type SlurNumberParam = 'spacing' | 'thickness' | 'xOffset' | 'yOffset' | 'position' | 'position_end' | 'cp1x' | 'cp1y' | 'cp2x' | 'cp2y';
|
|
408
|
+
export declare const SlurNumberParams: SlurNumberParam[];
|
|
409
|
+
/**
|
|
410
|
+
* parameters for a slur
|
|
411
|
+
* @param spacing between note and curve
|
|
412
|
+
* @param thickness thickness of the line
|
|
413
|
+
* @param xOffset in pixels
|
|
414
|
+
* @param yOffset in pixels
|
|
415
|
+
* @param position top or bottom of the chord we are attached to
|
|
416
|
+
* @param position_end top or bottom of the chord we are attached to
|
|
417
|
+
* @param invert turns that frown upside down
|
|
418
|
+
* @param cp1x bz control point
|
|
419
|
+
* @param cp1y bz control point
|
|
420
|
+
* @param cp2x bz control point
|
|
421
|
+
* @param cp2y bz control point
|
|
422
|
+
* @param startSelector the start note we are attached to
|
|
423
|
+
* @param endSelector the end note we are attached to
|
|
424
|
+
* @category SmoObject
|
|
425
|
+
*/
|
|
426
|
+
export interface SmoSlurParams {
|
|
427
|
+
/**
|
|
428
|
+
* spacing between note and curve
|
|
429
|
+
* */
|
|
430
|
+
spacing: number;
|
|
431
|
+
/**
|
|
432
|
+
* thickness of the curve
|
|
433
|
+
*/
|
|
434
|
+
thickness: number;
|
|
435
|
+
/**
|
|
436
|
+
* x offset on both ends
|
|
437
|
+
*/
|
|
438
|
+
xOffset: number;
|
|
439
|
+
/**
|
|
440
|
+
* move whole curve up or down
|
|
441
|
+
*/
|
|
442
|
+
yOffset: number;
|
|
443
|
+
/**
|
|
444
|
+
* VF position, whether head-end or stem end
|
|
445
|
+
*/
|
|
446
|
+
position: number;
|
|
447
|
+
/**
|
|
448
|
+
* VF position for right side of slur
|
|
449
|
+
*/
|
|
450
|
+
position_end: number;
|
|
451
|
+
/**
|
|
452
|
+
* indicates whether the user wants up, down or 'auto'.
|
|
453
|
+
* internally, sets the 'invert' flag
|
|
454
|
+
*/
|
|
455
|
+
orientation: number;
|
|
456
|
+
/**
|
|
457
|
+
* control point for bz curve
|
|
458
|
+
*/
|
|
459
|
+
cp1x: number;
|
|
460
|
+
/**
|
|
461
|
+
* control point for bz curve
|
|
462
|
+
*/
|
|
463
|
+
cp1y: number;
|
|
464
|
+
/**
|
|
465
|
+
* control point for bz curve
|
|
466
|
+
*/
|
|
467
|
+
cp2x: number;
|
|
468
|
+
/**
|
|
469
|
+
* control point for bz curve
|
|
470
|
+
*/
|
|
471
|
+
cp2y: number;
|
|
472
|
+
/**
|
|
473
|
+
* start note of the curve
|
|
474
|
+
*/
|
|
475
|
+
startSelector: SmoSelector;
|
|
476
|
+
/**
|
|
477
|
+
* start note of the curve
|
|
478
|
+
*/
|
|
479
|
+
endSelector: SmoSelector;
|
|
480
|
+
/**
|
|
481
|
+
* optional for debugging
|
|
482
|
+
*/
|
|
483
|
+
debugParams?: SlurDefaultParams;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* serializable bits of slur
|
|
487
|
+
* @category serialization
|
|
488
|
+
*/
|
|
489
|
+
export interface SmoSlurParamsSer extends SmoSlurParams {
|
|
490
|
+
/**
|
|
491
|
+
* constructor
|
|
492
|
+
*/
|
|
493
|
+
ctor: string;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Defines a slur
|
|
497
|
+
* @category SmoObject
|
|
498
|
+
*/
|
|
499
|
+
export declare class SmoSlur extends StaffModifierBase {
|
|
500
|
+
static get defaults(): SmoSlurParams;
|
|
501
|
+
static get positions(): {
|
|
502
|
+
HEAD: number;
|
|
503
|
+
TOP: number;
|
|
504
|
+
ABOVE: number;
|
|
505
|
+
BELOW: number;
|
|
506
|
+
AUTO: number;
|
|
507
|
+
};
|
|
508
|
+
static get orientations(): {
|
|
509
|
+
AUTO: number;
|
|
510
|
+
UP: number;
|
|
511
|
+
DOWN: number;
|
|
512
|
+
};
|
|
513
|
+
static get parameterArray(): string[];
|
|
514
|
+
spacing: number;
|
|
515
|
+
thickness: number;
|
|
516
|
+
xOffset: number;
|
|
517
|
+
yOffset: number;
|
|
518
|
+
position: number;
|
|
519
|
+
position_end: number;
|
|
520
|
+
orientation: number;
|
|
521
|
+
cp1x: number;
|
|
522
|
+
cp1y: number;
|
|
523
|
+
cp2x: number;
|
|
524
|
+
cp2y: number;
|
|
525
|
+
startSelector: SmoSelector;
|
|
526
|
+
endSelector: SmoSelector;
|
|
527
|
+
serialize(): SmoSlurParamsSer;
|
|
528
|
+
get controlPoints(): SvgPoint[];
|
|
529
|
+
constructor(params: SmoSlurParams);
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Map pitch indices of the tie line
|
|
533
|
+
* @category SmoObject
|
|
534
|
+
*/
|
|
535
|
+
export interface TieLine {
|
|
536
|
+
from: number;
|
|
537
|
+
to: number;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Constructor parameters for a tie.
|
|
541
|
+
* @category SmoObject
|
|
542
|
+
*/
|
|
543
|
+
export interface SmoTieParams {
|
|
544
|
+
/**
|
|
545
|
+
* future: x offset on both sides
|
|
546
|
+
*/
|
|
547
|
+
tie_spacing: number;
|
|
548
|
+
/**
|
|
549
|
+
* x coord of cp for bz curve
|
|
550
|
+
*/
|
|
551
|
+
cp1: number;
|
|
552
|
+
/**
|
|
553
|
+
* x coord of cp for bz curve
|
|
554
|
+
*/
|
|
555
|
+
cp2: number;
|
|
556
|
+
/**
|
|
557
|
+
* x offset
|
|
558
|
+
*/
|
|
559
|
+
first_x_shift: number;
|
|
560
|
+
/**
|
|
561
|
+
* x offset end
|
|
562
|
+
*/
|
|
563
|
+
last_x_shift: number;
|
|
564
|
+
/**
|
|
565
|
+
* y offset for all the curves
|
|
566
|
+
*/
|
|
567
|
+
y_shift: number;
|
|
568
|
+
/**
|
|
569
|
+
* map of lines for the pitches
|
|
570
|
+
*/
|
|
571
|
+
lines: TieLine[];
|
|
572
|
+
/**
|
|
573
|
+
* start note
|
|
574
|
+
*/
|
|
575
|
+
startSelector: SmoSelector | null;
|
|
576
|
+
/**
|
|
577
|
+
* end note
|
|
578
|
+
*/
|
|
579
|
+
endSelector: SmoSelector | null;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* serializable bits of SmoTie
|
|
583
|
+
* @category serialization
|
|
584
|
+
*/
|
|
585
|
+
export interface SmoTieParamsSer extends SmoTieParams {
|
|
586
|
+
/**
|
|
587
|
+
* constructor
|
|
588
|
+
*/
|
|
589
|
+
ctor: string;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Like slur, but multiple pitches.
|
|
593
|
+
* @category SmoObject
|
|
594
|
+
*/
|
|
595
|
+
export declare class SmoTie extends StaffModifierBase {
|
|
596
|
+
invert: boolean;
|
|
597
|
+
cp1: number;
|
|
598
|
+
cp2: number;
|
|
599
|
+
first_x_shift: number;
|
|
600
|
+
last_x_shift: number;
|
|
601
|
+
y_shift: number;
|
|
602
|
+
tie_spacing: number;
|
|
603
|
+
lines: TieLine[];
|
|
604
|
+
startSelector: SmoSelector;
|
|
605
|
+
endSelector: SmoSelector;
|
|
606
|
+
static get defaults(): SmoTieParams;
|
|
607
|
+
static get parameterArray(): string[];
|
|
608
|
+
static get vexParameters(): string[];
|
|
609
|
+
static isTie(modifier: SmoTie | SmoModifierBase): modifier is SmoTie;
|
|
610
|
+
static createLines(fromNote: SmoNote, toNote: SmoNote): TieLine[];
|
|
611
|
+
serialize(): SmoTieParamsSer;
|
|
612
|
+
checkLines(fromNote: SmoNote, toNote: SmoNote): void;
|
|
613
|
+
constructor(params: SmoTieParams);
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Parameters for SmoTabStave
|
|
617
|
+
* @category SmoObject
|
|
618
|
+
*/
|
|
619
|
+
export interface SmoTabStaveParams {
|
|
620
|
+
/**
|
|
621
|
+
* start selector, by measure
|
|
622
|
+
*/
|
|
623
|
+
startSelector: SmoSelector;
|
|
624
|
+
/**
|
|
625
|
+
* end selector, by measure
|
|
626
|
+
*/
|
|
627
|
+
endSelector: SmoSelector;
|
|
628
|
+
/**
|
|
629
|
+
* space between staves, in pixels
|
|
630
|
+
*/
|
|
631
|
+
spacing: number;
|
|
632
|
+
/**
|
|
633
|
+
* number of lines
|
|
634
|
+
*/
|
|
635
|
+
numLines: number;
|
|
636
|
+
/**
|
|
637
|
+
* Default setting of showing stems
|
|
638
|
+
*/
|
|
639
|
+
showStems: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* If true, the score should keep a single tab stave for all measures
|
|
642
|
+
*/
|
|
643
|
+
allMeasures: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* The strings for each line
|
|
646
|
+
*/
|
|
647
|
+
stringPitches?: Pitch[];
|
|
648
|
+
}
|
|
649
|
+
export interface SmoTabStaveParamsSer extends SmoTabStaveParams {
|
|
650
|
+
ctor: string;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* A stave for guitar tablature sits below the music stave.
|
|
654
|
+
* @category SmoObject
|
|
655
|
+
*/
|
|
656
|
+
export declare class SmoTabStave extends StaffModifierBase {
|
|
657
|
+
startSelector: SmoSelector;
|
|
658
|
+
endSelector: SmoSelector;
|
|
659
|
+
spacing: number;
|
|
660
|
+
numLines: number;
|
|
661
|
+
showStems: boolean;
|
|
662
|
+
allMeasures: boolean;
|
|
663
|
+
stringPitches: Pitch[];
|
|
664
|
+
/** The default guitar tuning. Different instruments could have different tuning */
|
|
665
|
+
static get defaultStringPitches(): Pitch[];
|
|
666
|
+
/**
|
|
667
|
+
* Get default tab note position for a pitch on a music staff
|
|
668
|
+
* @param pitch
|
|
669
|
+
* @param stringPitches
|
|
670
|
+
* @returns
|
|
671
|
+
*/
|
|
672
|
+
static getDefaultPositionForStaff(pitch: Pitch, stringPitches: Pitch[], transposeIndex: number, stringIndex?: number): SmoFretPosition;
|
|
673
|
+
/**
|
|
674
|
+
* Find default fret positions for a set of pitches from a note
|
|
675
|
+
* @param pitches
|
|
676
|
+
* @param stringPitches
|
|
677
|
+
* @returns
|
|
678
|
+
*/
|
|
679
|
+
static getDefaultPositionsForStaff(pitches: Pitch[], stringPitches: Pitch[], transposeIndex: number): SmoFretPosition[];
|
|
680
|
+
static get defaults(): SmoTabStaveParams;
|
|
681
|
+
static parameterArray: string[];
|
|
682
|
+
static featuresEqual(st1: SmoTabStave, st2: SmoTabStave): boolean;
|
|
683
|
+
static overlaps(st1: StaffModifierBase, st2: StaffModifierBase): boolean;
|
|
684
|
+
getTabNoteFromNote(note: SmoNote, transposeIndex: number): SmoTabNote;
|
|
685
|
+
constructor(params: SmoTabStaveParams);
|
|
686
|
+
serialize(): any;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* @category SmoObject
|
|
690
|
+
*/
|
|
691
|
+
export interface SmoTabTieParams {
|
|
692
|
+
startSelector: SmoSelector;
|
|
693
|
+
endSelector: SmoSelector;
|
|
694
|
+
hammerType: number;
|
|
695
|
+
slideType: number;
|
|
696
|
+
isTap: boolean;
|
|
697
|
+
text: string;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* @category serialization
|
|
701
|
+
*/
|
|
702
|
+
export interface SmoTabTieParamsSer extends SmoTabTieParams {
|
|
703
|
+
ctor: string;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* @category SmoObject
|
|
707
|
+
*/
|
|
708
|
+
export declare class SmoTabTie extends StaffModifierBase {
|
|
709
|
+
startSelector: SmoSelector;
|
|
710
|
+
endSelector: SmoSelector;
|
|
711
|
+
hammerType: number;
|
|
712
|
+
slideType: number;
|
|
713
|
+
isTap: boolean;
|
|
714
|
+
text: string;
|
|
715
|
+
static get hammerType(): {
|
|
716
|
+
None: number;
|
|
717
|
+
Hammeron: number;
|
|
718
|
+
Pulloff: number;
|
|
719
|
+
};
|
|
720
|
+
static get slideType(): {
|
|
721
|
+
None: number;
|
|
722
|
+
SlideUp: number;
|
|
723
|
+
SlideDown: number;
|
|
724
|
+
};
|
|
725
|
+
static get defaults(): SmoTabTieParams;
|
|
726
|
+
static get parameterArray(): string[];
|
|
727
|
+
constructor(params: SmoTabTieParams);
|
|
728
|
+
serialize(): Partial<SmoTabTieParamsSer>;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* @category SmoObject
|
|
732
|
+
*/
|
|
733
|
+
export interface SmoPedalMarkingParams {
|
|
734
|
+
startSelector: SmoSelector;
|
|
735
|
+
endSelector: SmoSelector;
|
|
736
|
+
startMark: boolean;
|
|
737
|
+
releaseMark: boolean;
|
|
738
|
+
bracket: boolean;
|
|
739
|
+
depressText: string;
|
|
740
|
+
releaseText: string;
|
|
741
|
+
releases: SmoSelector[];
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @category serialization
|
|
745
|
+
*/
|
|
746
|
+
export interface SmoPedalMarkingParamsSer extends SmoPedalMarkingParams {
|
|
747
|
+
ctor: string;
|
|
748
|
+
}
|
|
749
|
+
export declare function isSmoPedalMarkingParamsSer(params: Partial<SmoPedalMarkingParamsSer>): params is SmoPedalMarkingParamsSer;
|
|
750
|
+
/**
|
|
751
|
+
* @category SmoObject
|
|
752
|
+
*/
|
|
753
|
+
export declare class SmoPedalMarking extends StaffModifierBase {
|
|
754
|
+
startSelector: SmoSelector;
|
|
755
|
+
endSelector: SmoSelector;
|
|
756
|
+
startMark: boolean;
|
|
757
|
+
releaseMark: boolean;
|
|
758
|
+
bracket: boolean;
|
|
759
|
+
depressText: string;
|
|
760
|
+
releaseText: string;
|
|
761
|
+
releases: SmoSelector[];
|
|
762
|
+
static get defaults(): SmoPedalMarkingParams;
|
|
763
|
+
static get parameterArray(): string[];
|
|
764
|
+
constructor(params: SmoPedalMarkingParams);
|
|
765
|
+
serialize(): SmoPedalMarkingParamsSer;
|
|
766
|
+
}
|
|
767
|
+
export declare const staffModifierDynamicCtorInit: () => void;
|