@tspro/web-music-score 4.1.0 → 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.
Files changed (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +64 -31
  3. package/dist/audio/index.js +1 -1
  4. package/dist/audio/index.mjs +2 -2
  5. package/dist/audio-cg/index.js +1 -1
  6. package/dist/audio-cg/index.mjs +2 -2
  7. package/dist/{chunk-MHNTJ6FU.mjs → chunk-5NWLGWHS.mjs} +2 -2
  8. package/dist/chunk-7MNV5JN6.mjs +264 -0
  9. package/dist/core/index.js +2 -2
  10. package/dist/core/index.mjs +3 -3
  11. package/dist/iife/index.global.js +11 -11
  12. package/dist/{music-objects-DIaqNPjs.d.mts → music-objects-3Hxlkxy6.d.mts} +105 -19
  13. package/dist/{music-objects-xJJNlFwK.d.ts → music-objects-CI7IjsjE.d.ts} +105 -19
  14. package/dist/pieces/index.d.mts +2 -2
  15. package/dist/pieces/index.d.ts +2 -2
  16. package/dist/pieces/index.js +2 -2
  17. package/dist/pieces/index.mjs +3 -3
  18. package/dist/react-ui/index.d.mts +3 -3
  19. package/dist/react-ui/index.d.ts +3 -3
  20. package/dist/react-ui/index.js +1 -1
  21. package/dist/react-ui/index.mjs +2 -2
  22. package/dist/{scale-DQNA-YLD.d.ts → scale-DGx3tJH4.d.ts} +1 -1
  23. package/dist/{scale-bnD0WnMV.d.mts → scale-DQP3b9Zx.d.mts} +1 -1
  24. package/dist/score/index.d.mts +43 -21
  25. package/dist/score/index.d.ts +43 -21
  26. package/dist/score/index.js +776 -249
  27. package/dist/score/index.mjs +495 -219
  28. package/dist/{tempo-Bp1UzsrZ.d.ts → tempo-GrstpD9G.d.ts} +2 -0
  29. package/dist/{tempo-S85Q7uJA.d.mts → tempo-dkctPkCS.d.mts} +2 -0
  30. package/dist/theory/index.d.mts +3 -3
  31. package/dist/theory/index.d.ts +3 -3
  32. package/dist/theory/index.js +4 -1
  33. package/dist/theory/index.mjs +28 -269
  34. package/package.json +6 -2
@@ -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-bnD0WnMV.mjs';
3
+ import { c as Scale, S as ScaleType } from '../scale-DQP3b9Zx.mjs';
4
4
  import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.mjs';
5
5
  import { H as Handedness } from '../guitar-DdexKdN6.mjs';
6
- import { D as DivRect, M as MDocument, l as ScoreEventListener, n as MRenderer, o as MPlaybackButtons } from '../music-objects-DIaqNPjs.mjs';
7
- import '../tempo-S85Q7uJA.mjs';
6
+ import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-3Hxlkxy6.mjs';
7
+ import '../tempo-dkctPkCS.mjs';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
10
10
  interface CircleOfFifthsProps {
@@ -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-DQNA-YLD.js';
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, l as ScoreEventListener, n as MRenderer, o as MPlaybackButtons } from '../music-objects-xJJNlFwK.js';
7
- import '../tempo-Bp1UzsrZ.js';
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 {
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v4.1.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
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;
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v4.1.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-MHNTJ6FU.mjs";
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-Bp1UzsrZ.js';
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-S85Q7uJA.mjs';
2
+ import { K as KeySignature } from './tempo-dkctPkCS.mjs';
3
3
 
4
4
  /** Interval direction type. */
5
5
  type IntervalDirection = "Unison" | "Ascending" | "Descending";
@@ -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, F as Fermata, b as StaffTabOrGroups, c as Navigation, A as AnnotationText, d as Annotation, L as Label, C as Connective, e as TieType, f as NoteAnchor, g as VerticalPosition } from '../music-objects-DIaqNPjs.mjs';
2
- export { a6 as Arpeggio, $ as Clef, D as DivRect, a8 as DynamicsAnnotation, q as MAccidental, s as MArpeggio, E as MBarLineLeft, B as MBarLineRight, t as MBeamGroup, r as MConnective, v as MEnding, _ as MExtensionLine, w as MFermata, x as MHeader, y as MImage, z as MMeasure, H as MNoteGroup, o as MPlaybackButtons, m as MPlayer, n as MRenderer, K as MRest, P as MRhythmColumn, Q as MScoreRow, X as MSignature, Y as MSpecialText, U as MStaff, u as MStaffBeamGroup, I as MStaffNoteGroup, O as MStaffRest, G as MStaffTabBarLine, W as MTab, J as MTabNoteGroup, Z as MText, p as MusicInterface, aa as PlayState, ab as PlayStateChangeListener, i as ScoreEvent, l as ScoreEventListener, h as ScoreEventType, k as ScoreObjectEvent, j as ScoreStaffPosEvent, a0 as StaffConfig, a7 as StaffTabOrGroup, a5 as Stem, a3 as StringNumber, a1 as TabConfig, a9 as TempoAnnotation, a4 as getStringNumbers, a2 as getVoiceIds } from '../music-objects-DIaqNPjs.mjs';
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-bnD0WnMV.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-S85Q7uJA.mjs';
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 - Note instance of Note or string (e.g. "D4").
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 options - Note options.
14
+ * @param noteOptions - Note options.
15
15
  * @returns - This tuplet builder object.
16
16
  */
17
- addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
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 options - Note options.
22
+ * @param noteOptions - Note options.
23
23
  * @returns - This tuplet builder object.
24
24
  */
25
- addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
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 options - Rest options.
29
+ * @param restOptions - Rest options.
30
30
  * @returns - This tuplet builder object.
31
31
  */
32
- addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
32
+ addRest: (restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions) => TupletBuilder;
33
33
  };
