@tspro/web-music-score 4.0.1 → 4.2.0
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/CHANGELOG.md +13 -0
- package/README.md +70 -28
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-YFPLOHP2.mjs → chunk-5NWLGWHS.mjs} +2 -2
- package/dist/chunk-7MNV5JN6.mjs +264 -0
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/iife/index.global.js +11 -11
- package/dist/{music-objects-DJQ4d2OA.d.mts → music-objects-3Hxlkxy6.d.mts} +172 -80
- package/dist/{music-objects-Dc3kR-XF.d.ts → music-objects-CI7IjsjE.d.ts} +172 -80
- package/dist/pieces/index.d.mts +2 -2
- package/dist/pieces/index.d.ts +2 -2
- package/dist/pieces/index.js +3 -3
- package/dist/pieces/index.mjs +4 -4
- package/dist/react-ui/index.d.mts +3 -3
- package/dist/react-ui/index.d.ts +3 -3
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-B2Icbetz.d.ts → scale-DGx3tJH4.d.ts} +1 -1
- package/dist/{scale-BbDJTbrG.d.mts → scale-DQP3b9Zx.d.mts} +1 -1
- package/dist/score/index.d.mts +60 -23
- package/dist/score/index.d.ts +60 -23
- package/dist/score/index.js +910 -349
- package/dist/score/index.mjs +630 -320
- package/dist/{tempo-Dt8aHpol.d.ts → tempo-GrstpD9G.d.ts} +42 -10
- package/dist/{tempo-CtUhvJbr.d.mts → tempo-dkctPkCS.d.mts} +42 -10
- package/dist/theory/index.d.mts +3 -3
- package/dist/theory/index.d.ts +3 -3
- package/dist/theory/index.js +70 -20
- package/dist/theory/index.mjs +84 -280
- package/package.json +8 -3
package/dist/react-ui/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { c as Scale, S as ScaleType } from '../scale-
|
|
3
|
+
import { c as Scale, S as ScaleType } from '../scale-DGx3tJH4.js';
|
|
4
4
|
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.js';
|
|
5
5
|
import { H as Handedness } from '../guitar-CaZJDA05.js';
|
|
6
|
-
import { D as DivRect, M as MDocument,
|
|
7
|
-
import '../tempo-
|
|
6
|
+
import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-CI7IjsjE.js';
|
|
7
|
+
import '../tempo-GrstpD9G.js';
|
|
8
8
|
import '@tspro/ts-utils-lib';
|
|
9
9
|
|
|
10
10
|
interface CircleOfFifthsProps {
|
package/dist/react-ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v4.0
|
|
1
|
+
/* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist/react-ui/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v4.0
|
|
1
|
+
/* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-5NWLGWHS.mjs";
|
|
5
5
|
|
|
6
6
|
// src/react-ui/circle-of-fifths.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as Note, S as SymbolSet } from './note-eA2xPPiG.js';
|
|
2
|
-
import { K as KeySignature } from './tempo-
|
|
2
|
+
import { K as KeySignature } from './tempo-GrstpD9G.js';
|
|
3
3
|
|
|
4
4
|
/** Interval direction type. */
|
|
5
5
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as Note, S as SymbolSet } from './note-eA2xPPiG.mjs';
|
|
2
|
-
import { K as KeySignature } from './tempo-
|
|
2
|
+
import { K as KeySignature } from './tempo-dkctPkCS.mjs';
|
|
3
3
|
|
|
4
4
|
/** Interval direction type. */
|
|
5
5
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
package/dist/score/index.d.mts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-3Hxlkxy6.mjs';
|
|
2
|
+
export { aa as Arpeggio, a2 as Clef, D as DivRect, ae as DynamicsAnnotation, ac as LyricsAlign, ad as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a1 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a0 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, Z as MSignature, _ as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MText, r as MusicInterface, ag as PlayState, ah as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a3 as StaffConfig, ab as StaffTabOrGroup, a9 as Stem, a6 as StringNumber, a4 as TabConfig, af as TempoAnnotation, a7 as getStringNumbers, a8 as getVerseNumbers, a5 as getVoiceIds } from '../music-objects-3Hxlkxy6.mjs';
|
|
3
3
|
import { N as Note } from '../note-eA2xPPiG.mjs';
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { N as NoteLength,
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-DQP3b9Zx.mjs';
|
|
5
|
+
import { N as NoteLength, i as NoteLengthStr, K as KeySignature, b as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-dkctPkCS.mjs';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
8
|
/** Tuplet builder type. */
|
|
9
9
|
type TupletBuilder = {
|
|
10
10
|
/**
|
|
11
11
|
* Add note to a tuplet.
|
|
12
|
-
* @param note -
|
|
12
|
+
* @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
|
|
13
13
|
* @param noteLength - Note length (e.g. "4n").
|
|
14
|
-
* @param
|
|
14
|
+
* @param noteOptions - Note options.
|
|
15
15
|
* @returns - This tuplet builder object.
|
|
16
16
|
*/
|
|
17
|
-
addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr,
|
|
17
|
+
addNote: (note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions) => TupletBuilder;
|
|
18
18
|
/**
|
|
19
19
|
* Add chord to a tuplet.
|
|
20
20
|
* @param notes - Array of notes, each instance of Note or string (e.g. "D4").
|
|
21
21
|
* @param noteLength - Note length (e.g. "4n").
|
|
22
|
-
* @param
|
|
22
|
+
* @param noteOptions - Note options.
|
|
23
23
|
* @returns - This tuplet builder object.
|
|
24
24
|
*/
|
|
25
|
-
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr,
|
|
25
|
+
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions) => TupletBuilder;
|
|
26
26
|
/**
|
|
27
27
|
* Add rest to a tuplet.
|
|
28
28
|
* @param restLength - Rest length (e.g. "4n").
|
|
29
|
-
* @param
|
|
29
|
+
* @param restOptions - Rest options.
|
|
30
30
|
* @returns - This tuplet builder object.
|
|
31
31
|
*/
|
|
32
|
-
addRest: (restLength: NoteLength | NoteLengthStr,
|
|
32
|
+
addRest: (restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions) => TupletBuilder;
|
|
33
33
|
};
|
|
34
34
|
/** Etension builder type. */
|
|
35
35
|
type ExtensionBuilder = {
|
|
@@ -140,10 +140,25 @@ declare class DocumentBuilder {
|
|
|
140
140
|
setKeySignature(scale: Scale): DocumentBuilder;
|
|
141
141
|
/**
|
|
142
142
|
* Set time signature for current measure and forward.
|
|
143
|
-
* @param timeSignature - TimeSignature
|
|
143
|
+
* @param timeSignature - TimeSignature object instance.
|
|
144
144
|
* @returns - This document builder instance.
|
|
145
145
|
*/
|
|
146
|
-
setTimeSignature(timeSignature: TimeSignature
|
|
146
|
+
setTimeSignature(timeSignature: TimeSignature): DocumentBuilder;
|
|
147
|
+
/**
|
|
148
|
+
* Set time signature for current measure and forward.
|
|
149
|
+
* @param timeSignature - TimeSignatures enum value or string (e.g. "3/4").
|
|
150
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
151
|
+
* @returns - This document builder instance.
|
|
152
|
+
*/
|
|
153
|
+
setTimeSignature(timeSignature: TimeSignatures | `${TimeSignatures}`, beamGrouping?: BeamGrouping | `${BeamGrouping}`): DocumentBuilder;
|
|
154
|
+
/**
|
|
155
|
+
* Set time signature for current measure and forward.
|
|
156
|
+
* @param beatCount - Beat count of time signature (e.g. 3 in "3/4").
|
|
157
|
+
* @param beatSize - Beat size of time signature (e.g. 4 in "3/4").
|
|
158
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
159
|
+
* @returns - This document builder instance.
|
|
160
|
+
*/
|
|
161
|
+
setTimeSignature(beatCount: number, beatSize: number, beamGrouping?: BeamGrouping | `${BeamGrouping}`): DocumentBuilder;
|
|
147
162
|
/**
|
|
148
163
|
* Set tempo.
|
|
149
164
|
* @param beatsPerMinute - Tempo beats per minute.
|
|
@@ -166,30 +181,31 @@ declare class DocumentBuilder {
|
|
|
166
181
|
*/
|
|
167
182
|
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
|
|
168
183
|
/**
|
|
169
|
-
* Add note
|
|
184
|
+
* Add note to current measure.
|
|
170
185
|
* @param voiceId - Voice id to add note to.
|
|
171
|
-
* @param note -
|
|
186
|
+
* @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
|
|
172
187
|
* @param noteLength - Note length (e.g. "4n").
|
|
173
|
-
* @param
|
|
188
|
+
* @param noteOptions - Note options.
|
|
174
189
|
* @returns - This document builder instance.
|
|
175
190
|
*/
|
|
176
|
-
addNote(voiceId:
|
|
191
|
+
addNote(voiceId: VoiceId, note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
|
|
177
192
|
/**
|
|
193
|
+
* Add chord to current measure.
|
|
178
194
|
* @param voiceId - Voice id to add chord to.
|
|
179
195
|
* @param notes - Array of notes, each instance of Note or string (e.g. "D4").
|
|
180
196
|
* @param noteLength - Note length (e.g. "4n").
|
|
181
|
-
* @param
|
|
197
|
+
* @param noteOptions - Note options.
|
|
182
198
|
* @returns - This document builder instance.
|
|
183
199
|
*/
|
|
184
|
-
addChord(voiceId:
|
|
200
|
+
addChord(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
|
|
185
201
|
/**
|
|
186
|
-
*
|
|
202
|
+
* Add rest to current measure.
|
|
187
203
|
* @param voiceId - Voice id to add rest to.
|
|
188
204
|
* @param restLength - Rest length (e.g. "4n").
|
|
189
|
-
* @param
|
|
205
|
+
* @param restOptions - Rest options.
|
|
190
206
|
* @returns - This document builder instance.
|
|
191
207
|
*/
|
|
192
|
-
addRest(voiceId:
|
|
208
|
+
addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions): DocumentBuilder;
|
|
193
209
|
/**
|
|
194
210
|
* Usage:
|
|
195
211
|
* <pre>
|
|
@@ -206,6 +222,27 @@ declare class DocumentBuilder {
|
|
|
206
222
|
* @returns - This document builder instance.
|
|
207
223
|
*/
|
|
208
224
|
addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
|
|
225
|
+
private currentLyricsAlign;
|
|
226
|
+
private addLyricsInternal;
|
|
227
|
+
/**
|
|
228
|
+
* Add lyrics to current measure.
|
|
229
|
+
* @param verse - Verse number (e.g. 1).
|
|
230
|
+
* @param lyricsLength - Lyrics text length (e.g. "2n").
|
|
231
|
+
* @param lyricsText - Lyrics text (empty space if omitted), single value or array.
|
|
232
|
+
* @param lyricsOptions - Lyrics options.
|
|
233
|
+
* @returns - This document builder instance.
|
|
234
|
+
*/
|
|
235
|
+
addLyrics(verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
|
|
236
|
+
/**
|
|
237
|
+
* Add lyrics to current measure to given staff/tab/group.
|
|
238
|
+
* @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
|
|
239
|
+
* @param verse - Verse number (e.g. 1).
|
|
240
|
+
* @param lyricsLength - Lyrics text length (e.g. "2n").
|
|
241
|
+
* @param lyricsText - Lyrics text (empty space if omitted), single value or array.
|
|
242
|
+
* @param lyricsOptions - Lyrics options.
|
|
243
|
+
* @returns - This document builder instance.
|
|
244
|
+
*/
|
|
245
|
+
addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
|
|
209
246
|
private addFermataInternal;
|
|
210
247
|
/**
|
|
211
248
|
* Add fermata to current measure.
|
|
@@ -384,4 +421,4 @@ declare class DocumentBuilder {
|
|
|
384
421
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
385
422
|
}
|
|
386
423
|
|
|
387
|
-
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };
|
|
424
|
+
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, LyricsOptions, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerseNumber, VerticalPosition, VoiceId };
|
package/dist/score/index.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-CI7IjsjE.js';
|
|
2
|
+
export { aa as Arpeggio, a2 as Clef, D as DivRect, ae as DynamicsAnnotation, ac as LyricsAlign, ad as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a1 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a0 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, Z as MSignature, _ as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MText, r as MusicInterface, ag as PlayState, ah as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a3 as StaffConfig, ab as StaffTabOrGroup, a9 as Stem, a6 as StringNumber, a4 as TabConfig, af as TempoAnnotation, a7 as getStringNumbers, a8 as getVerseNumbers, a5 as getVoiceIds } from '../music-objects-CI7IjsjE.js';
|
|
3
3
|
import { N as Note } from '../note-eA2xPPiG.js';
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { N as NoteLength,
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-DGx3tJH4.js';
|
|
5
|
+
import { N as NoteLength, i as NoteLengthStr, K as KeySignature, b as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-GrstpD9G.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
8
|
/** Tuplet builder type. */
|
|
9
9
|
type TupletBuilder = {
|
|
10
10
|
/**
|
|
11
11
|
* Add note to a tuplet.
|
|
12
|
-
* @param note -
|
|
12
|
+
* @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
|
|
13
13
|
* @param noteLength - Note length (e.g. "4n").
|
|
14
|
-
* @param
|
|
14
|
+
* @param noteOptions - Note options.
|
|
15
15
|
* @returns - This tuplet builder object.
|
|
16
16
|
*/
|
|
17
|
-
addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr,
|
|
17
|
+
addNote: (note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions) => TupletBuilder;
|
|
18
18
|
/**
|
|
19
19
|
* Add chord to a tuplet.
|
|
20
20
|
* @param notes - Array of notes, each instance of Note or string (e.g. "D4").
|
|
21
21
|
* @param noteLength - Note length (e.g. "4n").
|
|
22
|
-
* @param
|
|
22
|
+
* @param noteOptions - Note options.
|
|
23
23
|
* @returns - This tuplet builder object.
|
|
24
24
|
*/
|
|
25
|
-
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr,
|
|
25
|
+
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions) => TupletBuilder;
|
|
26
26
|
/**
|
|
27
27
|
* Add rest to a tuplet.
|
|
28
28
|
* @param restLength - Rest length (e.g. "4n").
|
|
29
|
-
* @param
|
|
29
|
+
* @param restOptions - Rest options.
|
|
30
30
|
* @returns - This tuplet builder object.
|
|
31
31
|
*/
|
|
32
|
-
addRest: (restLength: NoteLength | NoteLengthStr,
|
|
32
|
+
addRest: (restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions) => TupletBuilder;
|
|
33
33
|
};
|
|
34
34
|
/** Etension builder type. */
|
|
35
35
|
type ExtensionBuilder = {
|
|
@@ -140,10 +140,25 @@ declare class DocumentBuilder {
|
|
|
140
140
|
setKeySignature(scale: Scale): DocumentBuilder;
|
|
141
141
|
/**
|
|
142
142
|
* Set time signature for current measure and forward.
|
|
143
|
-
* @param timeSignature - TimeSignature
|
|
143
|
+
* @param timeSignature - TimeSignature object instance.
|
|
144
144
|
* @returns - This document builder instance.
|
|
145
145
|
*/
|
|
146
|
-
setTimeSignature(timeSignature: TimeSignature
|
|
146
|
+
setTimeSignature(timeSignature: TimeSignature): DocumentBuilder;
|
|
147
|
+
/**
|
|
148
|
+
* Set time signature for current measure and forward.
|
|
149
|
+
* @param timeSignature - TimeSignatures enum value or string (e.g. "3/4").
|
|
150
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
151
|
+
* @returns - This document builder instance.
|
|
152
|
+
*/
|
|
153
|
+
setTimeSignature(timeSignature: TimeSignatures | `${TimeSignatures}`, beamGrouping?: BeamGrouping | `${BeamGrouping}`): DocumentBuilder;
|
|
154
|
+
/**
|
|
155
|
+
* Set time signature for current measure and forward.
|
|
156
|
+
* @param beatCount - Beat count of time signature (e.g. 3 in "3/4").
|
|
157
|
+
* @param beatSize - Beat size of time signature (e.g. 4 in "3/4").
|
|
158
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
159
|
+
* @returns - This document builder instance.
|
|
160
|
+
*/
|
|
161
|
+
setTimeSignature(beatCount: number, beatSize: number, beamGrouping?: BeamGrouping | `${BeamGrouping}`): DocumentBuilder;
|
|
147
162
|
/**
|
|
148
163
|
* Set tempo.
|
|
149
164
|
* @param beatsPerMinute - Tempo beats per minute.
|
|
@@ -166,30 +181,31 @@ declare class DocumentBuilder {
|
|
|
166
181
|
*/
|
|
167
182
|
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
|
|
168
183
|
/**
|
|
169
|
-
* Add note
|
|
184
|
+
* Add note to current measure.
|
|
170
185
|
* @param voiceId - Voice id to add note to.
|
|
171
|
-
* @param note -
|
|
186
|
+
* @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
|
|
172
187
|
* @param noteLength - Note length (e.g. "4n").
|
|
173
|
-
* @param
|
|
188
|
+
* @param noteOptions - Note options.
|
|
174
189
|
* @returns - This document builder instance.
|
|
175
190
|
*/
|
|
176
|
-
addNote(voiceId:
|
|
191
|
+
addNote(voiceId: VoiceId, note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
|
|
177
192
|
/**
|
|
193
|
+
* Add chord to current measure.
|
|
178
194
|
* @param voiceId - Voice id to add chord to.
|
|
179
195
|
* @param notes - Array of notes, each instance of Note or string (e.g. "D4").
|
|
180
196
|
* @param noteLength - Note length (e.g. "4n").
|
|
181
|
-
* @param
|
|
197
|
+
* @param noteOptions - Note options.
|
|
182
198
|
* @returns - This document builder instance.
|
|
183
199
|
*/
|
|
184
|
-
addChord(voiceId:
|
|
200
|
+
addChord(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
|
|
185
201
|
/**
|
|
186
|
-
*
|
|
202
|
+
* Add rest to current measure.
|
|
187
203
|
* @param voiceId - Voice id to add rest to.
|
|
188
204
|
* @param restLength - Rest length (e.g. "4n").
|
|
189
|
-
* @param
|
|
205
|
+
* @param restOptions - Rest options.
|
|
190
206
|
* @returns - This document builder instance.
|
|
191
207
|
*/
|
|
192
|
-
addRest(voiceId:
|
|
208
|
+
addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions): DocumentBuilder;
|
|
193
209
|
/**
|
|
194
210
|
* Usage:
|
|
195
211
|
* <pre>
|
|
@@ -206,6 +222,27 @@ declare class DocumentBuilder {
|
|
|
206
222
|
* @returns - This document builder instance.
|
|
207
223
|
*/
|
|
208
224
|
addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
|
|
225
|
+
private currentLyricsAlign;
|
|
226
|
+
private addLyricsInternal;
|
|
227
|
+
/**
|
|
228
|
+
* Add lyrics to current measure.
|
|
229
|
+
* @param verse - Verse number (e.g. 1).
|
|
230
|
+
* @param lyricsLength - Lyrics text length (e.g. "2n").
|
|
231
|
+
* @param lyricsText - Lyrics text (empty space if omitted), single value or array.
|
|
232
|
+
* @param lyricsOptions - Lyrics options.
|
|
233
|
+
* @returns - This document builder instance.
|
|
234
|
+
*/
|
|
235
|
+
addLyrics(verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
|
|
236
|
+
/**
|
|
237
|
+
* Add lyrics to current measure to given staff/tab/group.
|
|
238
|
+
* @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
|
|
239
|
+
* @param verse - Verse number (e.g. 1).
|
|
240
|
+
* @param lyricsLength - Lyrics text length (e.g. "2n").
|
|
241
|
+
* @param lyricsText - Lyrics text (empty space if omitted), single value or array.
|
|
242
|
+
* @param lyricsOptions - Lyrics options.
|
|
243
|
+
* @returns - This document builder instance.
|
|
244
|
+
*/
|
|
245
|
+
addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
|
|
209
246
|
private addFermataInternal;
|
|
210
247
|
/**
|
|
211
248
|
* Add fermata to current measure.
|
|
@@ -384,4 +421,4 @@ declare class DocumentBuilder {
|
|
|
384
421
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
385
422
|
}
|
|
386
423
|
|
|
387
|
-
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };
|
|
424
|
+
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, LyricsOptions, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerseNumber, VerticalPosition, VoiceId };
|