@tspro/web-music-score 3.2.0 → 4.0.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 +26 -10
- package/README.md +189 -331
- package/dist/audio/index.d.ts +1 -1
- 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-LCTM7BID.mjs → chunk-D643HZHM.mjs} +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/{guitar-C2Cp71NZ.d.ts → guitar-cNmE-EvH.d.ts} +1 -1
- package/dist/iife/index.global.js +11 -11
- package/dist/{interface-BlNl69uT.d.ts → interface-7k8qGG44.d.ts} +89 -81
- package/dist/{interface-Bn5HFt_U.d.mts → interface-XoKiryoV.d.mts} +88 -80
- package/dist/{note-BFa43I86.d.ts → note-CcVdUFqS.d.ts} +1 -1
- package/dist/pieces/index.d.mts +2 -2
- package/dist/pieces/index.d.ts +3 -3
- package/dist/pieces/index.js +4 -7
- package/dist/pieces/index.mjs +8 -11
- package/dist/react-ui/index.d.mts +3 -3
- package/dist/react-ui/index.d.ts +5 -5
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-DRR-t4Kr.d.mts → scale-C2pCNxdE.d.mts} +4 -3
- package/dist/{scale-ebJm37q1.d.ts → scale-CvPbJvfN.d.ts} +5 -4
- package/dist/score/index.d.mts +98 -31
- package/dist/score/index.d.ts +99 -32
- package/dist/score/index.js +748 -567
- package/dist/score/index.mjs +755 -574
- package/dist/tempo-BAYoZ_Li.d.mts +187 -0
- package/dist/tempo-r2sb6Ku2.d.ts +187 -0
- package/dist/theory/index.d.mts +3 -3
- package/dist/theory/index.d.ts +6 -6
- package/dist/theory/index.js +221 -78
- package/dist/theory/index.mjs +218 -76
- package/package.json +2 -2
- package/dist/tempo-B4h5Ktob.d.mts +0 -104
- package/dist/tempo-DgqDEsn0.d.ts +0 -104
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
2
|
-
import "../chunk-
|
|
1
|
+
/* WebMusicScore v4.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
|
+
import "../chunk-D643HZHM.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pieces/frere-jacques.ts
|
|
5
|
-
import {
|
|
6
|
-
import { DocumentBuilder, StaffPreset } from "@tspro/web-music-score/score";
|
|
5
|
+
import { DocumentBuilder } from "@tspro/web-music-score/score";
|
|
7
6
|
function createFrereJacques() {
|
|
8
|
-
return new DocumentBuilder().setScoreConfiguration(
|
|
7
|
+
return new DocumentBuilder().setScoreConfiguration("guitarTreble").setHeader("Frere Jacques").addMeasure().setKeySignature("G", "Major").setTimeSignature("4/4").addNote(0, "G3", "4n").addNote(0, "A3", "4n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "G3", "4n").addNote(0, "A3", "4n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "B3", "4n").addNote(0, "C4", "4n").addNote(0, "D4", "2n").endRow().addMeasure().addNote(0, "B3", "4n").addNote(0, "C4", "4n").addNote(0, "D4", "2n").addMeasure().addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(0, "C4", "8n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").endRow().addMeasure().addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(0, "C4", "8n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "G3", "4n").addNote(0, "D3", "4n").addNote(0, "G3", "2n").addMeasure().addNote(0, "G3", "4n").addNote(0, "D3", "4n").addNote(0, "G3", "2n").getDocument();
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
// src/pieces/greensleeves.ts
|
|
12
|
-
import {
|
|
13
|
-
import { Arpeggio, Navigation, StaffPreset as StaffPreset2, Stem, Label, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
|
|
11
|
+
import { Navigation, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
|
|
14
12
|
function createGreensleeves() {
|
|
15
|
-
return new DocumentBuilder2().setScoreConfiguration(
|
|
13
|
+
return new DocumentBuilder2().setScoreConfiguration("guitarTreble").setHeader("Greensleeves").addMeasure().setKeySignature("C", "Major").setTimeSignature("6/8").setTempo(140).addNote(0, "A3", "8n").addMeasure().addNavigation(Navigation.StartRepeat).addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "D4", "8n").addNote(0, "E4", "8.").addNote(0, "F4", "16n").addNote(0, "E4", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "A2", "8n").addNote(1, "E3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "8n").addNote(0, "A3", "8.").addLabel("chord", "F").addNote(0, "G#3", "16n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F2", "8n").addNote(1, "A2", "4n").addMeasure().addNote(0, "B3", "4n", { stem: "up" }).addLabel("chord", "E").addNote(0, "G#3", "8n").addNote(0, "E3", "4n").addNote(0, "A3", "8n").addNote(1, "E2", "8n", { stem: "down" }).addNote(1, "B2", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").endRow().addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "D4", "8n").addNote(0, "E4", "8.").addNote(0, "F4", "16n").addNote(0, "E4", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "A2", "8n").addNote(1, "E3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "8.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "B3", "16n").addNote(0, "A3", "8n").addNote(0, "G#3", "8.").addLabel("chord", "E").addNote(0, "F#3", "16n").addNote(0, "G#3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4.").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], "4.", { arpeggio: "up", stem: "up" }).addLabel("chord", "C").addNote(0, "G4", "8.").addNote(0, "F#4", "16n").addNote(0, "E4", "8n").addRest(1, "4.", { hide: true }).addNote(1, "C3", "8n", { stem: "down" }).addNote(1, "G3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "8n").addNote(0, "A3", "8.").addLabel("chord", "F").addNote(0, "G#3", "16n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F2", "8n").addNote(1, "A2", "4n").addMeasure().addNote(0, "B3", "4n", { stem: "up" }).addLabel("chord", "E").addNote(0, "G#3", "8n").addNote(0, "E3", "4.").addNote(1, "E2", "8n", { stem: "down" }).addNote(1, "B2", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "8n").addNote(1, "E3", "8n").endRow().addMeasure().addNote(0, "G4", "4.", { stem: "up" }).addLabel("chord", "C").addNote(0, "G4", "8.").addNote(0, "F#4", "16n").addNote(0, "E4", "8n").addNote(1, "C3", "8n", { stem: "down" }).addNote(1, "G3", "8n").addNote(1, "C4", "8n").addNote(1, "C3", "8n").addNote(1, "G3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "8.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "B3", "16n").addNote(0, "A3", "8n").addNote(0, "G#3", "8.").addLabel("chord", "E").addNote(0, "F#3", "16n").addNote(0, "G#3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNavigation("ending", 1).addNavigation("endRepeat").addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").addMeasure().addNavigation("ending", 2).addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4.").addFermata().addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").getDocument();
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
// src/pieces/andante-diabelli.ts
|
|
19
|
-
import {
|
|
20
|
-
import { NoteAnchor, Navigation as Navigation2, Annotation, StaffPreset as StaffPreset3, Stem as Stem2, DocumentBuilder as DocumentBuilder3, Connective } from "@tspro/web-music-score/score";
|
|
17
|
+
import { DocumentBuilder as DocumentBuilder3 } from "@tspro/web-music-score/score";
|
|
21
18
|
function createAndanteByDiabelli() {
|
|
22
|
-
return new DocumentBuilder3().setScoreConfiguration(
|
|
19
|
+
return new DocumentBuilder3().setScoreConfiguration("guitarTreble").setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", "Major").setTimeSignature("3/4").setTempo(80).addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "p").addNote(0, "F#4", "8n", { stem: "up" }).addNote(0, "G4", "8n").addConnective("slur", 2, "below").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(1, "D3", "2.", { stem: "down" }).addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "4n").addNote(1, "A2", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "f").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").endRow().addMeasure().addNote(0, "D4", "8n", { string: 3 }).addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "8n").addNote(0, "A4", "4n").addNote(1, "D3", "2.").addMeasure().addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "p").addNote(0, "F#4", "8n").addNote(0, "G4", "8n").addConnective("slur", 2, "below").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(1, "D3", "2.").addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "4n").addNote(1, "A2", "2.").endRow().addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "f").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "4n").addRest(1, "4n", { staffPos: "D3" }).addNote(0, "D3", "4n").addNote(1, "D3", "4n").addRest(1, "4n", { staffPos: "B3" }).addNavigation("endRepeat").addMeasure().addRest(0, "8n", { staffPos: "D4" }).addAnnotation("dynamics", "f").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "C#4", "8n").addNote(0, "B3", "8n").addNote(1, "E2", "2.").endRow().addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "E4", "4n").addNote(1, "A2", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "p").addNote(0, "E3", "8n").addNote(0, "D#3", "8n").addConnective("slur", 2, "below").addNote(0, "E3", "8n").addNote(0, "F#3", "8n").addNote(0, "G#3", "8n").addNote(1, "E2", "2.").addMeasure().addNote(0, "A3", "8n").addConnective("slur", 2, "below").addNote(0, "G#3", "8n").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "4n").addNote(1, "A2", "2.").endRow().addMeasure().addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "f").addNote(0, "G4", "8n").addNote(0, "A4", "8n").addConnective("slur", 2, "below").addNote(0, "G4", "8n").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "4n").addNote(1, "D3", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "ff").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "4n").addRest(1, "4n", { staffPos: "D3" }).addNote(0, "D3", "4n").addNote(1, "D3", "4n").addRest(1, "4n", { staffPos: "B3" }).endSong().getDocument();
|
|
23
20
|
}
|
|
24
21
|
export {
|
|
25
22
|
createAndanteByDiabelli,
|
|
@@ -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-C2pCNxdE.mjs';
|
|
4
4
|
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-BFa43I86.mjs';
|
|
5
5
|
import { H as Handedness } from '../guitar-DggbM2UL.mjs';
|
|
6
|
-
import { D as DivRect, M as MDocument,
|
|
7
|
-
import '../tempo-
|
|
6
|
+
import { D as DivRect, M as MDocument, k as ScoreEventListener, Y as MRenderer, Z as MPlaybackButtons } from '../interface-XoKiryoV.mjs';
|
|
7
|
+
import '../tempo-BAYoZ_Li.mjs';
|
|
8
8
|
import '@tspro/ts-utils-lib';
|
|
9
9
|
|
|
10
10
|
interface CircleOfFifthsProps {
|
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-
|
|
4
|
-
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-
|
|
5
|
-
import { H as Handedness } from '../guitar-
|
|
6
|
-
import { D as DivRect, M as MDocument,
|
|
7
|
-
import '../tempo-
|
|
3
|
+
import { c as Scale, S as ScaleType } from '../scale-CvPbJvfN.js';
|
|
4
|
+
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-CcVdUFqS.js';
|
|
5
|
+
import { H as Handedness } from '../guitar-cNmE-EvH.js';
|
|
6
|
+
import { D as DivRect, M as MDocument, k as ScoreEventListener, Y as MRenderer, Z as MPlaybackButtons } from '../interface-7k8qGG44.js';
|
|
7
|
+
import '../tempo-r2sb6Ku2.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
|
|
1
|
+
/* WebMusicScore v4.0.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
|
|
1
|
+
/* WebMusicScore v4.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-D643HZHM.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-BFa43I86.mjs';
|
|
2
|
-
import { K as KeySignature } from './tempo-
|
|
2
|
+
import { K as KeySignature } from './tempo-BAYoZ_Li.mjs';
|
|
3
3
|
|
|
4
4
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
|
5
5
|
type IntervalQuality = "Perfect" | "Major" | "minor" | "Augmented" | "Doubly Augmented" | "diminished" | "doubly diminished";
|
|
@@ -66,9 +66,10 @@ declare class ScaleFactory {
|
|
|
66
66
|
hasScale(tonic: string): boolean;
|
|
67
67
|
}
|
|
68
68
|
declare function getScaleFactoryList(): ReadonlyArray<ScaleFactory | string>;
|
|
69
|
-
declare function getScaleFactory(scaleType: ScaleType): ScaleFactory;
|
|
69
|
+
declare function getScaleFactory(scaleType: ScaleType | `${ScaleType}`): ScaleFactory;
|
|
70
70
|
declare function validateScaleType(scaleType: unknown): ScaleType;
|
|
71
|
-
declare function getScale(tonic: string, scaleType: ScaleType): Scale;
|
|
71
|
+
declare function getScale(tonic: string, scaleType: ScaleType | `${ScaleType}`): Scale;
|
|
72
|
+
declare function getScale(scale: string): Scale;
|
|
72
73
|
declare function getDefaultScale(): Scale;
|
|
73
74
|
|
|
74
75
|
export { type Degree as D, type IntervalDirection as I, ScaleType as S, type IntervalQuality as a, Interval as b, Scale as c, ScaleFactory as d, getScaleFactory as e, validateScaleType as f, getScaleFactoryList as g, getScale as h, getDefaultScale as i, validateIntervalQuality as v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Note, S as SymbolSet } from './note-
|
|
2
|
-
import { K as KeySignature } from './tempo-
|
|
1
|
+
import { N as Note, S as SymbolSet } from './note-CcVdUFqS.js';
|
|
2
|
+
import { K as KeySignature } from './tempo-r2sb6Ku2.js';
|
|
3
3
|
|
|
4
4
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
|
5
5
|
type IntervalQuality = "Perfect" | "Major" | "minor" | "Augmented" | "Doubly Augmented" | "diminished" | "doubly diminished";
|
|
@@ -66,9 +66,10 @@ declare class ScaleFactory {
|
|
|
66
66
|
hasScale(tonic: string): boolean;
|
|
67
67
|
}
|
|
68
68
|
declare function getScaleFactoryList(): ReadonlyArray<ScaleFactory | string>;
|
|
69
|
-
declare function getScaleFactory(scaleType: ScaleType): ScaleFactory;
|
|
69
|
+
declare function getScaleFactory(scaleType: ScaleType | `${ScaleType}`): ScaleFactory;
|
|
70
70
|
declare function validateScaleType(scaleType: unknown): ScaleType;
|
|
71
|
-
declare function getScale(tonic: string, scaleType: ScaleType): Scale;
|
|
71
|
+
declare function getScale(tonic: string, scaleType: ScaleType | `${ScaleType}`): Scale;
|
|
72
|
+
declare function getScale(scale: string): Scale;
|
|
72
73
|
declare function getDefaultScale(): Scale;
|
|
73
74
|
|
|
74
75
|
export { type Degree as D, type IntervalDirection as I, ScaleType as S, type IntervalQuality as a, Interval as b, Scale as c, ScaleFactory as d, getScaleFactory as e, validateScaleType as f, getScaleFactoryList as g, getScale as h, getDefaultScale as i, validateIntervalQuality as v };
|
package/dist/score/index.d.mts
CHANGED
|
@@ -1,54 +1,121 @@
|
|
|
1
|
-
import { S as StaffPreset, a as ScoreConfiguration, M as MDocument,
|
|
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, F as Fermata, b as StaffTabOrGroups, c as Navigation, A as Annotation, L as Label, C as Connective, d as TieType, e as NoteAnchor, f as VerticalPosition } from '../interface-XoKiryoV.mjs';
|
|
2
|
+
export { a5 as Arpeggio, _ as Clef, D as DivRect, m as MAccidental, o as MArpeggio, x as MBarLineLeft, w as MBarLineRight, p as MBeamGroup, n as MConnective, r as MEnding, W as MExtensionLine, s as MFermata, t as MHeader, u as MImage, v as MMeasure, z as MNoteGroup, Z as MPlaybackButtons, X as MPlayer, Y as MRenderer, G as MRest, I as MRhythmColumn, J as MScoreRow, P as MSignature, Q as MSpecialText, K as MStaff, q as MStaffBeamGroup, B as MStaffNoteGroup, H as MStaffRest, y as MStaffTabBarLine, O as MTab, E as MTabNoteGroup, U as MText, l as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, h as ScoreEvent, k as ScoreEventListener, g as ScoreEventType, j as ScoreObjectEvent, i as ScoreStaffPosEvent, $ as StaffConfig, a6 as StaffTabOrGroup, a4 as Stem, a2 as StringNumber, a0 as TabConfig, a3 as getStringNumbers, a1 as getVoiceIds } from '../interface-XoKiryoV.mjs';
|
|
3
3
|
import { N as Note } from '../note-BFa43I86.mjs';
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { K as KeySignature, a as TimeSignature, T as TimeSignatureString,
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-C2pCNxdE.mjs';
|
|
5
|
+
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatureString, j as TupletRatio } from '../tempo-BAYoZ_Li.mjs';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
|
+
declare enum DynamicsAnnotations {
|
|
9
|
+
cresc = "cresc.",
|
|
10
|
+
decresc = "decresc.",
|
|
11
|
+
dim = "dim.",
|
|
12
|
+
ppp = "ppp",
|
|
13
|
+
pp = "pp",
|
|
14
|
+
p = "p",
|
|
15
|
+
mp = "mp",
|
|
16
|
+
m = "m",
|
|
17
|
+
mf = "mf",
|
|
18
|
+
f = "f",
|
|
19
|
+
ff = "ff",
|
|
20
|
+
fff = "fff"
|
|
21
|
+
}
|
|
22
|
+
declare enum TempoAnnotations {
|
|
23
|
+
accel = "accel.",
|
|
24
|
+
rit = "rit.",
|
|
25
|
+
a_tempo = "a tempo"
|
|
26
|
+
}
|
|
27
|
+
type AnnotationsType = `${DynamicsAnnotations}` | `${TempoAnnotations}`;
|
|
28
|
+
|
|
29
|
+
type TupletBuilder = {
|
|
30
|
+
addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
|
|
31
|
+
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
|
|
32
|
+
addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
|
|
33
|
+
};
|
|
34
|
+
type ExtensionBuilder = {
|
|
35
|
+
notes: (noteLength: NoteLength | NoteLengthStr, noteCount?: number) => ExtensionBuilder;
|
|
36
|
+
measures: (measureCount: number) => ExtensionBuilder;
|
|
37
|
+
infinity: () => ExtensionBuilder;
|
|
38
|
+
hide: () => ExtensionBuilder;
|
|
39
|
+
};
|
|
8
40
|
declare class DocumentBuilder {
|
|
9
41
|
private readonly doc;
|
|
10
42
|
constructor();
|
|
11
|
-
setScoreConfiguration(staffPreset: StaffPreset): DocumentBuilder;
|
|
43
|
+
setScoreConfiguration(staffPreset: StaffPreset | `${StaffPreset}`): DocumentBuilder;
|
|
12
44
|
setScoreConfiguration(config: ScoreConfiguration): DocumentBuilder;
|
|
13
45
|
private getMeasure;
|
|
14
46
|
getDocument(): MDocument;
|
|
15
47
|
setHeader(title?: string, composer?: string, arranger?: string): DocumentBuilder;
|
|
16
48
|
setMeasuresPerRow(measuresPerRow: number): DocumentBuilder;
|
|
17
49
|
addMeasure(): DocumentBuilder;
|
|
18
|
-
setKeySignature(tonic: string, scaleType: ScaleType): DocumentBuilder;
|
|
50
|
+
setKeySignature(tonic: string, scaleType: ScaleType | `${ScaleType}`): DocumentBuilder;
|
|
19
51
|
setKeySignature(keySignature: KeySignature): DocumentBuilder;
|
|
52
|
+
setKeySignature(keySignature: string): DocumentBuilder;
|
|
20
53
|
setKeySignature(scale: Scale): DocumentBuilder;
|
|
21
54
|
setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): DocumentBuilder;
|
|
22
|
-
setTempo(beatsPerMinute: number
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
setTempo(beatsPerMinute: number): DocumentBuilder;
|
|
56
|
+
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr): DocumentBuilder;
|
|
57
|
+
/** @deprecated - Use dotted beatLength instead (e.g. "4..") */
|
|
58
|
+
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
|
|
59
|
+
addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
|
|
60
|
+
addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
|
|
61
|
+
addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
|
|
62
|
+
/**
|
|
63
|
+
* Usage:
|
|
64
|
+
* <pre>
|
|
65
|
+
* addTuplet(0, Theory.Tuplet.Triplet, notes => {
|
|
66
|
+
* notes.addNote("G3", Theory.NoteLength.Eighth);
|
|
67
|
+
* notes.addNote("B3", Theory.NoteLength.Eighth);
|
|
68
|
+
* notes.addNote("D4", Theory.NoteLength.Eighth);
|
|
69
|
+
* });
|
|
70
|
+
* </pre>
|
|
71
|
+
*
|
|
72
|
+
* @param voiceId
|
|
73
|
+
* @param tupletRatio - You can also use Theory.Tuplet presets (e.g. Theory.Tuplet.Triplet).
|
|
74
|
+
* @param tupletBuilder
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
|
|
26
78
|
private addFermataInternal;
|
|
27
|
-
addFermata(fermata?: Fermata): DocumentBuilder;
|
|
79
|
+
addFermata(fermata?: Fermata | `${Fermata}`): DocumentBuilder;
|
|
28
80
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
29
|
-
addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata): DocumentBuilder;
|
|
81
|
+
addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata | `${Fermata}`): DocumentBuilder;
|
|
30
82
|
private addNavigationInternal;
|
|
31
|
-
addNavigation(navigation: Navigation): DocumentBuilder;
|
|
32
|
-
addNavigation(navigation: Navigation.EndRepeat
|
|
33
|
-
addNavigation(navigation: Navigation.Ending
|
|
83
|
+
addNavigation(navigation: Navigation | `${Navigation}`): DocumentBuilder;
|
|
84
|
+
addNavigation(navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
|
|
85
|
+
addNavigation(navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
|
|
34
86
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
35
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation): DocumentBuilder;
|
|
87
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation | `${Navigation}`): DocumentBuilder;
|
|
36
88
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
37
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat
|
|
89
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
|
|
38
90
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
39
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending
|
|
40
|
-
private addLabelInternal;
|
|
41
|
-
addLabel(label: Label, text: string): DocumentBuilder;
|
|
42
|
-
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
43
|
-
addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label, text: string): DocumentBuilder;
|
|
91
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
|
|
44
92
|
private addAnnotationInternal;
|
|
45
|
-
addAnnotation(
|
|
93
|
+
addAnnotation(text: AnnotationsType): DocumentBuilder;
|
|
94
|
+
addAnnotation(annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
|
|
95
|
+
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
96
|
+
addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, text: AnnotationsType): DocumentBuilder;
|
|
97
|
+
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
98
|
+
addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
|
|
99
|
+
private addLabelInternal;
|
|
100
|
+
addLabel(label: Label | `${Label}`, text: string): DocumentBuilder;
|
|
46
101
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
47
|
-
|
|
48
|
-
addConnective(connective: Connective.Tie
|
|
49
|
-
addConnective(connective: Connective.Slur
|
|
50
|
-
addConnective(connective: Connective.Slide
|
|
51
|
-
|
|
102
|
+
addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label | `${Label}`, text: string): DocumentBuilder;
|
|
103
|
+
addConnective(connective: Connective.Tie | `${Connective.Tie}`, tieSpan?: number | TieType | `${TieType}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
104
|
+
addConnective(connective: Connective.Slur | `${Connective.Slur}`, slurSpan?: number, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
105
|
+
addConnective(connective: Connective.Slide | `${Connective.Slide}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
106
|
+
/**
|
|
107
|
+
* Extension length example:
|
|
108
|
+
* <pre>
|
|
109
|
+
* addExtension(ext => ext.notes("1n", 2)) // length is 2 whole notes
|
|
110
|
+
* addExtension(ext => ext.measures(3).hide()) // length is 3 measures, hidden
|
|
111
|
+
* addExtension(ext => ext.measures(1).notes("8n")) // length is 1 measure + 1 eigth note
|
|
112
|
+
* addExtension(ext => ext.infinity()) // length is as long as possible
|
|
113
|
+
* </pre>
|
|
114
|
+
* @param extensionLength
|
|
115
|
+
* @param extensionVisible
|
|
116
|
+
* @returns
|
|
117
|
+
*/
|
|
118
|
+
addExtension(extensionBuilder?: (ext: ExtensionBuilder) => void): DocumentBuilder;
|
|
52
119
|
/**
|
|
53
120
|
*
|
|
54
121
|
* @param groupName - Name of staff group.
|
|
@@ -56,12 +123,12 @@ declare class DocumentBuilder {
|
|
|
56
123
|
* @param verticalPosition - Vertical position, are elements added above, below or both.
|
|
57
124
|
* @returns
|
|
58
125
|
*/
|
|
59
|
-
addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition): DocumentBuilder;
|
|
126
|
+
addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition | `${VerticalPosition}`): DocumentBuilder;
|
|
60
127
|
endSong(): DocumentBuilder;
|
|
61
128
|
endSection(): DocumentBuilder;
|
|
62
129
|
endRow(): DocumentBuilder;
|
|
63
|
-
completeRests(voiceId?:
|
|
130
|
+
completeRests(voiceId?: VoiceId | VoiceId[]): DocumentBuilder;
|
|
64
131
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
65
132
|
}
|
|
66
133
|
|
|
67
|
-
export { Annotation, Connective, DocumentBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, VerticalPosition };
|
|
134
|
+
export { Annotation, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };
|
package/dist/score/index.d.ts
CHANGED
|
@@ -1,54 +1,121 @@
|
|
|
1
|
-
import { S as StaffPreset, a as ScoreConfiguration, M as MDocument,
|
|
2
|
-
export {
|
|
3
|
-
import { N as Note } from '../note-
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { K as KeySignature, a as TimeSignature, T as TimeSignatureString,
|
|
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 Annotation, L as Label, C as Connective, d as TieType, e as NoteAnchor, f as VerticalPosition } from '../interface-7k8qGG44.js';
|
|
2
|
+
export { a5 as Arpeggio, _ as Clef, D as DivRect, m as MAccidental, o as MArpeggio, x as MBarLineLeft, w as MBarLineRight, p as MBeamGroup, n as MConnective, r as MEnding, W as MExtensionLine, s as MFermata, t as MHeader, u as MImage, v as MMeasure, z as MNoteGroup, Z as MPlaybackButtons, X as MPlayer, Y as MRenderer, G as MRest, I as MRhythmColumn, J as MScoreRow, P as MSignature, Q as MSpecialText, K as MStaff, q as MStaffBeamGroup, B as MStaffNoteGroup, H as MStaffRest, y as MStaffTabBarLine, O as MTab, E as MTabNoteGroup, U as MText, l as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, h as ScoreEvent, k as ScoreEventListener, g as ScoreEventType, j as ScoreObjectEvent, i as ScoreStaffPosEvent, $ as StaffConfig, a6 as StaffTabOrGroup, a4 as Stem, a2 as StringNumber, a0 as TabConfig, a3 as getStringNumbers, a1 as getVoiceIds } from '../interface-7k8qGG44.js';
|
|
3
|
+
import { N as Note } from '../note-CcVdUFqS.js';
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-CvPbJvfN.js';
|
|
5
|
+
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatureString, j as TupletRatio } from '../tempo-r2sb6Ku2.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
|
+
declare enum DynamicsAnnotations {
|
|
9
|
+
cresc = "cresc.",
|
|
10
|
+
decresc = "decresc.",
|
|
11
|
+
dim = "dim.",
|
|
12
|
+
ppp = "ppp",
|
|
13
|
+
pp = "pp",
|
|
14
|
+
p = "p",
|
|
15
|
+
mp = "mp",
|
|
16
|
+
m = "m",
|
|
17
|
+
mf = "mf",
|
|
18
|
+
f = "f",
|
|
19
|
+
ff = "ff",
|
|
20
|
+
fff = "fff"
|
|
21
|
+
}
|
|
22
|
+
declare enum TempoAnnotations {
|
|
23
|
+
accel = "accel.",
|
|
24
|
+
rit = "rit.",
|
|
25
|
+
a_tempo = "a tempo"
|
|
26
|
+
}
|
|
27
|
+
type AnnotationsType = `${DynamicsAnnotations}` | `${TempoAnnotations}`;
|
|
28
|
+
|
|
29
|
+
type TupletBuilder = {
|
|
30
|
+
addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
|
|
31
|
+
addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
|
|
32
|
+
addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
|
|
33
|
+
};
|
|
34
|
+
type ExtensionBuilder = {
|
|
35
|
+
notes: (noteLength: NoteLength | NoteLengthStr, noteCount?: number) => ExtensionBuilder;
|
|
36
|
+
measures: (measureCount: number) => ExtensionBuilder;
|
|
37
|
+
infinity: () => ExtensionBuilder;
|
|
38
|
+
hide: () => ExtensionBuilder;
|
|
39
|
+
};
|
|
8
40
|
declare class DocumentBuilder {
|
|
9
41
|
private readonly doc;
|
|
10
42
|
constructor();
|
|
11
|
-
setScoreConfiguration(staffPreset: StaffPreset): DocumentBuilder;
|
|
43
|
+
setScoreConfiguration(staffPreset: StaffPreset | `${StaffPreset}`): DocumentBuilder;
|
|
12
44
|
setScoreConfiguration(config: ScoreConfiguration): DocumentBuilder;
|
|
13
45
|
private getMeasure;
|
|
14
46
|
getDocument(): MDocument;
|
|
15
47
|
setHeader(title?: string, composer?: string, arranger?: string): DocumentBuilder;
|
|
16
48
|
setMeasuresPerRow(measuresPerRow: number): DocumentBuilder;
|
|
17
49
|
addMeasure(): DocumentBuilder;
|
|
18
|
-
setKeySignature(tonic: string, scaleType: ScaleType): DocumentBuilder;
|
|
50
|
+
setKeySignature(tonic: string, scaleType: ScaleType | `${ScaleType}`): DocumentBuilder;
|
|
19
51
|
setKeySignature(keySignature: KeySignature): DocumentBuilder;
|
|
52
|
+
setKeySignature(keySignature: string): DocumentBuilder;
|
|
20
53
|
setKeySignature(scale: Scale): DocumentBuilder;
|
|
21
54
|
setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): DocumentBuilder;
|
|
22
|
-
setTempo(beatsPerMinute: number
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
setTempo(beatsPerMinute: number): DocumentBuilder;
|
|
56
|
+
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr): DocumentBuilder;
|
|
57
|
+
/** @deprecated - Use dotted beatLength instead (e.g. "4..") */
|
|
58
|
+
setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
|
|
59
|
+
addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
|
|
60
|
+
addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
|
|
61
|
+
addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
|
|
62
|
+
/**
|
|
63
|
+
* Usage:
|
|
64
|
+
* <pre>
|
|
65
|
+
* addTuplet(0, Theory.Tuplet.Triplet, notes => {
|
|
66
|
+
* notes.addNote("G3", Theory.NoteLength.Eighth);
|
|
67
|
+
* notes.addNote("B3", Theory.NoteLength.Eighth);
|
|
68
|
+
* notes.addNote("D4", Theory.NoteLength.Eighth);
|
|
69
|
+
* });
|
|
70
|
+
* </pre>
|
|
71
|
+
*
|
|
72
|
+
* @param voiceId
|
|
73
|
+
* @param tupletRatio - You can also use Theory.Tuplet presets (e.g. Theory.Tuplet.Triplet).
|
|
74
|
+
* @param tupletBuilder
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
|
|
26
78
|
private addFermataInternal;
|
|
27
|
-
addFermata(fermata?: Fermata): DocumentBuilder;
|
|
79
|
+
addFermata(fermata?: Fermata | `${Fermata}`): DocumentBuilder;
|
|
28
80
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
29
|
-
addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata): DocumentBuilder;
|
|
81
|
+
addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata | `${Fermata}`): DocumentBuilder;
|
|
30
82
|
private addNavigationInternal;
|
|
31
|
-
addNavigation(navigation: Navigation): DocumentBuilder;
|
|
32
|
-
addNavigation(navigation: Navigation.EndRepeat
|
|
33
|
-
addNavigation(navigation: Navigation.Ending
|
|
83
|
+
addNavigation(navigation: Navigation | `${Navigation}`): DocumentBuilder;
|
|
84
|
+
addNavigation(navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
|
|
85
|
+
addNavigation(navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
|
|
34
86
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
35
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation): DocumentBuilder;
|
|
87
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation | `${Navigation}`): DocumentBuilder;
|
|
36
88
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
37
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat
|
|
89
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
|
|
38
90
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
39
|
-
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending
|
|
40
|
-
private addLabelInternal;
|
|
41
|
-
addLabel(label: Label, text: string): DocumentBuilder;
|
|
42
|
-
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
43
|
-
addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label, text: string): DocumentBuilder;
|
|
91
|
+
addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
|
|
44
92
|
private addAnnotationInternal;
|
|
45
|
-
addAnnotation(
|
|
93
|
+
addAnnotation(text: AnnotationsType): DocumentBuilder;
|
|
94
|
+
addAnnotation(annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
|
|
95
|
+
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
96
|
+
addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, text: AnnotationsType): DocumentBuilder;
|
|
97
|
+
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
98
|
+
addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
|
|
99
|
+
private addLabelInternal;
|
|
100
|
+
addLabel(label: Label | `${Label}`, text: string): DocumentBuilder;
|
|
46
101
|
/** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
|
|
47
|
-
|
|
48
|
-
addConnective(connective: Connective.Tie
|
|
49
|
-
addConnective(connective: Connective.Slur
|
|
50
|
-
addConnective(connective: Connective.Slide
|
|
51
|
-
|
|
102
|
+
addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label | `${Label}`, text: string): DocumentBuilder;
|
|
103
|
+
addConnective(connective: Connective.Tie | `${Connective.Tie}`, tieSpan?: number | TieType | `${TieType}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
104
|
+
addConnective(connective: Connective.Slur | `${Connective.Slur}`, slurSpan?: number, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
105
|
+
addConnective(connective: Connective.Slide | `${Connective.Slide}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
|
|
106
|
+
/**
|
|
107
|
+
* Extension length example:
|
|
108
|
+
* <pre>
|
|
109
|
+
* addExtension(ext => ext.notes("1n", 2)) // length is 2 whole notes
|
|
110
|
+
* addExtension(ext => ext.measures(3).hide()) // length is 3 measures, hidden
|
|
111
|
+
* addExtension(ext => ext.measures(1).notes("8n")) // length is 1 measure + 1 eigth note
|
|
112
|
+
* addExtension(ext => ext.infinity()) // length is as long as possible
|
|
113
|
+
* </pre>
|
|
114
|
+
* @param extensionLength
|
|
115
|
+
* @param extensionVisible
|
|
116
|
+
* @returns
|
|
117
|
+
*/
|
|
118
|
+
addExtension(extensionBuilder?: (ext: ExtensionBuilder) => void): DocumentBuilder;
|
|
52
119
|
/**
|
|
53
120
|
*
|
|
54
121
|
* @param groupName - Name of staff group.
|
|
@@ -56,12 +123,12 @@ declare class DocumentBuilder {
|
|
|
56
123
|
* @param verticalPosition - Vertical position, are elements added above, below or both.
|
|
57
124
|
* @returns
|
|
58
125
|
*/
|
|
59
|
-
addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition): DocumentBuilder;
|
|
126
|
+
addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition | `${VerticalPosition}`): DocumentBuilder;
|
|
60
127
|
endSong(): DocumentBuilder;
|
|
61
128
|
endSection(): DocumentBuilder;
|
|
62
129
|
endRow(): DocumentBuilder;
|
|
63
|
-
completeRests(voiceId?:
|
|
130
|
+
completeRests(voiceId?: VoiceId | VoiceId[]): DocumentBuilder;
|
|
64
131
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
65
132
|
}
|
|
66
133
|
|
|
67
|
-
export { Annotation, Connective, DocumentBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, VerticalPosition };
|
|
134
|
+
export { Annotation, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };
|