@tspro/web-music-score 1.1.0 → 3.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 +25 -0
- package/README.md +337 -204
- package/dist/audio/index.d.mts +22 -0
- package/dist/audio/index.d.ts +22 -0
- package/dist/audio/index.js +147 -0
- package/dist/audio/index.mjs +109 -0
- package/dist/audio-cg/index.d.mts +4 -0
- package/dist/audio-cg/index.d.ts +4 -0
- package/dist/audio-cg/index.js +124 -0
- package/dist/audio-cg/index.mjs +91 -0
- package/dist/chunk-ZWFAOHYM.mjs +9 -0
- package/dist/core/index.d.mts +21 -0
- package/dist/core/index.d.ts +21 -0
- package/dist/core/index.js +72 -0
- package/dist/core/index.mjs +45 -0
- package/dist/guitar-BIFwFT31.d.ts +24 -0
- package/dist/guitar-zASF7B1g.d.mts +24 -0
- package/dist/iife/index.global.js +221 -0
- package/dist/interface-CLb7xa7_.d.mts +1768 -0
- package/dist/interface-DXyXwLBB.d.ts +1768 -0
- package/dist/note-B5ZtlHc8.d.mts +99 -0
- package/dist/note-B5ZtlHc8.d.ts +99 -0
- package/dist/pieces/index.d.mts +15 -0
- package/dist/pieces/index.d.ts +15 -0
- package/dist/pieces/index.js +56 -0
- package/dist/pieces/index.mjs +29 -0
- package/dist/react-ui/index.d.mts +170 -0
- package/dist/react-ui/index.d.ts +170 -0
- package/dist/react-ui/index.js +624 -0
- package/dist/react-ui/index.mjs +582 -0
- package/dist/scale-B_2MZaT9.d.ts +87 -0
- package/dist/scale-C-YS5iVG.d.mts +87 -0
- package/dist/score/index.d.mts +43 -0
- package/dist/score/index.d.ts +43 -0
- package/dist/score/index.js +7753 -0
- package/dist/score/index.mjs +7669 -0
- package/dist/tempo-DoJd-UYT.d.ts +120 -0
- package/dist/tempo-TjQKn46X.d.mts +120 -0
- package/dist/theory/index.d.mts +48 -0
- package/dist/theory/index.d.ts +48 -0
- package/dist/theory/index.js +1783 -0
- package/dist/theory/index.mjs +1716 -0
- package/package.json +98 -55
- package/dist/index.cjs.js +0 -41053
- package/dist/index.d.ts +0 -1281
- package/dist/index.esm.mjs +0 -41044
- package/dist/index.umd.min.js +0 -9
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
declare enum SymbolSet {
|
|
3
|
+
Ascii = 0,
|
|
4
|
+
Unicode = 1
|
|
5
|
+
}
|
|
6
|
+
/** @public */
|
|
7
|
+
declare enum PitchNotation {
|
|
8
|
+
Scientific = 0,
|
|
9
|
+
Helmholtz = 1
|
|
10
|
+
}
|
|
11
|
+
/** @public */
|
|
12
|
+
declare const PitchNotationList: PitchNotation[];
|
|
13
|
+
/** @public */
|
|
14
|
+
declare const DefaultPitchNotation = PitchNotation.Scientific;
|
|
15
|
+
/** @public */
|
|
16
|
+
declare function validatePitchNotation(pn: unknown): PitchNotation;
|
|
17
|
+
/** @public */
|
|
18
|
+
declare function getPitchNotationName(pn: PitchNotation): string;
|
|
19
|
+
/** @public */
|
|
20
|
+
declare enum GuitarNoteLabel {
|
|
21
|
+
Default = "Default",
|
|
22
|
+
OmitOctave = "Omit Octave",
|
|
23
|
+
Interval = "Interval"
|
|
24
|
+
}
|
|
25
|
+
/** @public */
|
|
26
|
+
declare const DefaultGuitarNoteLabel = GuitarNoteLabel.Default;
|
|
27
|
+
/** @public */
|
|
28
|
+
declare const GuitarNoteLabelList: GuitarNoteLabel[];
|
|
29
|
+
/** @public */
|
|
30
|
+
declare function validateGuitarNoteLabel(label: string): GuitarNoteLabel;
|
|
31
|
+
|
|
32
|
+
/** @public */
|
|
33
|
+
type Accidental = -2 | -1 | 0 | 1 | 2;
|
|
34
|
+
/** @public */
|
|
35
|
+
type NoteLetter = "C" | "D" | "E" | "F" | "G" | "A" | "B";
|
|
36
|
+
/** @public */
|
|
37
|
+
type ParsedNote = {
|
|
38
|
+
noteLetter: NoteLetter;
|
|
39
|
+
accidental: Accidental;
|
|
40
|
+
octave?: number;
|
|
41
|
+
};
|
|
42
|
+
/** @public */
|
|
43
|
+
declare class Note {
|
|
44
|
+
private static noteByNameCache;
|
|
45
|
+
private static chromaticNoteCache;
|
|
46
|
+
readonly diatonicClass: number;
|
|
47
|
+
readonly accidental: Accidental;
|
|
48
|
+
readonly octave: number;
|
|
49
|
+
constructor(diatonicId: number, accidental: number);
|
|
50
|
+
constructor(diatonicClass: number, accidental: number, octave: number);
|
|
51
|
+
constructor(noteLetter: string, accidental: number, octave: number);
|
|
52
|
+
get diatonicId(): number;
|
|
53
|
+
get chromaticId(): number;
|
|
54
|
+
get midiNumber(): number;
|
|
55
|
+
get chromaticClass(): number;
|
|
56
|
+
get noteLetter(): NoteLetter;
|
|
57
|
+
format(pitchNotation: PitchNotation, symbolSet: SymbolSet): string;
|
|
58
|
+
formatOmitOctave(symbolSet: SymbolSet): string;
|
|
59
|
+
static getNote(noteName: string): Note;
|
|
60
|
+
static getChromaticNote(chromaticId: number): Note;
|
|
61
|
+
static getDiatonicClass(diatonicId: number): number;
|
|
62
|
+
static getDiatonicClass(noteName: string): number;
|
|
63
|
+
static getOctaveFromDiatonicId(diatonicId: number): number;
|
|
64
|
+
static getDiatonicIdInOctave(diatonicId: number, octave: number): number;
|
|
65
|
+
static getChromaticClass(chromaticId: number): number;
|
|
66
|
+
static getOctaveFromChromaticId(chromaticId: number): number;
|
|
67
|
+
static getChromaticIdInOctave(chromaticId: number, octave: number): number;
|
|
68
|
+
static equals(a: Note | null | undefined, b: Note | null | undefined): boolean;
|
|
69
|
+
static replaceAccidentalSymbols(str: string, symbolSet: SymbolSet): string;
|
|
70
|
+
static isValidNoteName(noteName: string): boolean;
|
|
71
|
+
static parseNote(noteName: string): Readonly<ParsedNote> | undefined;
|
|
72
|
+
static getScientificNoteName(noteName: string, symbolSet: SymbolSet): string;
|
|
73
|
+
static getAccidentalSymbol(accidental: Accidental, symbolsSet: SymbolSet): string | undefined;
|
|
74
|
+
static getAccidental(accidentalSymbol: string): Accidental;
|
|
75
|
+
static getNoteLetter(diatonicId: number): NoteLetter;
|
|
76
|
+
static findNextDiatonicIdAbove(diatonicId: number, bottomDiatonicId: number, addOctaveIfEqual: boolean): number;
|
|
77
|
+
static validateDiatonicId(diatonicId: number): number;
|
|
78
|
+
static validateDiatonicClass(diatonicClass: number): number;
|
|
79
|
+
static validateChromaticId(chromaticId: number): number;
|
|
80
|
+
static validatechromaticClass(chromaticClass: number): number;
|
|
81
|
+
static validateNoteLetter(note: string): NoteLetter;
|
|
82
|
+
static validateOctave(octave: number): number;
|
|
83
|
+
static validateAccidental(acc: number): Accidental;
|
|
84
|
+
/**
|
|
85
|
+
* Sort notes by diatonicId in ascending order.
|
|
86
|
+
* @param notes - Array of notes.
|
|
87
|
+
* @returns Sorted array of notes.
|
|
88
|
+
*/
|
|
89
|
+
static sort(notes: ReadonlyArray<Note>): Note[];
|
|
90
|
+
/**
|
|
91
|
+
* Remove duplicate notes.
|
|
92
|
+
* @param notes - Array of notes.
|
|
93
|
+
* @returns Sorted set of notes.
|
|
94
|
+
*/
|
|
95
|
+
static removeDuplicates(notes: ReadonlyArray<Note>): Note[];
|
|
96
|
+
static compareFunc(a: Note, b: Note): 1 | -1 | 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
declare enum SymbolSet {
|
|
3
|
+
Ascii = 0,
|
|
4
|
+
Unicode = 1
|
|
5
|
+
}
|
|
6
|
+
/** @public */
|
|
7
|
+
declare enum PitchNotation {
|
|
8
|
+
Scientific = 0,
|
|
9
|
+
Helmholtz = 1
|
|
10
|
+
}
|
|
11
|
+
/** @public */
|
|
12
|
+
declare const PitchNotationList: PitchNotation[];
|
|
13
|
+
/** @public */
|
|
14
|
+
declare const DefaultPitchNotation = PitchNotation.Scientific;
|
|
15
|
+
/** @public */
|
|
16
|
+
declare function validatePitchNotation(pn: unknown): PitchNotation;
|
|
17
|
+
/** @public */
|
|
18
|
+
declare function getPitchNotationName(pn: PitchNotation): string;
|
|
19
|
+
/** @public */
|
|
20
|
+
declare enum GuitarNoteLabel {
|
|
21
|
+
Default = "Default",
|
|
22
|
+
OmitOctave = "Omit Octave",
|
|
23
|
+
Interval = "Interval"
|
|
24
|
+
}
|
|
25
|
+
/** @public */
|
|
26
|
+
declare const DefaultGuitarNoteLabel = GuitarNoteLabel.Default;
|
|
27
|
+
/** @public */
|
|
28
|
+
declare const GuitarNoteLabelList: GuitarNoteLabel[];
|
|
29
|
+
/** @public */
|
|
30
|
+
declare function validateGuitarNoteLabel(label: string): GuitarNoteLabel;
|
|
31
|
+
|
|
32
|
+
/** @public */
|
|
33
|
+
type Accidental = -2 | -1 | 0 | 1 | 2;
|
|
34
|
+
/** @public */
|
|
35
|
+
type NoteLetter = "C" | "D" | "E" | "F" | "G" | "A" | "B";
|
|
36
|
+
/** @public */
|
|
37
|
+
type ParsedNote = {
|
|
38
|
+
noteLetter: NoteLetter;
|
|
39
|
+
accidental: Accidental;
|
|
40
|
+
octave?: number;
|
|
41
|
+
};
|
|
42
|
+
/** @public */
|
|
43
|
+
declare class Note {
|
|
44
|
+
private static noteByNameCache;
|
|
45
|
+
private static chromaticNoteCache;
|
|
46
|
+
readonly diatonicClass: number;
|
|
47
|
+
readonly accidental: Accidental;
|
|
48
|
+
readonly octave: number;
|
|
49
|
+
constructor(diatonicId: number, accidental: number);
|
|
50
|
+
constructor(diatonicClass: number, accidental: number, octave: number);
|
|
51
|
+
constructor(noteLetter: string, accidental: number, octave: number);
|
|
52
|
+
get diatonicId(): number;
|
|
53
|
+
get chromaticId(): number;
|
|
54
|
+
get midiNumber(): number;
|
|
55
|
+
get chromaticClass(): number;
|
|
56
|
+
get noteLetter(): NoteLetter;
|
|
57
|
+
format(pitchNotation: PitchNotation, symbolSet: SymbolSet): string;
|
|
58
|
+
formatOmitOctave(symbolSet: SymbolSet): string;
|
|
59
|
+
static getNote(noteName: string): Note;
|
|
60
|
+
static getChromaticNote(chromaticId: number): Note;
|
|
61
|
+
static getDiatonicClass(diatonicId: number): number;
|
|
62
|
+
static getDiatonicClass(noteName: string): number;
|
|
63
|
+
static getOctaveFromDiatonicId(diatonicId: number): number;
|
|
64
|
+
static getDiatonicIdInOctave(diatonicId: number, octave: number): number;
|
|
65
|
+
static getChromaticClass(chromaticId: number): number;
|
|
66
|
+
static getOctaveFromChromaticId(chromaticId: number): number;
|
|
67
|
+
static getChromaticIdInOctave(chromaticId: number, octave: number): number;
|
|
68
|
+
static equals(a: Note | null | undefined, b: Note | null | undefined): boolean;
|
|
69
|
+
static replaceAccidentalSymbols(str: string, symbolSet: SymbolSet): string;
|
|
70
|
+
static isValidNoteName(noteName: string): boolean;
|
|
71
|
+
static parseNote(noteName: string): Readonly<ParsedNote> | undefined;
|
|
72
|
+
static getScientificNoteName(noteName: string, symbolSet: SymbolSet): string;
|
|
73
|
+
static getAccidentalSymbol(accidental: Accidental, symbolsSet: SymbolSet): string | undefined;
|
|
74
|
+
static getAccidental(accidentalSymbol: string): Accidental;
|
|
75
|
+
static getNoteLetter(diatonicId: number): NoteLetter;
|
|
76
|
+
static findNextDiatonicIdAbove(diatonicId: number, bottomDiatonicId: number, addOctaveIfEqual: boolean): number;
|
|
77
|
+
static validateDiatonicId(diatonicId: number): number;
|
|
78
|
+
static validateDiatonicClass(diatonicClass: number): number;
|
|
79
|
+
static validateChromaticId(chromaticId: number): number;
|
|
80
|
+
static validatechromaticClass(chromaticClass: number): number;
|
|
81
|
+
static validateNoteLetter(note: string): NoteLetter;
|
|
82
|
+
static validateOctave(octave: number): number;
|
|
83
|
+
static validateAccidental(acc: number): Accidental;
|
|
84
|
+
/**
|
|
85
|
+
* Sort notes by diatonicId in ascending order.
|
|
86
|
+
* @param notes - Array of notes.
|
|
87
|
+
* @returns Sorted array of notes.
|
|
88
|
+
*/
|
|
89
|
+
static sort(notes: ReadonlyArray<Note>): Note[];
|
|
90
|
+
/**
|
|
91
|
+
* Remove duplicate notes.
|
|
92
|
+
* @param notes - Array of notes.
|
|
93
|
+
* @returns Sorted set of notes.
|
|
94
|
+
*/
|
|
95
|
+
static removeDuplicates(notes: ReadonlyArray<Note>): Note[];
|
|
96
|
+
static compareFunc(a: Note, b: Note): 1 | -1 | 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { M as MDocument } from '../interface-CLb7xa7_.mjs';
|
|
2
|
+
import '../note-B5ZtlHc8.mjs';
|
|
3
|
+
import '../tempo-TjQKn46X.mjs';
|
|
4
|
+
import '@tspro/ts-utils-lib';
|
|
5
|
+
|
|
6
|
+
/** @public */
|
|
7
|
+
declare function createFrereJacques(): MDocument;
|
|
8
|
+
|
|
9
|
+
/** @public */
|
|
10
|
+
declare function createGreensleeves(): MDocument;
|
|
11
|
+
|
|
12
|
+
/** @public */
|
|
13
|
+
declare function createAndanteByDiabelli(): MDocument;
|
|
14
|
+
|
|
15
|
+
export { createAndanteByDiabelli, createFrereJacques, createGreensleeves };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { M as MDocument } from '../interface-DXyXwLBB.js';
|
|
2
|
+
import '../note-B5ZtlHc8.js';
|
|
3
|
+
import '../tempo-DoJd-UYT.js';
|
|
4
|
+
import '@tspro/ts-utils-lib';
|
|
5
|
+
|
|
6
|
+
/** @public */
|
|
7
|
+
declare function createFrereJacques(): MDocument;
|
|
8
|
+
|
|
9
|
+
/** @public */
|
|
10
|
+
declare function createGreensleeves(): MDocument;
|
|
11
|
+
|
|
12
|
+
/** @public */
|
|
13
|
+
declare function createAndanteByDiabelli(): MDocument;
|
|
14
|
+
|
|
15
|
+
export { createAndanteByDiabelli, createFrereJacques, createGreensleeves };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* WebMusicScore v3.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/pieces/index.ts
|
|
22
|
+
var pieces_exports = {};
|
|
23
|
+
__export(pieces_exports, {
|
|
24
|
+
createAndanteByDiabelli: () => createAndanteByDiabelli,
|
|
25
|
+
createFrereJacques: () => createFrereJacques,
|
|
26
|
+
createGreensleeves: () => createGreensleeves
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(pieces_exports);
|
|
29
|
+
|
|
30
|
+
// src/pieces/frere-jacques.ts
|
|
31
|
+
var import_theory = require("@tspro/web-music-score/theory");
|
|
32
|
+
var import_score = require("@tspro/web-music-score/score");
|
|
33
|
+
function createFrereJacques() {
|
|
34
|
+
return new import_score.DocumentBuilder().setScoreConfiguration(import_score.StaffPreset.GuitarTreble).setHeader("Frere Jacques").addMeasure().setKeySignature("G", import_theory.ScaleType.Major).setTimeSignature("4/4").addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "A3", import_theory.NoteLength.Quarter).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "A3", import_theory.NoteLength.Quarter).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "C4", import_theory.NoteLength.Quarter).addNote(0, "D4", import_theory.NoteLength.Half).endRow().addMeasure().addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "C4", import_theory.NoteLength.Quarter).addNote(0, "D4", import_theory.NoteLength.Half).addMeasure().addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "E4", import_theory.NoteLength.Eighth).addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "C4", import_theory.NoteLength.Eighth).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).endRow().addMeasure().addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "E4", import_theory.NoteLength.Eighth).addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "C4", import_theory.NoteLength.Eighth).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "D3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Half).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "D3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Half).getDocument();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/pieces/greensleeves.ts
|
|
38
|
+
var import_theory2 = require("@tspro/web-music-score/theory");
|
|
39
|
+
var import_score2 = require("@tspro/web-music-score/score");
|
|
40
|
+
function createGreensleeves() {
|
|
41
|
+
return new import_score2.DocumentBuilder().setScoreConfiguration(import_score2.StaffPreset.GuitarTreble).setHeader("Greensleeves").addMeasure().setKeySignature("C", import_theory2.ScaleType.Major).setTimeSignature("6/8").setTempo(140).addNote(0, "A3", import_theory2.NoteLength.Eighth).addMeasure().addNavigation(import_score2.Navigation.StartRepeat).addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "D4", import_theory2.NoteLength.Eighth).addNote(0, "E4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "A2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "A3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "F").addNote(0, "G#3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "F2", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "E").addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(0, "E3", import_theory2.NoteLength.Quarter).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "E2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "B2", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).endRow().addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "D4", import_theory2.NoteLength.Eighth).addNote(0, "E4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "A2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Eighth, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "B3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "G#3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "E").addNote(0, "F#3", import_theory2.NoteLength.Sixteenth).addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true }).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], import_theory2.NoteLength.Quarter, { dotted: true, arpeggio: import_score2.Arpeggio.Up, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "C").addNote(0, "G4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F#4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addRest(1, import_theory2.NoteLength.Quarter, { dotted: true, hide: true }).addNote(1, "C3", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "G3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "A3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "F").addNote(0, "G#3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "F2", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "E").addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(0, "E3", import_theory2.NoteLength.Quarter, { dotted: true }).addNote(1, "E2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "B2", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Eighth).endRow().addMeasure().addNote(0, "G4", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "C").addNote(0, "G4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F#4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "C3", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "G3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "C3", import_theory2.NoteLength.Eighth).addNote(1, "G3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Eighth, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "B3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "G#3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "E").addNote(0, "F#3", import_theory2.NoteLength.Sixteenth).addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNavigation(import_score2.Navigation.Ending, 1).addNavigation(import_score2.Navigation.EndRepeat).addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).addMeasure().addNavigation(import_score2.Navigation.Ending, 2).addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true }).addFermata().addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).getDocument();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/pieces/andante-diabelli.ts
|
|
45
|
+
var import_theory3 = require("@tspro/web-music-score/theory");
|
|
46
|
+
var import_score3 = require("@tspro/web-music-score/score");
|
|
47
|
+
function createAndanteByDiabelli() {
|
|
48
|
+
return new import_score3.DocumentBuilder().setScoreConfiguration(import_score3.StaffPreset.GuitarTreble).setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", import_theory3.ScaleType.Major).setTimeSignature("3/4").setTempo(80).addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "F#4", import_theory3.NoteLength.Eighth, { stem: import_score3.Stem.Up }).addNote(0, "G4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true, stem: import_score3.Stem.Down }).addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addNote(0, "D4", import_theory3.NoteLength.Eighth, { string: 3 }).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "A4", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "D3" }).addNote(0, "D3", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "B3" }).addNavigation(import_score3.Navigation.EndRepeat).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "D4" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(1, "E2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "E3", import_theory3.NoteLength.Eighth).addNote(0, "D#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "E3", import_theory3.NoteLength.Eighth).addNote(0, "F#3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addNote(1, "E2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "A3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "A4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "ff").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "D3" }).addNote(0, "D3", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "B3" }).endSong().getDocument();
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
createAndanteByDiabelli,
|
|
53
|
+
createFrereJacques,
|
|
54
|
+
createGreensleeves
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* WebMusicScore v3.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
|
+
import "../chunk-ZWFAOHYM.mjs";
|
|
3
|
+
|
|
4
|
+
// src/pieces/frere-jacques.ts
|
|
5
|
+
import { NoteLength, ScaleType } from "@tspro/web-music-score/theory";
|
|
6
|
+
import { DocumentBuilder, StaffPreset } from "@tspro/web-music-score/score";
|
|
7
|
+
function createFrereJacques() {
|
|
8
|
+
return new DocumentBuilder().setScoreConfiguration(StaffPreset.GuitarTreble).setHeader("Frere Jacques").addMeasure().setKeySignature("G", ScaleType.Major).setTimeSignature("4/4").addNote(0, "G3", NoteLength.Quarter).addNote(0, "A3", NoteLength.Quarter).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "A3", NoteLength.Quarter).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "B3", NoteLength.Quarter).addNote(0, "C4", NoteLength.Quarter).addNote(0, "D4", NoteLength.Half).endRow().addMeasure().addNote(0, "B3", NoteLength.Quarter).addNote(0, "C4", NoteLength.Quarter).addNote(0, "D4", NoteLength.Half).addMeasure().addNote(0, "D4", NoteLength.Eighth).addNote(0, "E4", NoteLength.Eighth).addNote(0, "D4", NoteLength.Eighth).addNote(0, "C4", NoteLength.Eighth).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).endRow().addMeasure().addNote(0, "D4", NoteLength.Eighth).addNote(0, "E4", NoteLength.Eighth).addNote(0, "D4", NoteLength.Eighth).addNote(0, "C4", NoteLength.Eighth).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "D3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Half).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "D3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Half).getDocument();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// src/pieces/greensleeves.ts
|
|
12
|
+
import { NoteLength as NoteLength2, ScaleType as ScaleType2 } from "@tspro/web-music-score/theory";
|
|
13
|
+
import { Arpeggio, Navigation, StaffPreset as StaffPreset2, Stem, Label, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
|
|
14
|
+
function createGreensleeves() {
|
|
15
|
+
return new DocumentBuilder2().setScoreConfiguration(StaffPreset2.GuitarTreble).setHeader("Greensleeves").addMeasure().setKeySignature("C", ScaleType2.Major).setTimeSignature("6/8").setTempo(140).addNote(0, "A3", NoteLength2.Eighth).addMeasure().addNavigation(Navigation.StartRepeat).addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "D4", NoteLength2.Eighth).addNote(0, "E4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "A2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Eighth).addNote(0, "A3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "F").addNote(0, "G#3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "F2", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter).addMeasure().addNote(0, "B3", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "E").addNote(0, "G#3", NoteLength2.Eighth).addNote(0, "E3", NoteLength2.Quarter).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "E2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "B2", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).endRow().addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "D4", NoteLength2.Eighth).addNote(0, "E4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "A2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Eighth, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "B3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(0, "G#3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "E").addNote(0, "F#3", NoteLength2.Sixteenth).addNote(0, "G#3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter, { dotted: true }).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], NoteLength2.Quarter, { dotted: true, arpeggio: Arpeggio.Up, stem: Stem.Up }).addLabel(Label.Chord, "C").addNote(0, "G4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F#4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addRest(1, NoteLength2.Quarter, { dotted: true, hide: true }).addNote(1, "C3", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "G3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Eighth).addNote(0, "A3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "F").addNote(0, "G#3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "F2", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter).addMeasure().addNote(0, "B3", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "E").addNote(0, "G#3", NoteLength2.Eighth).addNote(0, "E3", NoteLength2.Quarter, { dotted: true }).addNote(1, "E2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "B2", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Eighth).endRow().addMeasure().addNote(0, "G4", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "C").addNote(0, "G4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F#4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "C3", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "G3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "C3", NoteLength2.Eighth).addNote(1, "G3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Eighth, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "B3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(0, "G#3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "E").addNote(0, "F#3", NoteLength2.Sixteenth).addNote(0, "G#3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNavigation(Navigation.Ending, 1).addNavigation(Navigation.EndRepeat).addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).addMeasure().addNavigation(Navigation.Ending, 2).addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter, { dotted: true }).addFermata().addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).getDocument();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/pieces/andante-diabelli.ts
|
|
19
|
+
import { NoteLength as NoteLength3, ScaleType as ScaleType3 } from "@tspro/web-music-score/theory";
|
|
20
|
+
import { NoteAnchor, Navigation as Navigation2, Annotation, StaffPreset as StaffPreset3, Stem as Stem2, DocumentBuilder as DocumentBuilder3, Connective } from "@tspro/web-music-score/score";
|
|
21
|
+
function createAndanteByDiabelli() {
|
|
22
|
+
return new DocumentBuilder3().setScoreConfiguration(StaffPreset3.GuitarTreble).setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", ScaleType3.Major).setTimeSignature("3/4").setTempo(80).addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "F#4", NoteLength3.Eighth, { stem: Stem2.Up }).addNote(0, "G4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(1, "D3", NoteLength3.Half, { dotted: true, stem: Stem2.Down }).addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addNote(0, "D4", NoteLength3.Eighth, { string: 3 }).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Eighth).addNote(0, "A4", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "D3" }).addNote(0, "D3", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "B3" }).addNavigation(Navigation2.EndRepeat).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "D4" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(1, "E2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "E3", NoteLength3.Eighth).addNote(0, "D#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "E3", NoteLength3.Eighth).addNote(0, "F#3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addNote(1, "E2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "A3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "G#3", NoteLength3.Eighth).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "G4", NoteLength3.Eighth).addNote(0, "A4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "G4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "ff").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "D3" }).addNote(0, "D3", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "B3" }).endSong().getDocument();
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
createAndanteByDiabelli,
|
|
26
|
+
createFrereJacques,
|
|
27
|
+
createGreensleeves
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { c as Scale, S as ScaleType } from '../scale-C-YS5iVG.mjs';
|
|
4
|
+
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-B5ZtlHc8.mjs';
|
|
5
|
+
import { H as Handedness } from '../guitar-zASF7B1g.mjs';
|
|
6
|
+
import { D as DivRect, M as MDocument, h as ScoreEventListener, V as MRenderer, W as MPlaybackButtons } from '../interface-CLb7xa7_.mjs';
|
|
7
|
+
import '../tempo-TjQKn46X.mjs';
|
|
8
|
+
import '@tspro/ts-utils-lib';
|
|
9
|
+
|
|
10
|
+
/** @public */
|
|
11
|
+
interface CircleOfFifthsProps {
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
scale: Scale;
|
|
14
|
+
onScaleChange: (scale: Scale) => void;
|
|
15
|
+
}
|
|
16
|
+
/** @public */
|
|
17
|
+
declare class CircleOfFifths extends React.Component<CircleOfFifthsProps, {}> {
|
|
18
|
+
constructor(props: CircleOfFifthsProps);
|
|
19
|
+
onScaleChange(tonic: string, scaleType: ScaleType): void;
|
|
20
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** @public */
|
|
24
|
+
declare class FretPosition {
|
|
25
|
+
readonly guitarCtx: GuitarContext;
|
|
26
|
+
readonly stringId: number;
|
|
27
|
+
readonly fretId: number;
|
|
28
|
+
readonly chromaticId: number;
|
|
29
|
+
readonly note: Note;
|
|
30
|
+
readonly isScaleNote: boolean;
|
|
31
|
+
readonly isScaleRootNote: boolean;
|
|
32
|
+
isVisible: boolean;
|
|
33
|
+
text: string;
|
|
34
|
+
textColor: string;
|
|
35
|
+
fillColor: string | undefined;
|
|
36
|
+
borderColor: string | undefined;
|
|
37
|
+
isBarre: boolean;
|
|
38
|
+
constructor(guitarCtx: GuitarContext, stringId: number, fretId: number, chromaticId: number);
|
|
39
|
+
get chromaticClass(): number;
|
|
40
|
+
show(): void;
|
|
41
|
+
hide(): void;
|
|
42
|
+
setDefaultText(): void;
|
|
43
|
+
setDefaultFillColor(): void;
|
|
44
|
+
setDefaultBorderColor(showBorder?: boolean): void;
|
|
45
|
+
}
|
|
46
|
+
/** @public */
|
|
47
|
+
declare class GuitarContext {
|
|
48
|
+
readonly tuningName: string;
|
|
49
|
+
readonly scale: Scale;
|
|
50
|
+
readonly handedness: Handedness;
|
|
51
|
+
readonly pitchNotation: PitchNotation;
|
|
52
|
+
readonly guitarNoteLabel: GuitarNoteLabel;
|
|
53
|
+
readonly maxFretId: number;
|
|
54
|
+
private readonly fretPositionTable;
|
|
55
|
+
private readonly tuningStrings;
|
|
56
|
+
constructor(tuningName: string, scale: Scale, handedness: Handedness, pitchNotation: PitchNotation, guitarNoteLabel: GuitarNoteLabel);
|
|
57
|
+
getFretPosition(stringId: number, fretId: number): Readonly<FretPosition>;
|
|
58
|
+
getStringTuning(stringId: number): Note;
|
|
59
|
+
getTuningOverview(): string;
|
|
60
|
+
alterTuningName(tuningName: string): GuitarContext;
|
|
61
|
+
alterScale(scale: Scale): GuitarContext;
|
|
62
|
+
alterHandedness(handedness: Handedness): GuitarContext;
|
|
63
|
+
alterPitchNotation(pitchNotation: PitchNotation): GuitarContext;
|
|
64
|
+
alterGuitarNoteLabel(guitarNoteLabel: GuitarNoteLabel): GuitarContext;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** @public */
|
|
68
|
+
declare class FretPositionData {
|
|
69
|
+
readonly fretPosition: Readonly<FretPosition>;
|
|
70
|
+
readonly cellRect: DivRect;
|
|
71
|
+
readonly noteRect: DivRect;
|
|
72
|
+
constructor(fretPosition: Readonly<FretPosition>, cellRect: DivRect, noteRect: DivRect);
|
|
73
|
+
}
|
|
74
|
+
/** @public */
|
|
75
|
+
type UpdateFretPositionFunc = (fretPosition: FretPosition) => void;
|
|
76
|
+
/** @public */
|
|
77
|
+
type ClickFretPositionFunc = (fretPosition: FretPosition) => void;
|
|
78
|
+
/** @public */
|
|
79
|
+
interface GuitarViewProps {
|
|
80
|
+
style?: React.CSSProperties;
|
|
81
|
+
guitarContext: GuitarContext;
|
|
82
|
+
onUpdateFretPosition?: UpdateFretPositionFunc;
|
|
83
|
+
onClickFretPosition?: ClickFretPositionFunc;
|
|
84
|
+
}
|
|
85
|
+
/** @public */
|
|
86
|
+
interface GuitarViewState {
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
table: FretPositionData[][];
|
|
90
|
+
}
|
|
91
|
+
/** @public */
|
|
92
|
+
declare class GuitarView extends React.Component<GuitarViewProps, GuitarViewState> {
|
|
93
|
+
state: GuitarViewState;
|
|
94
|
+
constructor(props: GuitarViewProps);
|
|
95
|
+
componentDidUpdate(prevProps: GuitarViewProps): void;
|
|
96
|
+
getLayoutState(): {
|
|
97
|
+
table: FretPositionData[][];
|
|
98
|
+
width: number;
|
|
99
|
+
height: number;
|
|
100
|
+
};
|
|
101
|
+
onHover(fretPositionData?: FretPositionData): void;
|
|
102
|
+
onClick(fretPositionData?: FretPositionData): void;
|
|
103
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** @public */
|
|
107
|
+
interface MusicScoreViewProps {
|
|
108
|
+
doc: MDocument;
|
|
109
|
+
onScoreEvent?: ScoreEventListener;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
*
|
|
114
|
+
* Usage:
|
|
115
|
+
*
|
|
116
|
+
* import * as Score from "\@tspro/web-music-score";
|
|
117
|
+
*
|
|
118
|
+
* \<Score.MusicScoreView doc=\{doc\} /\>
|
|
119
|
+
*/
|
|
120
|
+
declare class MusicScoreView extends React.Component<MusicScoreViewProps, {}> {
|
|
121
|
+
renderer: MRenderer;
|
|
122
|
+
constructor(props: MusicScoreViewProps);
|
|
123
|
+
componentDidUpdate(prevProps: Readonly<MusicScoreViewProps>, prevState: Readonly<{}>): void;
|
|
124
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** @public */
|
|
128
|
+
declare enum PlaybackButtonsLayout {
|
|
129
|
+
PlayStopSingle = 0,
|
|
130
|
+
PlayStop = 1,
|
|
131
|
+
PlayPauseStop = 2
|
|
132
|
+
}
|
|
133
|
+
/** @public */
|
|
134
|
+
interface PlaybackButtonsProps {
|
|
135
|
+
doc: MDocument;
|
|
136
|
+
buttonLayout?: PlaybackButtonsLayout;
|
|
137
|
+
playLabel?: string;
|
|
138
|
+
pauseLabel?: string;
|
|
139
|
+
stopLabel?: string;
|
|
140
|
+
}
|
|
141
|
+
/** @public */
|
|
142
|
+
interface PlaybackButtonsState {
|
|
143
|
+
controller: MPlaybackButtons;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @public
|
|
147
|
+
*
|
|
148
|
+
* Usage:
|
|
149
|
+
*
|
|
150
|
+
* import * as Score from "\@tspro/web-music-score";
|
|
151
|
+
*
|
|
152
|
+
* \<Score.PlaybackButtons doc=\{doc\} /\>
|
|
153
|
+
*
|
|
154
|
+
* To set custom play, pause and stop labels:
|
|
155
|
+
*
|
|
156
|
+
* \<Score.PlaybackButtons doc=\{doc\} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" /\>
|
|
157
|
+
*
|
|
158
|
+
* To use different button layout.
|
|
159
|
+
*
|
|
160
|
+
* \<Score.PlaybackButtons doc=\{doc\} buttonLayout=\{Score.PlaybackButtonsLayout.PlayStopSingle\} /\>
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
declare class PlaybackButtons extends React.Component<PlaybackButtonsProps, PlaybackButtonsState> {
|
|
164
|
+
state: PlaybackButtonsState;
|
|
165
|
+
constructor(props: PlaybackButtonsProps);
|
|
166
|
+
componentDidUpdate(prevProps: Readonly<PlaybackButtonsProps>): void;
|
|
167
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export { CircleOfFifths, type CircleOfFifthsProps, type ClickFretPositionFunc, FretPosition, FretPositionData, GuitarContext, GuitarView, type GuitarViewProps, type GuitarViewState, MusicScoreView, type MusicScoreViewProps, PlaybackButtons, PlaybackButtonsLayout, type PlaybackButtonsProps, type PlaybackButtonsState, type UpdateFretPositionFunc };
|