smoosic 1.0.40 → 1.0.41

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.
Files changed (71) hide show
  1. package/build/smoosic.js +3 -3
  2. package/package.json +1 -1
  3. package/release/smoosic.js +3 -3
  4. package/src/smo/data/scoreModifiers.ts +2 -2
  5. package/src/ui/components/dialogs/timeSignature.vue +25 -4
  6. package/types/src/application/application.d.ts +103 -102
  7. package/types/src/application/common.d.ts +6 -0
  8. package/types/src/application/configuration.d.ts +75 -75
  9. package/types/src/application/dynamicInit.d.ts +6 -6
  10. package/types/src/application/eventHandler.d.ts +87 -81
  11. package/types/src/application/exports.d.ts +482 -485
  12. package/types/src/render/audio/oscillator.d.ts +99 -99
  13. package/types/src/render/audio/player.d.ts +143 -143
  14. package/types/src/render/audio/samples.d.ts +56 -56
  15. package/types/src/render/sui/NoteEntryCaret.d.ts +107 -0
  16. package/types/src/render/sui/NoteEntryMediator.d.ts +24 -0
  17. package/types/src/render/sui/configuration.d.ts +53 -49
  18. package/types/src/render/sui/formatter.d.ts +163 -161
  19. package/types/src/render/sui/layoutDebug.d.ts +46 -46
  20. package/types/src/render/sui/mapper.d.ts +138 -135
  21. package/types/src/render/sui/renderState.d.ts +92 -90
  22. package/types/src/render/sui/scoreRender.d.ts +97 -96
  23. package/types/src/render/sui/scoreView.d.ts +280 -279
  24. package/types/src/render/sui/scoreViewOperations.d.ts +604 -594
  25. package/types/src/render/sui/scroller.d.ts +41 -41
  26. package/types/src/render/sui/svgPageMap.d.ts +344 -344
  27. package/types/src/render/sui/textEdit.d.ts +316 -316
  28. package/types/src/render/sui/tracker.d.ts +10 -4
  29. package/types/src/render/vex/vxMeasure.d.ts +97 -97
  30. package/types/src/smo/data/common.d.ts +220 -220
  31. package/types/src/smo/data/measure.d.ts +511 -511
  32. package/types/src/smo/data/measureModifiers.d.ts +509 -508
  33. package/types/src/smo/data/music.d.ts +2 -1
  34. package/types/src/smo/data/note.d.ts +2 -0
  35. package/types/src/smo/data/noteModifiers.d.ts +2 -0
  36. package/types/src/smo/data/score.d.ts +7 -5
  37. package/types/src/smo/data/scoreModifiers.d.ts +441 -440
  38. package/types/src/smo/data/systemStaff.d.ts +2 -2
  39. package/types/src/smo/data/tuplet.d.ts +7 -0
  40. package/types/src/smo/midi/midiToSmo.d.ts +12 -12
  41. package/types/src/smo/midi/smoToMidi.d.ts +3 -3
  42. package/types/src/smo/mxml/smoToXml.d.ts +4 -4
  43. package/types/src/smo/mxml/xmlState.d.ts +3 -3
  44. package/types/src/smo/mxml/xmlToSmo.d.ts +2 -2
  45. package/types/src/smo/xform/operations.d.ts +3 -3
  46. package/types/src/smo/xform/selections.d.ts +154 -154
  47. package/types/src/ui/buttons/display.d.ts +1 -0
  48. package/types/src/ui/common.d.ts +69 -67
  49. package/types/src/ui/composable/draggable.d.ts +1 -1
  50. package/types/src/ui/configuration.d.ts +30 -30
  51. package/types/src/ui/dialogs/chordChange.d.ts +35 -35
  52. package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
  53. package/types/src/ui/dialogs/components/button.d.ts +54 -54
  54. package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
  55. package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
  56. package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
  57. package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
  58. package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
  59. package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
  60. package/types/src/ui/dialogs/dialog.d.ts +203 -203
  61. package/types/src/ui/dialogs/endings.d.ts +2 -2
  62. package/types/src/ui/dialogs/lyric.d.ts +39 -39
  63. package/types/src/ui/dialogs/measureFormat.d.ts +2 -2
  64. package/types/src/ui/dialogs/tempo.d.ts +3 -3
  65. package/types/src/ui/dialogs/textBlock.d.ts +55 -61
  66. package/types/src/ui/dialogs/timeSignature.d.ts +2 -34
  67. package/types/src/ui/exceptions.d.ts +15 -15
  68. package/types/src/ui/help.d.ts +6 -1
  69. package/types/src/ui/menus/manager.d.ts +59 -59
  70. package/types/src/ui/navigation.d.ts +44 -37
  71. package/types/typedoc.d.ts +157 -157