34
34
  /** Etension builder type. */
35
35
  type ExtensionBuilder = {
@@ -181,30 +181,31 @@ declare class DocumentBuilder {
181
181
  */
182
182
  setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
183
183
  /**
184
- * Add note o current measure.
184
+ * Add note to current measure.
185
185
  * @param voiceId - Voice id to add note to.
186
- * @param note - Note instance of Note or string (e.g. "D4").
186
+ * @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
187
187
  * @param noteLength - Note length (e.g. "4n").
188
- * @param options - Note options.
188
+ * @param noteOptions - Note options.
189
189
  * @returns - This document builder instance.
190
190
  */
191
- addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
191
+ addNote(voiceId: VoiceId, note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
192
192
  /**
193
+ * Add chord to current measure.
193
194
  * @param voiceId - Voice id to add chord to.
194
195
  * @param notes - Array of notes, each instance of Note or string (e.g. "D4").
195
196
  * @param noteLength - Note length (e.g. "4n").
196
- * @param options - Note options.
197
+ * @param noteOptions - Note options.
197
198
  * @returns - This document builder instance.
198
199
  */
199
- addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
200
+ addChord(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
200
201
  /**
201
- *
202
+ * Add rest to current measure.
202
203
  * @param voiceId - Voice id to add rest to.
203
204
  * @param restLength - Rest length (e.g. "4n").
204
- * @param options - Rest options.
205
+ * @param restOptions - Rest options.
205
206
  * @returns - This document builder instance.
206
207
  */
207
- addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
208
+ addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions): DocumentBuilder;
208
209
  /**
209
210
  * Usage:
210
211
  * <pre>
@@ -221,6 +222,27 @@ declare class DocumentBuilder {
221
222
  * @returns - This document builder instance.
222
223
  */
223
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;
224
246
  private addFermataInternal;
225
247
  /**
226
248
  * Add fermata to current measure.
@@ -399,4 +421,4 @@ declare class DocumentBuilder {
399
421
  addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
400
422
  }
401
423
 
402
- 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 };
@@ -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, F as Fermata, b as StaffTabOrGroups, c as Navigation, A as AnnotationText, d as Annotation, L as Label, C as Connective, e as TieType, f as NoteAnchor, g as VerticalPosition } from '../music-objects-xJJNlFwK.js';
2
- export { a6 as Arpeggio, $ as Clef, D as DivRect, a8 as DynamicsAnnotation, q as MAccidental, s as MArpeggio, E as MBarLineLeft, B as MBarLineRight, t as MBeamGroup, r as MConnective, v as MEnding, _ as MExtensionLine, w as MFermata, x as MHeader, y as MImage, z as MMeasure, H as MNoteGroup, o as MPlaybackButtons, m as MPlayer, n as MRenderer, K as MRest, P as MRhythmColumn, Q as MScoreRow, X as MSignature, Y as MSpecialText, U as MStaff, u as MStaffBeamGroup, I as MStaffNoteGroup, O as MStaffRest, G as MStaffTabBarLine, W as MTab, J as MTabNoteGroup, Z as MText, p as MusicInterface, aa as PlayState, ab as PlayStateChangeListener, i as ScoreEvent, l as ScoreEventListener, h as ScoreEventType, k as ScoreObjectEvent, j as ScoreStaffPosEvent, a0 as StaffConfig, a7 as StaffTabOrGroup, a5 as Stem, a3 as StringNumber, a1 as TabConfig, a9 as TempoAnnotation, a4 as getStringNumbers, a2 as getVoiceIds } from '../music-objects-xJJNlFwK.js';
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-DQNA-YLD.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-Bp1UzsrZ.js';
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 - Note instance of Note or string (e.g. "D4").
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 options - Note options.
14
+ * @param noteOptions - Note options.
15
15
  * @returns - This tuplet builder object.
16
16
  */
17
- addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
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 options - Note options.
22
+ * @param noteOptions - Note options.
23
23
  * @returns - This tuplet builder object.
24
24
  */
25
- addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
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 options - Rest options.
29
+ * @param restOptions - Rest options.
30
30
  * @returns - This tuplet builder object.
31
31
  */
32
- addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
32
+ addRest: (restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions) => TupletBuilder;
33
33
  };
34
34
  /** Etension builder type. */
35
35
  type ExtensionBuilder = {
@@ -181,30 +181,31 @@ declare class DocumentBuilder {
181
181
  */
182
182
  setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
183
183
  /**
184
- * Add note o current measure.
184
+ * Add note to current measure.
185
185
  * @param voiceId - Voice id to add note to.
186
- * @param note - Note instance of Note or string (e.g. "D4").
186
+ * @param note - Instance of Note or string, single value (e.g. "C4") or array (e.g. ["C4", "E4", "G4"]).
187
187
  * @param noteLength - Note length (e.g. "4n").
188
- * @param options - Note options.
188
+ * @param noteOptions - Note options.
189
189
  * @returns - This document builder instance.
190
190
  */
191
- addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
191
+ addNote(voiceId: VoiceId, note: Note | string | (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
192
192
  /**
193
+ * Add chord to current measure.
193
194
  * @param voiceId - Voice id to add chord to.
194
195
  * @param notes - Array of notes, each instance of Note or string (e.g. "D4").
195
196
  * @param noteLength - Note length (e.g. "4n").
196
- * @param options - Note options.
197
+ * @param noteOptions - Note options.
197
198
  * @returns - This document builder instance.
198
199
  */
199
- addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
200
+ addChord(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, noteOptions?: NoteOptions): DocumentBuilder;
200
201
  /**
201
- *
202
+ * Add rest to current measure.
202
203
  * @param voiceId - Voice id to add rest to.
203
204
  * @param restLength - Rest length (e.g. "4n").
204
- * @param options - Rest options.
205
+ * @param restOptions - Rest options.
205
206
  * @returns - This document builder instance.
206
207
  */
207
- addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
208
+ addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, restOptions?: RestOptions): DocumentBuilder;
208
209
  /**
209
210
  * Usage:
210
211
  * <pre>
@@ -221,6 +222,27 @@ declare class DocumentBuilder {
221
222
  * @returns - This document builder instance.
222
223
  */
223
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;
224
246
  private addFermataInternal;
225
247
  /**
226
248
  * Add fermata to current measure.
@@ -399,4 +421,4 @@ declare class DocumentBuilder {
399
421
  addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
400
422
  }
401
423
 
402
- 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 };