web-music-score 6.0.0-pre.3 → 6.0.0-pre.5
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 +16 -1
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +12 -2
- package/dist/audio/index.mjs +4 -4
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +4 -4
- package/dist/audio-synth/index.js +1 -1
- package/dist/audio-synth/index.mjs +4 -4
- package/dist/{chunk-7OA6ZYVA.mjs → chunk-6R3N7WJC.mjs} +3 -3
- package/dist/{chunk-TM46RT77.mjs → chunk-DQFQEO6F.mjs} +4 -4
- package/dist/{chunk-QJ3X3GQ6.mjs → chunk-G3HIPFVF.mjs} +2 -2
- package/dist/{chunk-S5PIZUF6.mjs → chunk-JP3PJICN.mjs} +14 -4
- package/dist/{chunk-SCF6ZZFQ.mjs → chunk-U2D4H5TI.mjs} +3 -3
- package/dist/{chunk-AMTQ5XLI.mjs → chunk-Y67RBHW2.mjs} +2 -2
- package/dist/core/index.js +1740 -5
- package/dist/core/index.mjs +8 -14
- package/dist/iife/audio-cg.js +1 -1
- package/dist/iife/index.js +13 -13
- package/dist/{music-objects-DLmp5uL6.d.ts → music-objects-D-xO1oti.d.ts} +75 -5
- package/dist/{note-RVXvpfyV.d.ts → note-CJuq5aBy.d.ts} +1 -1
- package/dist/pieces/index.d.ts +3 -3
- package/dist/pieces/index.js +2 -2
- package/dist/pieces/index.mjs +3 -3
- package/dist/react-ui/index.d.ts +4 -3
- package/dist/react-ui/index.js +3 -1
- package/dist/react-ui/index.mjs +4 -2
- package/dist/{scale-B1M10_fu.d.ts → scale-DxGqFxlv.d.ts} +2 -2
- package/dist/score/index.d.ts +15 -56
- package/dist/score/index.js +731 -603
- package/dist/score/index.mjs +722 -605
- package/dist/{tempo-D-JF-8b_.d.ts → tempo-pCAa6qgo.d.ts} +1 -1
- package/dist/theory/index.d.ts +5 -5
- package/dist/theory/index.js +12 -2
- package/dist/theory/index.mjs +4 -4
- package/package.json +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Note, A as Accidental } from './note-
|
|
2
|
-
import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-
|
|
1
|
+
import { N as Note, A as Accidental } from './note-CJuq5aBy.js';
|
|
2
|
+
import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-pCAa6qgo.js';
|
|
3
3
|
import { AnchoredRect, UniMap, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/** Staff preset values for score configuration. */
|
|
@@ -1104,7 +1104,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1104
1104
|
getBarLineLeft(): ObjBarLineLeft;
|
|
1105
1105
|
getBarLineRight(): ObjBarLineRight;
|
|
1106
1106
|
getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
|
|
1107
|
-
|
|
1107
|
+
fillWithRests(...voiceId: VoiceId[]): void;
|
|
1108
1108
|
requestLayout(): void;
|
|
1109
1109
|
layout(ctx: RenderContext): void;
|
|
1110
1110
|
layoutWidth(ctx: RenderContext, width: number): void;
|
|
@@ -1251,6 +1251,7 @@ declare class RenderContext {
|
|
|
1251
1251
|
private canvas?;
|
|
1252
1252
|
private ctx?;
|
|
1253
1253
|
private mdoc?;
|
|
1254
|
+
private paint;
|
|
1254
1255
|
private cursorRect?;
|
|
1255
1256
|
private mousePos?;
|
|
1256
1257
|
private curStaffPos?;
|
|
@@ -1269,6 +1270,8 @@ declare class RenderContext {
|
|
|
1269
1270
|
private forceDraw;
|
|
1270
1271
|
private onImageLoaded;
|
|
1271
1272
|
setDocument(mdoc?: MDocument): void;
|
|
1273
|
+
setPaint(paint?: Paint): void;
|
|
1274
|
+
getPaint(): Paint;
|
|
1272
1275
|
setCanvas(canvas: HTMLCanvasElement): void;
|
|
1273
1276
|
setScoreEventListener(fn: ScoreEventListener): void;
|
|
1274
1277
|
needMouseInput(): boolean;
|
|
@@ -1298,7 +1301,7 @@ declare class RenderContext {
|
|
|
1298
1301
|
getRestRect(restSize: number): AnchoredRect;
|
|
1299
1302
|
drawRest(restSize: number, x: number, y: number): void;
|
|
1300
1303
|
drawFlag(rect: Rect | AnchoredRect, dir: "up" | "down"): void;
|
|
1301
|
-
color(color: string): RenderContext;
|
|
1304
|
+
color(color: string | ColorKey): RenderContext;
|
|
1302
1305
|
lineColor(color: string): RenderContext;
|
|
1303
1306
|
fillColor(color: string): RenderContext;
|
|
1304
1307
|
lineWidth(lineWidth?: number): RenderContext;
|
|
@@ -1639,6 +1642,67 @@ declare class ScoreObjectEvent extends ScoreEvent {
|
|
|
1639
1642
|
/** Score event listener type. */
|
|
1640
1643
|
type ScoreEventListener = (event: ScoreEvent) => void;
|
|
1641
1644
|
|
|
1645
|
+
/** Color keys. */
|
|
1646
|
+
type ColorKey = "hilight.staffpos" | "hilight.object" | "play.cursor" | "background" | "header.title" | "header.composer" | "header.arranger" | "rowgroup.instrument" | "rowgroup.frame" | "staff.frame" | "staff.note" | "staff.rest" | "staff.lyrics" | "staff.connective" | "staff.signature.clef" | "staff.signature.key" | "staff.signature.time" | "staff.signature.tempo" | "staff.signature.measurenum" | "staff.element.fermata" | "staff.element.annotation" | "staff.element.navigation" | "staff.element.label" | "tab.frame" | "tab.note" | "tab.rest" | "tab.lyrics" | "tab.connective" | "tab.tuning" | "tab.signature.clef" | "tab.signature.key" | "tab.signature.time" | "tab.signature.tempo" | "tab.signature.measurenum" | "tab.element.fermata" | "tab.element.annotation" | "tab.element.navigation" | "tab.element.label";
|
|
1647
|
+
/** Function to typecheck a valid ColorKey variable. */
|
|
1648
|
+
declare function colorKey(colorKey: ColorKey): ColorKey;
|
|
1649
|
+
/** Color key parts. */
|
|
1650
|
+
type ColorKeyPart = "background" | "header" | "title" | "composer" | "arranger" | "rowgroup" | "instrument" | "frame" | "staff" | "tab" | "note" | "rest" | "lyrics" | "connective" | "signature" | "clef" | "key" | "time" | "tempo" | "measurenum" | "tuning" | "element" | "fermata" | "annotation" | "navigation" | "label";
|
|
1651
|
+
/**
|
|
1652
|
+
* Paint class for coloring music scores.
|
|
1653
|
+
*/
|
|
1654
|
+
declare class Paint {
|
|
1655
|
+
static readonly default: Paint;
|
|
1656
|
+
colors: Record<ColorKey, string>;
|
|
1657
|
+
/**
|
|
1658
|
+
* Set color of any score document element. Use combination of color key parts to set color of specific elements.
|
|
1659
|
+
* ```ts
|
|
1660
|
+
* setColor("all", "red"); // Set color of everything except background.
|
|
1661
|
+
* setColor("staff", "red"); // Set color of all staff elements.
|
|
1662
|
+
* setColor(["staff", "signature"], "red"); // Set color of all staff signature elements.
|
|
1663
|
+
* setColor(["staff", "signature", "key"], "red"); // Set color of staff key signature.
|
|
1664
|
+
* setColor(["staff", "signature", "time"], "red"); // Set color of staff time signature.
|
|
1665
|
+
* setColor("staff.signature.time", "red"); // Set color of staff time signature.
|
|
1666
|
+
* // etc.
|
|
1667
|
+
* ```
|
|
1668
|
+
*
|
|
1669
|
+
* @param colorKeyOrParts - Color key parts to set color for.
|
|
1670
|
+
* @param color - Color (HTML color code e.g. "green", "#AA6644", etc.)
|
|
1671
|
+
*/
|
|
1672
|
+
setColor(colorKeyOrParts: ColorKey | ColorKeyPart | ColorKeyPart[] | "all", color: string): void;
|
|
1673
|
+
/**
|
|
1674
|
+
* Get color.
|
|
1675
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
1676
|
+
* @returns - Color value (e.g. "white" or "#FFFFFF").
|
|
1677
|
+
*/
|
|
1678
|
+
getColor(colorKeyOrColor: ColorKey | string): string;
|
|
1679
|
+
/**
|
|
1680
|
+
* Get color code.
|
|
1681
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
1682
|
+
* @returns - Color code (e.g. "#FFFFFF").
|
|
1683
|
+
*/
|
|
1684
|
+
getColorCode(colorKeyOrColor: ColorKey | string): string;
|
|
1685
|
+
/**
|
|
1686
|
+
* Get color RGBA.
|
|
1687
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
1688
|
+
* @returns - Color RGBA (e.g. [1, 1, 1, 1]).
|
|
1689
|
+
*/
|
|
1690
|
+
getColorRGBA(colorKeyOrColor: ColorKey | string): [number, number, number, number];
|
|
1691
|
+
/**
|
|
1692
|
+
* Convert color name to color code.
|
|
1693
|
+
* @param colorName - Color name (e.g. "white").
|
|
1694
|
+
* @returns - Color code (e.g. "#FFFFFF")
|
|
1695
|
+
*/
|
|
1696
|
+
static colorNameToCode(colorName: string): string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Convert color name ro RGBA.
|
|
1699
|
+
* @param colorName - Color name (e.g. "white").
|
|
1700
|
+
* @param alpha - Alpha value 0..1 (default is 1).
|
|
1701
|
+
* @returns - RGBA (e.g. [1, 1, 1, 1]).
|
|
1702
|
+
*/
|
|
1703
|
+
static colorNameToRGBA(colorName: string, alpha?: number): [number, number, number, number];
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1642
1706
|
/** Music player class. */
|
|
1643
1707
|
declare class MPlayer {
|
|
1644
1708
|
private static currentlyPlaying;
|
|
@@ -1676,6 +1740,12 @@ declare class MRenderContext {
|
|
|
1676
1740
|
* Create new render context instance.
|
|
1677
1741
|
*/
|
|
1678
1742
|
constructor();
|
|
1743
|
+
/**
|
|
1744
|
+
* Set Paint for this render context.
|
|
1745
|
+
* @param paint - Paint.
|
|
1746
|
+
* @returns - This render context instance.
|
|
1747
|
+
*/
|
|
1748
|
+
setPaint(paint?: Paint): this;
|
|
1679
1749
|
/**
|
|
1680
1750
|
* Attach music document to this render context.
|
|
1681
1751
|
* @param doc - Music document.
|
|
@@ -2395,4 +2465,4 @@ declare class MExtensionLine extends MusicInterface {
|
|
|
2395
2465
|
getMusicObject(): ObjExtensionLine;
|
|
2396
2466
|
}
|
|
2397
2467
|
|
|
2398
|
-
export { MTabSignature as $, type AnnotationText as A, MHeader as B, Connective as C, MImage as D, MMeasure as E, Fermata as F, MBarLineRight as G, MBarLineLeft as H, MStaffBarLine as I, MNoteGroup as J, MStaffNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MTabNoteGroup as O, MRest as P, MStaffRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MRhythmColumn as U, type VoiceId as V, MScoreRow as W, MScoreRowGroup as X, MStaff as Y, MTab as Z, MStaffSignature as _, type ScoreConfiguration as a, MTabRhythm as a0, MSpecialText as a1, MText as a2, MLyrics as a3, MExtensionLine as a4,
|
|
2468
|
+
export { MTabSignature as $, type AnnotationText as A, MHeader as B, Connective as C, MImage as D, MMeasure as E, Fermata as F, MBarLineRight as G, MBarLineLeft as H, MStaffBarLine as I, MNoteGroup as J, MStaffNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MTabNoteGroup as O, MRest as P, MStaffRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MRhythmColumn as U, type VoiceId as V, MScoreRow as W, MScoreRowGroup as X, MStaff as Y, MTab as Z, MStaffSignature as _, type ScoreConfiguration as a, MTabRhythm as a0, MSpecialText as a1, MText as a2, MLyrics as a3, MExtensionLine as a4, type ColorKey as a5, colorKey as a6, type ColorKeyPart as a7, Paint as a8, Clef as a9, type BaseConfig as aa, type StaffConfig as ab, type TabConfig as ac, getVoiceIds as ad, isVoiceId as ae, validateVoiceId as af, type StringNumber as ag, getStringNumbers as ah, isStringNumber as ai, validateStringNumber as aj, getVerseNumbers as ak, isVerseNumber as al, validateVerseNumber as am, Stem as an, Arpeggio as ao, type StaffTabOrGroup as ap, LyricsAlign as aq, LyricsHyphen as ar, DynamicsAnnotation as as, TempoAnnotation as at, PlayState as au, type PlayStateChangeListener as av, type MeasureOptions as b, type VerseNumber as c, type StaffTabOrGroups as d, Navigation as e, Annotation as f, Label as g, TieType as h, NoteAnchor as i, VerticalPosition as j, type ScoreEventType as k, ScoreEvent as l, ScoreStaffPosEvent as m, ScoreObjectEvent as n, type ScoreEventListener as o, MPlayer as p, MRenderContext as q, MPlaybackButtons as r, MusicInterface as s, MAccidental as t, MConnective as u, MArpeggio as v, MBeamGroup as w, MStaffBeamGroup as x, MEnding as y, MFermata as z };
|
|
@@ -300,7 +300,7 @@ declare class Note {
|
|
|
300
300
|
* @param b - Note b.
|
|
301
301
|
* @returns - -1, 0 or 1.
|
|
302
302
|
*/
|
|
303
|
-
static compareFunc(a: Note, b: Note): 1 |
|
|
303
|
+
static compareFunc(a: Note, b: Note): 1 | -1 | 0;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
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 };
|
package/dist/pieces/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MDocument } from '../music-objects-
|
|
2
|
-
import '../note-
|
|
3
|
-
import '../tempo-
|
|
1
|
+
import { M as MDocument } from '../music-objects-D-xO1oti.js';
|
|
2
|
+
import '../note-CJuq5aBy.js';
|
|
3
|
+
import '../tempo-pCAa6qgo.js';
|
|
4
4
|
import '@tspro/ts-utils-lib';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/pieces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -41,7 +41,7 @@ function createCanonInD() {
|
|
|
41
41
|
return new import_score2.DocumentBuilder().setHeader("Canon in D", "Pachelbel").setScoreConfiguration([
|
|
42
42
|
{ type: "staff", clef: "G", voiceId: 0, instrument: "Piano" },
|
|
43
43
|
{ type: "staff", clef: "F", voiceId: 1, instrument: "Piano" }
|
|
44
|
-
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").
|
|
44
|
+
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").fillWithRests(0).addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["F#5", "E5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "C#5"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().addNote(0, ["B4", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addNote(0, ["B4", "C#5"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addChord(0, ["F#5", "D5"], "2n").addChord(0, ["E5", "C#5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["D5", "B4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").endRow().addMeasure({ showNumber: false }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["A4", "F#4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["D4", "F#4", "A4", "G4"], "4n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "D4", "F#4", "E4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "D4", "A4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "B4", "A4", "G4"], "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["F#4", "D4", "E4", "C#5"], "4n").addNote(1, ["D3", "A2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "A5", "A4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B4", "G4", "A4", "F#4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5"], "4n").addRest(0, "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D5", "C#5", "D5", "D4"], "8n").addNote(0, ["C#4", "A4", "E4", "F#4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5", "B4"], "8n").addNote(0, ["C#5", "F#5", "A5", "B5"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["G5", "F#5", "E5", "G5"], "8n").addNote(0, ["F#5", "E5", "D5", "C#5"], "8n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["B4", "A4", "G4", "F#4"], "8n").addNote(0, ["E4", "G4", "F#4", "E4"], "8n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D4", "E4", "F#4", "G4"], "8n").addNote(0, ["A4", "E4", "A4", "G4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "B4", "A4", "G4"], "8n").addNote(0, ["A4", "G4", "F#4", "E4"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "B4", "C#5"], "8n").addNote(0, ["D5", "C#5", "B4", "A4"], "8n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "F#4", "E4", "B4"], "8n").addNote(0, ["A4", "B4", "A4", "G4"], "8n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "F#4", "4n").addNote(0, "F#5", "4n").addNote(0, "E5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(0, "F#5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B5", "A5"], "2n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["B5", "C#6"], "2n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D6", "D5"], "4n").addNote(0, "C#5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "B4", "4n").addNote(0, "D5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "D5", "2n").addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "E5", "A5"], "4n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, ["A5", "A4", "B4", "C#5"], "16n").addNote(0, ["D5", "E5", "F#5", "G5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["F#4", "G4"], "16n").addNote(0, ["A4", "B4", "A4", "G4"], "16n").addNote(0, ["A4", "F#4", "G4", "A4"], "16n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "G4", "8n").addNote(0, ["F#4", "E4"], "16n").addNote(0, ["F#4", "E4", "D4", "E4"], "16n").addNote(0, ["F#4", "G4", "A4", "B4"], "16n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "B4", "8n").addNote(0, ["C#5", "D5"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(0, ["E5", "F#5", "G5", "A5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["E5", "D5"], "16n").addNote(0, ["E5", "C#5", "D5", "E5"], "16n").addNote(0, ["F#5", "E5", "D5", "C#5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "D5", "8n").addNote(0, ["B4", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["D4", "E4"], "16n").addNote(0, ["F#4", "G4", "F#4", "E4"], "16n").addNote(0, ["F#4", "D5", "C#5", "D5"], "16n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "B4", "8n").addNote(0, ["A4", "G4"], "16n").addNote(0, ["A4", "G4", "F#4", "G4"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["C#5", "B4"], "16n").addNote(0, ["C#5", "D5", "E5", "D5"], "16n").addNote(0, ["C#5", "D5", "B4", "C#5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNavigation("startRepeat").addNote(0, "D5", "4.").addNote(0, "A5", "8n").addNote(0, ["A5", "B5", "A5", "G5"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "4.").addNote(0, "F#5", "8n").addNote(0, ["F#5", "G5", "F#5", "E5"], "8n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "D5", "4.").addNote(0, "D5", "8n").addNote(0, ["D5", "A5"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "C5", "B5", "C5"], "8n").addNote(0, "C#5", "2n").addNote(1, ["G2", "A2"], "2n").addNavigation("endRepeat").addMeasure().addNote(0, "D5", "1n").addNote(1, "D3", "1n").getDocument();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// src/pieces/frere-jacques.ts
|
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
2
|
-
import "../chunk-
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
|
+
import "../chunk-G3HIPFVF.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pieces/andante-diabelli.ts
|
|
5
5
|
import { DocumentBuilder } from "web-music-score/score";
|
|
@@ -13,7 +13,7 @@ function createCanonInD() {
|
|
|
13
13
|
return new DocumentBuilder2().setHeader("Canon in D", "Pachelbel").setScoreConfiguration([
|
|
14
14
|
{ type: "staff", clef: "G", voiceId: 0, instrument: "Piano" },
|
|
15
15
|
{ type: "staff", clef: "F", voiceId: 1, instrument: "Piano" }
|
|
16
|
-
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").
|
|
16
|
+
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").fillWithRests(0).addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["F#5", "E5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "C#5"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().addNote(0, ["B4", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addNote(0, ["B4", "C#5"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addChord(0, ["F#5", "D5"], "2n").addChord(0, ["E5", "C#5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["D5", "B4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").endRow().addMeasure({ showNumber: false }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["A4", "F#4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["D4", "F#4", "A4", "G4"], "4n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "D4", "F#4", "E4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "D4", "A4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "B4", "A4", "G4"], "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["F#4", "D4", "E4", "C#5"], "4n").addNote(1, ["D3", "A2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "A5", "A4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B4", "G4", "A4", "F#4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5"], "4n").addRest(0, "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D5", "C#5", "D5", "D4"], "8n").addNote(0, ["C#4", "A4", "E4", "F#4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5", "B4"], "8n").addNote(0, ["C#5", "F#5", "A5", "B5"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["G5", "F#5", "E5", "G5"], "8n").addNote(0, ["F#5", "E5", "D5", "C#5"], "8n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["B4", "A4", "G4", "F#4"], "8n").addNote(0, ["E4", "G4", "F#4", "E4"], "8n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D4", "E4", "F#4", "G4"], "8n").addNote(0, ["A4", "E4", "A4", "G4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "B4", "A4", "G4"], "8n").addNote(0, ["A4", "G4", "F#4", "E4"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "B4", "C#5"], "8n").addNote(0, ["D5", "C#5", "B4", "A4"], "8n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "F#4", "E4", "B4"], "8n").addNote(0, ["A4", "B4", "A4", "G4"], "8n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "F#4", "4n").addNote(0, "F#5", "4n").addNote(0, "E5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(0, "F#5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B5", "A5"], "2n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["B5", "C#6"], "2n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D6", "D5"], "4n").addNote(0, "C#5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "B4", "4n").addNote(0, "D5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "D5", "2n").addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "E5", "A5"], "4n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, ["A5", "A4", "B4", "C#5"], "16n").addNote(0, ["D5", "E5", "F#5", "G5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["F#4", "G4"], "16n").addNote(0, ["A4", "B4", "A4", "G4"], "16n").addNote(0, ["A4", "F#4", "G4", "A4"], "16n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "G4", "8n").addNote(0, ["F#4", "E4"], "16n").addNote(0, ["F#4", "E4", "D4", "E4"], "16n").addNote(0, ["F#4", "G4", "A4", "B4"], "16n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "B4", "8n").addNote(0, ["C#5", "D5"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(0, ["E5", "F#5", "G5", "A5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["E5", "D5"], "16n").addNote(0, ["E5", "C#5", "D5", "E5"], "16n").addNote(0, ["F#5", "E5", "D5", "C#5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "D5", "8n").addNote(0, ["B4", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["D4", "E4"], "16n").addNote(0, ["F#4", "G4", "F#4", "E4"], "16n").addNote(0, ["F#4", "D5", "C#5", "D5"], "16n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "B4", "8n").addNote(0, ["A4", "G4"], "16n").addNote(0, ["A4", "G4", "F#4", "G4"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["C#5", "B4"], "16n").addNote(0, ["C#5", "D5", "E5", "D5"], "16n").addNote(0, ["C#5", "D5", "B4", "C#5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNavigation("startRepeat").addNote(0, "D5", "4.").addNote(0, "A5", "8n").addNote(0, ["A5", "B5", "A5", "G5"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "4.").addNote(0, "F#5", "8n").addNote(0, ["F#5", "G5", "F#5", "E5"], "8n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "D5", "4.").addNote(0, "D5", "8n").addNote(0, ["D5", "A5"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "C5", "B5", "C5"], "8n").addNote(0, "C#5", "2n").addNote(1, ["G2", "A2"], "2n").addNavigation("endRepeat").addMeasure().addNote(0, "D5", "1n").addNote(1, "D3", "1n").getDocument();
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// src/pieces/frere-jacques.ts
|
package/dist/react-ui/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { M as MDocument, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-
|
|
4
|
-
import '../note-
|
|
5
|
-
import '../tempo-
|
|
3
|
+
import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-D-xO1oti.js';
|
|
4
|
+
import '../note-CJuq5aBy.js';
|
|
5
|
+
import '../tempo-pCAa6qgo.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
8
|
interface MusicScoreViewProps {
|
|
9
9
|
doc: MDocument;
|
|
10
|
+
paint?: Paint;
|
|
10
11
|
onScoreEvent?: ScoreEventListener;
|
|
11
12
|
}
|
|
12
13
|
/**
|
package/dist/react-ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -47,6 +47,8 @@ var MusicScoreView = class extends React.Component {
|
|
|
47
47
|
super(props);
|
|
48
48
|
__publicField(this, "ctx");
|
|
49
49
|
this.ctx = new import_score.MRenderContext();
|
|
50
|
+
if (props.paint)
|
|
51
|
+
this.ctx.setPaint(props.paint);
|
|
50
52
|
this.ctx.setDocument(props.doc);
|
|
51
53
|
if (props.onScoreEvent) {
|
|
52
54
|
this.ctx.setScoreEventListener(props.onScoreEvent);
|
package/dist/react-ui/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-G3HIPFVF.mjs";
|
|
5
5
|
|
|
6
6
|
// src/react-ui/music-score-view.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -12,6 +12,8 @@ var MusicScoreView = class extends React.Component {
|
|
|
12
12
|
super(props);
|
|
13
13
|
__publicField(this, "ctx");
|
|
14
14
|
this.ctx = new MRenderContext();
|
|
15
|
+
if (props.paint)
|
|
16
|
+
this.ctx.setPaint(props.paint);
|
|
15
17
|
this.ctx.setDocument(props.doc);
|
|
16
18
|
if (props.onScoreEvent) {
|
|
17
19
|
this.ctx.setScoreEventListener(props.onScoreEvent);
|
|
@@ -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-CJuq5aBy.js';
|
|
2
|
+
import { K as KeySignature } from './tempo-pCAa6qgo.js';
|
|
3
3
|
|
|
4
4
|
/** Interval direction type. */
|
|
5
5
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
package/dist/score/index.d.ts
CHANGED
|
@@ -1,58 +1,10 @@
|
|
|
1
|
-
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-
|
|
2
|
-
export {
|
|
3
|
-
import { N as Note } from '../note-
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-
|
|
1
|
+
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-D-xO1oti.js';
|
|
2
|
+
export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-D-xO1oti.js';
|
|
3
|
+
import { N as Note } from '../note-CJuq5aBy.js';
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-DxGqFxlv.js';
|
|
5
|
+
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-pCAa6qgo.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Color attributes.
|
|
10
|
-
* ```
|
|
11
|
-
* Attribute hierarchy is:
|
|
12
|
-
* + background
|
|
13
|
-
* + header
|
|
14
|
-
* + title
|
|
15
|
-
* + composer
|
|
16
|
-
* + arranger
|
|
17
|
-
* + rowgroup
|
|
18
|
-
* + instrument
|
|
19
|
-
* + frame
|
|
20
|
-
* + staff|tab
|
|
21
|
-
* + frame
|
|
22
|
-
* + note
|
|
23
|
-
* + rest
|
|
24
|
-
* + connective
|
|
25
|
-
* + signature
|
|
26
|
-
* + clef (staff only)
|
|
27
|
-
* + key (staff only)
|
|
28
|
-
* + time
|
|
29
|
-
* + tempo
|
|
30
|
-
* + measurenum
|
|
31
|
-
* + tuning (tab only)
|
|
32
|
-
* + element
|
|
33
|
-
* + fermata
|
|
34
|
-
* + annotation
|
|
35
|
-
* + navigation
|
|
36
|
-
* + label
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
type ColorAttr = "background" | "header" | "title" | "composer" | "arranger" | "rowgroup" | "instrument" | "frame" | "staff" | "tab" | "frame" | "note" | "rest" | "connective" | "signature" | "clef" | "key" | "time" | "tempo" | "measurenum" | "tuning" | "element" | "fermata" | "annotation" | "navigation" | "label";
|
|
40
|
-
/**
|
|
41
|
-
* Set color of any score document element. Use combination of color attributes to set color of specific elements.
|
|
42
|
-
* ```ts
|
|
43
|
-
* setColor("red", "staff"); // Set color of all staff elements to red.
|
|
44
|
-
* setColor("red", "staff", "signature"); // Set color of all signature elements of staff to red.
|
|
45
|
-
* setColor("red", "staff", "key", "signature"); // Set color of key signature of staff to red.
|
|
46
|
-
* setColor("green", "staff", "time", "signature"); // Set color of time signature of staff to green.
|
|
47
|
-
* // etc.
|
|
48
|
-
* ```
|
|
49
|
-
* See {@link ColorAttr} for attribute hierarchy tree.
|
|
50
|
-
*
|
|
51
|
-
* @param color - Color (HTML color code e.g. "green", "#AA6644", etc.)
|
|
52
|
-
* @param colorAttrs - Any number of color attributes.
|
|
53
|
-
*/
|
|
54
|
-
declare function setColor(color: string, ...colorAttrs: ColorAttr[]): void;
|
|
55
|
-
|
|
56
8
|
/** Tuplet builder type. */
|
|
57
9
|
type TupletBuilder = {
|
|
58
10
|
/**
|
|
@@ -448,11 +400,11 @@ declare class DocumentBuilder {
|
|
|
448
400
|
*/
|
|
449
401
|
endRow(): DocumentBuilder;
|
|
450
402
|
/**
|
|
451
|
-
*
|
|
403
|
+
* Fill current measure with rests.
|
|
452
404
|
* @param voiceId - Voice id to add rests to. Single value, array or all if omitted.
|
|
453
405
|
* @returns - This document builder instance.
|
|
454
406
|
*/
|
|
455
|
-
|
|
407
|
+
fillWithRests(...voiceId: VoiceId[]): DocumentBuilder;
|
|
456
408
|
/**
|
|
457
409
|
* Add notes of given scale in ascending order.
|
|
458
410
|
* @param scale - Scale.
|
|
@@ -461,6 +413,13 @@ declare class DocumentBuilder {
|
|
|
461
413
|
* @returns - This document builder instance.
|
|
462
414
|
*/
|
|
463
415
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
416
|
+
/**
|
|
417
|
+
* Add and repeat builder section.
|
|
418
|
+
* @param times - Repeat count.
|
|
419
|
+
* @param repeatCreator - Repeat creator function.
|
|
420
|
+
* @returns - This document builder instance.
|
|
421
|
+
*/
|
|
422
|
+
repeat(times: number, repeatCreator: (builder: DocumentBuilder) => void): DocumentBuilder;
|
|
464
423
|
}
|
|
465
424
|
|
|
466
|
-
export { Annotation, AnnotationText,
|
|
425
|
+
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, LyricsOptions, MDocument, MeasureOptions, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerseNumber, VerticalPosition, VoiceId };
|