@@ -1,440 +1,441 @@
1
- import { SmoMeasureFormat, SmoMeasureFormatParamsSer } from './measureModifiers';
2
- import { SmoAttrs, SmoModifierBase, SvgBox } from './common';
3
- import { SmoMeasure } from './measure';
4
- import { SmoSelector } from '../xform/selections';
5
- /**
6
- * Base class for all {@link SmoScore} modifiers.
7
- * It is used to de/serialize the objects.
8
- * @category SmoObject
9
- */
10
- export declare abstract class SmoScoreModifierBase implements SmoModifierBase {
11
- /**
12
- * constructor
13
- *
14
- * @type {string}
15
- * @memberof SmoScoreModifierBase
16
- */
17
- ctor: string;
18
- /**
19
- * When rendered, keep track of the box
20
- *
21
- * @type {(SvgBox | null)}
22
- * @memberof SmoScoreModifierBase
23
- */
24
- logicalBox: SvgBox | null;
25
- /**
26
- * attributes for identification
27
- *
28
- * @type {SmoAttrs}
29
- * @memberof SmoScoreModifierBase
30
- */
31
- attrs: SmoAttrs;
32
- constructor(ctor: string);
33
- abstract serialize(): any;
34
- static deserialize(jsonObj: any): any;
35
- }
36
- /**
37
- * For global/default font settings.
38
- * @category SmoObject
39
- * @param name to distinguish: chord, lyric etc.
40
- * @param family font family
41
- * @param size in points
42
- * @param custom used to distinguish a specific text is not the default
43
- */
44
- export interface FontPurpose {
45
- /**
46
- * name of the purpose
47
- * { ENGRAVING: 1, SCORE: 2, CHORDS: 3, LYRICS: 4 }
48
- */
49
- name: string;
50
- /**
51
- * purpose enumeration
52
- */
53
- purpose: number;
54
- /**
55
- * font family
56
- */
57
- family: string;
58
- /**
59
- * default font size
60
- */
61
- size: number;
62
- /**
63
- * a flag that can be used to indicate if this is the global default, or a customization.
64
- * For lyrics for instance, most lyrics would use the custom font, this would be true if
65
- * it was overridden
66
- */
67
- custom: boolean;
68
- }
69
- export type SmoScoreInfoKey = 'name' | 'title' | 'subTitle' | 'composer' | 'copyright';
70
- export declare const SmoScoreInfoKeys: string[];
71
- /**
72
- * Information about the score itself, like composer etc.
73
- * @category SmoObject
74
- */
75
- export interface SmoScoreInfo {
76
- /**
77
- * deprecated, now defaults to title
78
- */
79
- name: string;
80
- /**
81
- * name of score
82
- */
83
- title: string;
84
- /**
85
- * subtitle/opus
86
- */
87
- subTitle: string;
88
- /**
89
- * who wrote it
90
- */
91
- composer: string;
92
- /**
93
- * copyright information
94
- */
95
- copyright: string;
96
- /**
97
- * for version tracking
98
- */
99
- version: number;
100
- }
101
- export type SmoScorePreferenceBool = 'autoPlay' | 'autoAdvance' | 'showPiano' | 'hideEmptyLines' | 'transposingScore' | 'autoScrollPlayback' | 'showPartNames';
102
- export type SmoScorePreferenceNumber = 'defaultDupleDuration' | 'defaultTripleDuration';
103
- export declare const SmoScorePreferenceBools: SmoScorePreferenceBool[];
104
- export declare const SmoScorePreferenceNumbers: SmoScorePreferenceNumber[];
105
- /**
106
- * Global score/program behavior preferences, see below for parameters
107
- * @category SmoObject
108
- */
109
- export interface SmoScorePreferencesParams {
110
- autoPlay: boolean;
111
- autoAdvance: boolean;
112
- autoScrollPlayback: boolean;
113
- defaultDupleDuration: number;
114
- defaultTripleDuration: number;
115
- showPiano: boolean;
116
- hideEmptyLines: boolean;
117
- transposingScore: boolean;
118
- showPartNames: boolean;
119
- horizontalDisplay?: boolean;
120
- }
121
- /**
122
- * Some default SMO behavior
123
- * @param autoPlay play a new note or chord
124
- * @param autoAdvance Sibelius-like behavior of advancing cursor when a letter note is placed
125
- * @param defaultDupleDuration in ticks, even metered measures
126
- * @param defaultTripleDuration in ticks, 6/8 etc.
127
- * @param showPiano show the piano widget in the score
128
- * @param hideEmptyLines Hide empty lines in full score
129
- * @param transposingScore Whether to show the score parts in concert key
130
- * @category SmoObject
131
- */
132
- export declare class SmoScorePreferences {
133
- autoPlay: boolean;
134
- autoAdvance: boolean;
135
- defaultDupleDuration: number;
136
- defaultTripleDuration: number;
137
- showPiano: boolean;
138
- hideEmptyLines: boolean;
139
- autoScrollPlayback: boolean;
140
- transposingScore: boolean;
141
- showPartNames: boolean;
142
- horizontalDisplay: boolean;
143
- static get defaults(): SmoScorePreferencesParams;
144
- constructor(params: SmoScorePreferencesParams);
145
- serialize(): SmoScorePreferencesParams;
146
- }
147
- /**
148
- * non-musical information about the score
149
- * @category serialization
150
- */
151
- export interface ScoreMetadataSer {
152
- fonts: FontPurpose[];
153
- preferences: SmoScorePreferencesParams;
154
- renumberingMap: Record<string, string>;
155
- scoreInfo: SmoScoreInfo;
156
- }
157
- /**
158
- * Map of measure formatting to measure IDs. We only save non-default formats
159
- * @category SmoObject
160
- * @param measureFormats
161
- * @param partIndex
162
- */
163
- export interface SmoFormattingManagerParams {
164
- /**
165
- * map of index to {@link SmoMeasureFormat} objects
166
- */
167
- measureFormats?: SmoMeasureFormat[];
168
- /**
169
- * the associated part, or -1 for the score
170
- */
171
- partIndex?: number;
172
- }
173
- /**
174
- * A score can have different views - one for the score itself and one for each
175
- * part, and each part can have its own formatting and text.
176
- * *Note*: I may move this to part info module.
177
- * @param measureFormats map of index to {@link SmoMeasureFormat} objects
178
- * @param partIndex the associated part, or -1 for the score
179
- * @category SmoObject
180
- */
181
- export declare class SmoFormattingManager extends SmoScoreModifierBase {
182
- measureFormats: Record<number, SmoMeasureFormat>;
183
- partIndex: number;
184
- static get forScore(): number;
185
- static get defaults(): SmoFormattingManagerParams;
186
- constructor(params: SmoFormattingManagerParams);
187
- /**
188
- * Update the measure format for the measure at the given index
189
- * @param format
190
- */
191
- updateMeasureFormat(format: SmoMeasureFormat, measureIndex: number): void;
192
- /**
193
- * Update the measure format based on the format of a given measure
194
- * @param measure
195
- */
196
- updateFormat(measure: SmoMeasure): void;
197
- serialize(): SmoMeasureFormatParamsSer[];
198
- }
199
- export type SmoAudioPlayerType = 'sampler' | 'synthesizer';
200
- /**
201
- * Constructor parameters for audio player
202
- * @category SmoObject
203
- */
204
- export interface SmoAudioPlayerParameters {
205
- playerType?: SmoAudioPlayerType;
206
- waveform?: OscillatorType;
207
- reverbEnable?: boolean;
208
- reverbDelay?: number;
209
- reverbDecay?: number;
210
- }
211
- /**
212
- * web audio API defines this
213
- * @param otype
214
- * @returns
215
- */
216
- export declare function IsOscillatorType(otype: OscillatorType | string): otype is OscillatorType;
217
- /**
218
- * Audio playback parameters. Just fun stuff.
219
- * @category SmoObject
220
- */
221
- export declare class SmoAudioPlayerSettings extends SmoScoreModifierBase {
222
- static get defaults(): SmoAudioPlayerParameters;
223
- static get attributes(): string[];
224
- playerType: SmoAudioPlayerType;
225
- waveform: OscillatorType;
226
- reverbEnable: boolean;
227
- reverbDelay: number;
228
- reverbDecay: number;
229
- constructor(params: SmoAudioPlayerParameters);
230
- serialize(): any;
231
- }
232
- export type ScaledPageAttributes = 'leftMargin' | 'rightMargin' | 'topMargin' | 'bottomMargin' | 'interGap' | 'intraGap';
233
- /**
234
- * Constructor parameters for {@link SmoPageLayout}, part of {@link SmoLayoutManager}
235
- * @category SmoObject
236
- */
237
- export interface SmoPageLayoutParams {
238
- leftMargin: number;
239
- rightMargin: number;
240
- topMargin: number;
241
- bottomMargin: number;
242
- interGap: number;
243
- intraGap: number;
244
- }
245
- /**
246
- * Define margins and other layout information associated with a specific page, and may
247
- * be different on different pages.
248
- * @category SmoObject
249
- */
250
- export declare class SmoPageLayout extends SmoScoreModifierBase {
251
- static get defaults(): SmoPageLayoutParams;
252
- static get attributes(): ScaledPageAttributes[];
253
- leftMargin: number;
254
- rightMargin: number;
255
- topMargin: number;
256
- bottomMargin: number;
257
- interGap: number;
258
- intraGap: number;
259
- constructor(params: SmoPageLayoutParams);
260
- serialize(): any;
261
- }
262
- export type displayMode = 'vertical' | 'horizontal';
263
- export type ScaledGlobalAttributes = 'pageWidth' | 'pageHeight';
264
- export type GlobalLayoutAttributes = 'pageWidth' | 'pageHeight' | 'noteSpacing' | 'svgScale' | 'zoomScale' | 'proportionality' | 'maxMeasureSystem' | 'displayMode';
265
- export type GlobalLayoutNumberAttributes = 'pageWidth' | 'pageHeight' | 'noteSpacing' | 'svgScale' | 'zoomScale' | 'proportionality' | 'maxMeasureSystem';
266
- export declare const GlobalLayoutAttributesArray: GlobalLayoutAttributes[];
267
- export declare const GlobalLayoutNumberAttributesArray: GlobalLayoutNumberAttributes[];
268
- /**
269
- * Global layout are parameters that determine the layout of the whole score, because they affect the containing svg element
270
- * @category SmoObject
271
- */
272
- export interface SmoGlobalLayout {
273
- svgScale: number;
274
- zoomScale: number;
275
- noteSpacing: number;
276
- pageWidth: number;
277
- pageHeight: number;
278
- proportionality: number;
279
- maxMeasureSystem: number;
280
- displayMode: displayMode;
281
- }
282
- export declare function isSmoGlobalLayout(params: Partial<SmoGlobalLayout>): params is SmoGlobalLayout;
283
- /**
284
- * Used to create {@link SmoLayoutManagerParams}
285
- * @category SmoObject
286
- */
287
- export interface ScaledPageLayout {
288
- svgScale: number;
289
- zoomScale: number;
290
- noteSpacing: number;
291
- pageWidth: number;
292
- pageHeight: number;
293
- leftMargin: number;
294
- rightMargin: number;
295
- topMargin: number;
296
- bottomMargin: number;
297
- interGap: number;
298
- intraGap: number;
299
- pages: number;
300
- maxMeasureSystem: number;
301
- }
302
- /**
303
- * Constructor parameters for {@link SmoLayoutManager}
304
- * @category SmoObject
305
- */
306
- export interface SmoLayoutManagerParams {
307
- /**
308
- * global svg settings for zoom, page width/height
309
- */
310
- globalLayout: SmoGlobalLayout;
311
- /**
312
- * page margins for each page
313
- */
314
- pageLayouts: SmoPageLayout[];
315
- }
316
- /**
317
- * @category serialization
318
- */
319
- export interface SmoLayoutManagerParamsSer {
320
- /**
321
- * constructor
322
- */
323
- ctor: string;
324
- /**
325
- * global svg settings for zoom, page width/height
326
- */
327
- globalLayout: SmoGlobalLayout;
328
- /**
329
- * page margins for each page
330
- */
331
- pageLayouts: SmoPageLayoutParams[];
332
- }
333
- /**
334
- * Storage and utilities for layout information in the score. Each
335
- * manager has one set of page height/width, since svg element
336
- * must have single length/width and viewbox.
337
- * Each page can have different margins.
338
- * @category SmoObject
339
- */
340
- export declare class SmoLayoutManager extends SmoScoreModifierBase {
341
- static get defaultLayout(): SmoGlobalLayout;
342
- static get defaults(): SmoLayoutManagerParams;
343
- static get attributes(): GlobalLayoutAttributes[];
344
- static get scaledPageAttributes(): ScaledPageAttributes[];
345
- static get scaledGlobalAttributes(): ScaledGlobalAttributes[];
346
- static areLayoutsEqual(g1: SmoGlobalLayout, g2: SmoGlobalLayout): boolean;
347
- static isZoomChange(g1: SmoGlobalLayout, g2: SmoGlobalLayout): boolean;
348
- /**
349
- * Adjust zoom width so the score takes up the whole score area
350
- */
351
- zoomToWidth(screenWidth: number): void;
352
- static getScaledPageLayout(globalLayout: SmoGlobalLayout, pageLayout: SmoPageLayout, pages: number): ScaledPageLayout;
353
- globalLayout: SmoGlobalLayout;
354
- pageLayouts: SmoPageLayout[];
355
- constructor(params: SmoLayoutManagerParams);
356
- trimPages(pageCount: number): void;
357
- getZoomScale(): number;
358
- serialize(): SmoLayoutManagerParamsSer;
359
- updateGlobalLayout(params: SmoGlobalLayout): void;
360
- addToPageLayouts(pageNum: number): void;
361
- getGlobalLayout(): SmoGlobalLayout;
362
- getScaledPageLayout(pageIndex: number): ScaledPageLayout;
363
- getPageLayout(pageIndex: number): SmoPageLayout;
364
- getPageLayouts(): SmoPageLayout[];
365
- updatePage(pageLayout: SmoPageLayout, pageIndex: number): void;
366
- }
367
- /**
368
- * constructor parameters for system groups (groupings of staves in the score)
369
- * @param leftConnector
370
- * @param rightConnector
371
- * @param mapType
372
- * @param text
373
- * @param shortText
374
- * @param justify
375
- * @param startSelector not used
376
- * @param endSelector not used
377
- * @category SmoObject
378
- */
379
- export interface SmoSystemGroupParams {
380
- /**
381
- * bracket etc.
382
- */
383
- leftConnector: number;
384
- /**
385
- * bracket etc.
386
- */
387
- rightConnector: number;
388
- /**
389
- * future, score groups can be different for different parts of the score
390
- */
391
- mapType: number;
392
- /**
393
- * whether to justify the notes in the group
394
- */
395
- justify: boolean;
396
- /**
397
- * if mapped to a range, start
398
- */
399
- startSelector: SmoSelector;
400
- /**
401
- * if mapped to a range, end
402
- */
403
- endSelector: SmoSelector;
404
- }
405
- /**
406
- * @category serialization
407
- */
408
- export interface SmoSystemGroupParamsSer extends SmoSystemGroupParams {
409
- /**
410
- * constructor
411
- */
412
- ctor: string;
413
- }
414
- /**
415
- * System group is the grouping of staves into a system.
416
- * @category SmoObject
417
- * */
418
- export declare class SmoSystemGroup extends SmoScoreModifierBase {
419
- static get connectorTypes(): Record<string, number>;
420
- static get connectorTypeNames(): Record<number, string>;
421
- static get mapTypes(): Record<string, number>;
422
- static get attributes(): string[];
423
- static get defaults(): SmoSystemGroupParams;
424
- static isSystemGroup(modifier: SmoSystemGroup | SmoModifierBase): modifier is SmoSystemGroup;
425
- leftConnector: number;
426
- rightConnector: number;
427
- mapType: number;
428
- text: string;
429
- shortText: string;
430
- justify: boolean;
431
- startSelector: SmoSelector;
432
- endSelector: SmoSelector;
433
- attrs: SmoAttrs;
434
- constructor(params: SmoSystemGroupParams);
435
- stavesOverlap(group: SmoSystemGroup): boolean;
436
- measuresOverlap(group: SmoSystemGroup): boolean;
437
- overlaps(group: SmoSystemGroup): boolean;
438
- serialize(): SmoSystemGroupParamsSer;
439
- }
440
- export declare const scoreModifierDynamicCtorInit: () => void;
1
+ import { SmoMeasureFormat, SmoMeasureFormatParamsSer } from './measureModifiers';
2
+ import { SmoAttrs, SmoModifierBase, SvgBox } from './common';
3
+ import { SmoMeasure } from './measure';
4
+ import { SmoSelector } from '../xform/selections';
5
+ /**
6
+ * Base class for all {@link SmoScore} modifiers.
7
+ * It is used to de/serialize the objects.
8
+ * @category SmoObject
9
+ */
10
+ export declare abstract class SmoScoreModifierBase implements SmoModifierBase {
11
+ /**
12
+ * constructor
13
+ *
14
+ * @type {string}
15
+ * @memberof SmoScoreModifierBase
16
+ */
17
+ ctor: string;
18
+ /**
19
+ * When rendered, keep track of the box
20
+ *
21
+ * @type {(SvgBox | null)}
22
+ * @memberof SmoScoreModifierBase
23
+ */
24
+ logicalBox: SvgBox | null;
25
+ /**
26
+ * attributes for identification
27
+ *
28
+ * @type {SmoAttrs}
29
+ * @memberof SmoScoreModifierBase
30
+ */
31
+ attrs: SmoAttrs;
32
+ constructor(ctor: string);
33
+ abstract serialize(): any;
34
+ static deserialize(jsonObj: any): any;
35
+ }
36
+ /**
37
+ * For global/default font settings.
38
+ * @category SmoObject
39
+ * @param name to distinguish: chord, lyric etc.
40
+ * @param family font family
41
+ * @param size in points
42
+ * @param custom used to distinguish a specific text is not the default
43
+ */
44
+ export interface FontPurpose {
45
+ /**
46
+ * name of the purpose
47
+ * { ENGRAVING: 1, SCORE: 2, CHORDS: 3, LYRICS: 4 }
48
+ */
49
+ name: string;
50
+ /**
51
+ * purpose enumeration
52
+ */
53
+ purpose: number;
54
+ /**
55
+ * font family
56
+ */
57
+ family: string;
58
+ /**
59
+ * default font size
60
+ */
61
+ size: number;
62
+ /**
63
+ * a flag that can be used to indicate if this is the global default, or a customization.
64
+ * For lyrics for instance, most lyrics would use the custom font, this would be true if
65
+ * it was overridden
66
+ */
67
+ custom: boolean;
68
+ }
69
+ export type SmoScoreInfoKey = 'name' | 'title' | 'subTitle' | 'composer' | 'copyright';
70
+ export declare const SmoScoreInfoKeys: string[];
71
+ /**
72
+ * Information about the score itself, like composer etc.
73
+ * @category SmoObject
74
+ */
75
+ export interface SmoScoreInfo {
76
+ /**
77
+ * deprecated, now defaults to title
78
+ */
79
+ name: string;
80
+ /**
81
+ * name of score
82
+ */
83
+ title: string;
84
+ /**
85
+ * subtitle/opus
86
+ */
87
+ subTitle: string;
88
+ /**
89
+ * who wrote it
90
+ */
91
+ composer: string;
92
+ /**
93
+ * copyright information
94
+ */
95
+ copyright: string;
96
+ /**
97
+ * for version tracking
98
+ */
99
+ version: number;
100
+ }
101
+ export type SmoScorePreferenceBool = 'autoPlay' | 'autoAdvance' | 'showPiano' | 'hideEmptyLines' | 'transposingScore' | 'autoScrollPlayback' | 'showPartNames';
102
+ export type SmoScorePreferenceNumber = 'defaultDupleDuration' | 'defaultTripleDuration';
103
+ export declare const SmoScorePreferenceBools: SmoScorePreferenceBool[];
104
+ export declare const SmoScorePreferenceNumbers: SmoScorePreferenceNumber[];
105
+ /**
106
+ * Global score/program behavior preferences, see below for parameters
107
+ * @category SmoObject
108
+ */
109
+ export interface SmoScorePreferencesParams {
110
+ autoPlay: boolean;
111
+ autoAdvance: boolean;
112
+ autoScrollPlayback: boolean;
113
+ defaultDupleDuration: number;
114
+ defaultTripleDuration: number;
115
+ showPiano: boolean;
116
+ hideEmptyLines: boolean;
117
+ transposingScore: boolean;
118
+ showPartNames: boolean;
119
+ horizontalDisplay?: boolean;
120
+ }
121
+ /**
122
+ * Some default SMO behavior
123
+ * @param autoPlay play a new note or chord
124
+ * @param autoAdvance Sibelius-like behavior of advancing cursor when a letter note is placed
125
+ * @param defaultDupleDuration in ticks, even metered measures
126
+ * @param defaultTripleDuration in ticks, 6/8 etc.
127
+ * @param showPiano show the piano widget in the score
128
+ * @param hideEmptyLines Hide empty lines in full score
129
+ * @param transposingScore Whether to show the score parts in concert key
130
+ * @category SmoObject
131
+ */
132
+ export declare class SmoScorePreferences {
133
+ autoPlay: boolean;
134
+ autoAdvance: boolean;
135
+ defaultDupleDuration: number;
136
+ defaultTripleDuration: number;
137
+ showPiano: boolean;
138
+ hideEmptyLines: boolean;
139
+ autoScrollPlayback: boolean;
140
+ transposingScore: boolean;
141
+ showPartNames: boolean;
142
+ horizontalDisplay: boolean;
143
+ static get defaults(): SmoScorePreferencesParams;
144
+ constructor(params: SmoScorePreferencesParams);
145
+ serialize(): SmoScorePreferencesParams;
146
+ }
147
+ /**
148
+ * non-musical information about the score
149
+ * @category serialization
150
+ */
151
+ export interface ScoreMetadataSer {
152
+ fonts: FontPurpose[];
153
+ preferences: SmoScorePreferencesParams;
154
+ renumberingMap: Record<string, string>;
155
+ scoreInfo: SmoScoreInfo;
156
+ }
157
+ /**
158
+ * Map of measure formatting to measure IDs. We only save non-default formats
159
+ * @category SmoObject
160
+ * @param measureFormats
161
+ * @param partIndex
162
+ */
163
+ export interface SmoFormattingManagerParams {
164
+ /**
165
+ * map of index to {@link SmoMeasureFormat} objects
166
+ */
167
+ measureFormats?: SmoMeasureFormat[];
168
+ /**
169
+ * the associated part, or -1 for the score
170
+ */
171
+ partIndex?: number;
172
+ }
173
+ /**
174
+ * A score can have different views - one for the score itself and one for each
175
+ * part, and each part can have its own formatting and text.
176
+ * *Note*: I may move this to part info module.
177
+ * @param measureFormats map of index to {@link SmoMeasureFormat} objects
178
+ * @param partIndex the associated part, or -1 for the score
179
+ * @category SmoObject
180
+ */
181
+ export declare class SmoFormattingManager extends SmoScoreModifierBase {
182
+ measureFormats: Record<number, SmoMeasureFormat>;
183
+ partIndex: number;
184
+ static get forScore(): number;
185
+ static get defaults(): SmoFormattingManagerParams;
186
+ constructor(params: SmoFormattingManagerParams);
187
+ /**
188
+ * Update the measure format for the measure at the given index
189
+ * @param format
190
+ */
191
+ updateMeasureFormat(format: SmoMeasureFormat, measureIndex: number): void;
192
+ /**
193
+ * Update the measure format based on the format of a given measure
194
+ * @param measure
195
+ */
196
+ updateFormat(measure: SmoMeasure): void;
197
+ serialize(): SmoMeasureFormatParamsSer[];
198
+ }
199
+ export type SmoAudioPlayerType = 'sampler' | 'synthesizer';
200
+ /**
201
+ * Constructor parameters for audio player
202
+ * @category SmoObject
203
+ */
204
+ export interface SmoAudioPlayerParameters {
205
+ playerType?: SmoAudioPlayerType;
206
+ waveform?: OscillatorType;
207
+ reverbEnable?: boolean;
208
+ reverbDelay?: number;
209
+ reverbDecay?: number;
210
+ }
211
+ /**
212
+ * web audio API defines this
213
+ * @param otype
214
+ * @returns
215
+ */
216
+ export declare function IsOscillatorType(otype: OscillatorType | string): otype is OscillatorType;
217
+ /**
218
+ * Audio playback parameters. Just fun stuff.
219
+ * @category SmoObject
220
+ */
221
+ export declare class SmoAudioPlayerSettings extends SmoScoreModifierBase {
222
+ static get defaults(): SmoAudioPlayerParameters;
223
+ static get attributes(): string[];
224
+ playerType: SmoAudioPlayerType;
225
+ waveform: OscillatorType;
226
+ reverbEnable: boolean;
227
+ reverbDelay: number;
228
+ reverbDecay: number;
229
+ constructor(params: SmoAudioPlayerParameters);
230
+ serialize(): any;
231
+ }
232
+ export type ScaledPageAttributes = 'leftMargin' | 'rightMargin' | 'topMargin' | 'bottomMargin' | 'interGap' | 'intraGap';
233
+ /**
234
+ * Constructor parameters for {@link SmoPageLayout}, part of {@link SmoLayoutManager}
235
+ * @category SmoObject
236
+ */
237
+ export interface SmoPageLayoutParams {
238
+ leftMargin: number;
239
+ rightMargin: number;
240
+ topMargin: number;
241
+ bottomMargin: number;
242
+ interGap: number;
243
+ intraGap: number;
244
+ }
245
+ /**
246
+ * Define margins and other layout information associated with a specific page, and may
247
+ * be different on different pages.
248
+ * @category SmoObject
249
+ */
250
+ export declare class SmoPageLayout extends SmoScoreModifierBase {
251
+ static get defaults(): SmoPageLayoutParams;
252
+ static get attributes(): ScaledPageAttributes[];
253
+ leftMargin: number;
254
+ rightMargin: number;
255
+ topMargin: number;
256
+ bottomMargin: number;
257
+ interGap: number;
258
+ intraGap: number;
259
+ constructor(params: SmoPageLayoutParams);
260
+ serialize(): any;
261
+ }
262
+ export type displayMode = 'vertical' | 'horizontal';
263
+ export type ScaledGlobalAttributes = 'pageWidth' | 'pageHeight';
264
+ export type GlobalLayoutAttributes = 'pageWidth' | 'pageHeight' | 'noteSpacing' | 'svgScale' | 'zoomScale' | 'proportionality' | 'maxMeasureSystem' | 'displayMode';
265
+ export type GlobalLayoutNumberAttributes = 'pageWidth' | 'pageHeight' | 'noteSpacing' | 'svgScale' | 'zoomScale' | 'proportionality' | 'maxMeasureSystem';
266
+ export declare const GlobalLayoutAttributesArray: GlobalLayoutAttributes[];
267
+ export declare const GlobalLayoutNumberAttributesArray: GlobalLayoutNumberAttributes[];
268
+ /**
269
+ * Global layout are parameters that determine the layout of the whole score, because they affect the containing svg element
270
+ * @category SmoObject
271
+ */
272
+ export interface SmoGlobalLayout {
273
+ svgScale: number;
274
+ zoomScale: number;
275
+ noteSpacing: number;
276
+ pageWidth: number;
277
+ pageHeight: number;
278
+ proportionality: number;
279
+ maxMeasureSystem: number;
280
+ displayMode: displayMode;
281
+ }
282
+ export declare function isSmoGlobalLayout(params: any): params is SmoGlobalLayout;
283
+ /**
284
+ * Used to create {@link SmoLayoutManagerParams}
285
+ * @category SmoObject
286
+ */
287
+ export interface ScaledPageLayout {
288
+ svgScale: number;
289
+ zoomScale: number;
290
+ noteSpacing: number;
291
+ pageWidth: number;
292
+ pageHeight: number;
293
+ leftMargin: number;
294
+ rightMargin: number;
295
+ topMargin: number;
296
+ bottomMargin: number;
297
+ interGap: number;
298
+ intraGap: number;
299
+ pages: number;
300
+ maxMeasureSystem: number;
301
+ displayMode: displayMode;
302
+ }
303
+ /**
304
+ * Constructor parameters for {@link SmoLayoutManager}
305
+ * @category SmoObject
306
+ */
307
+ export interface SmoLayoutManagerParams {
308
+ /**
309
+ * global svg settings for zoom, page width/height
310
+ */
311
+ globalLayout: SmoGlobalLayout;
312
+ /**
313
+ * page margins for each page
314
+ */
315
+ pageLayouts: SmoPageLayout[];
316
+ }
317
+ /**
318
+ * @category serialization
319
+ */
320
+ export interface SmoLayoutManagerParamsSer {
321
+ /**
322
+ * constructor
323
+ */
324
+ ctor: string;
325
+ /**
326
+ * global svg settings for zoom, page width/height
327
+ */
328
+ globalLayout: SmoGlobalLayout;
329
+ /**
330
+ * page margins for each page
331
+ */
332
+ pageLayouts: SmoPageLayoutParams[];
333
+ }
334
+ /**
335
+ * Storage and utilities for layout information in the score. Each
336
+ * manager has one set of page height/width, since svg element
337
+ * must have single length/width and viewbox.
338
+ * Each page can have different margins.
339
+ * @category SmoObject
340
+ */
341
+ export declare class SmoLayoutManager extends SmoScoreModifierBase {
342
+ static get defaultLayout(): SmoGlobalLayout;
343
+ static get defaults(): SmoLayoutManagerParams;
344
+ static get attributes(): GlobalLayoutAttributes[];
345
+ static get scaledPageAttributes(): ScaledPageAttributes[];
346
+ static get scaledGlobalAttributes(): ScaledGlobalAttributes[];
347
+ static areLayoutsEqual(g1: SmoGlobalLayout, g2: SmoGlobalLayout): boolean;
348
+ static isZoomChange(g1: SmoGlobalLayout, g2: SmoGlobalLayout): boolean;
349
+ /**
350
+ * Adjust zoom width so the score takes up the whole score area
351
+ */
352
+ zoomToWidth(screenWidth: number): void;
353
+ static getScaledPageLayout(globalLayout: SmoGlobalLayout, pageLayout: SmoPageLayout, pages: number): ScaledPageLayout;
354
+ globalLayout: SmoGlobalLayout;
355
+ pageLayouts: SmoPageLayout[];
356
+ constructor(params: SmoLayoutManagerParams);
357
+ trimPages(pageCount: number): void;
358
+ getZoomScale(): number;
359
+ serialize(): SmoLayoutManagerParamsSer;
360
+ updateGlobalLayout(params: SmoGlobalLayout): void;
361
+ addToPageLayouts(pageNum: number): void;
362
+ getGlobalLayout(): SmoGlobalLayout;
363
+ getScaledPageLayout(pageIndex: number): ScaledPageLayout;
364
+ getPageLayout(pageIndex: number): SmoPageLayout;
365
+ getPageLayouts(): SmoPageLayout[];
366
+ updatePage(pageLayout: SmoPageLayout, pageIndex: number): void;
367
+ }
368
+ /**
369
+ * constructor parameters for system groups (groupings of staves in the score)
370
+ * @param leftConnector
371
+ * @param rightConnector
372
+ * @param mapType
373
+ * @param text
374
+ * @param shortText
375
+ * @param justify
376
+ * @param startSelector not used
377
+ * @param endSelector not used
378
+ * @category SmoObject
379
+ */
380
+ export interface SmoSystemGroupParams {
381
+ /**
382
+ * bracket etc.
383
+ */
384
+ leftConnector: number;
385
+ /**
386
+ * bracket etc.
387
+ */
388
+ rightConnector: number;
389
+ /**
390
+ * future, score groups can be different for different parts of the score
391
+ */
392
+ mapType: number;
393
+ /**
394
+ * whether to justify the notes in the group
395
+ */
396
+ justify: boolean;
397
+ /**
398
+ * if mapped to a range, start
399
+ */
400
+ startSelector: SmoSelector;
401
+ /**
402
+ * if mapped to a range, end
403
+ */
404
+ endSelector: SmoSelector;
405
+ }
406
+ /**
407
+ * @category serialization
408
+ */
409
+ export interface SmoSystemGroupParamsSer extends SmoSystemGroupParams {
410
+ /**
411
+ * constructor
412
+ */
413
+ ctor: string;
414
+ }
415
+ /**
416
+ * System group is the grouping of staves into a system.
417
+ * @category SmoObject
418
+ * */
419
+ export declare class SmoSystemGroup extends SmoScoreModifierBase {
420
+ static get connectorTypes(): Record<string, number>;
421
+ static get connectorTypeNames(): Record<number, string>;
422
+ static get mapTypes(): Record<string, number>;
423
+ static get attributes(): string[];
424
+ static get defaults(): SmoSystemGroupParams;
425
+ static isSystemGroup(modifier: SmoSystemGroup | SmoModifierBase): modifier is SmoSystemGroup;
426
+ leftConnector: number;
427
+ rightConnector: number;
428
+ mapType: number;
429
+ text: string;
430
+ shortText: string;
431
+ justify: boolean;
432
+ startSelector: SmoSelector;
433
+ endSelector: SmoSelector;
434
+ attrs: SmoAttrs;
435
+ constructor(params: SmoSystemGroupParams);
436
+ stavesOverlap(group: SmoSystemGroup): boolean;
437
+ measuresOverlap(group: SmoSystemGroup): boolean;
438
+ overlaps(group: SmoSystemGroup): boolean;
439
+ serialize(): SmoSystemGroupParamsSer;
440
+ }
441
+ export declare const scoreModifierDynamicCtorInit: () => void;