vextab 7.1.0 → 7.1.1
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/README.md +1 -1
- package/dist/runtime/auto.mjs +1 -1
- package/dist/runtime/browser.mjs +1 -1
- package/dist/runtime/resolve.mjs +1 -1
- package/dist/runtime/shared/J2THHOG5.mjs +1 -0
- package/dist/runtime/shared/LFV5PYP4.mjs +352 -0
- package/dist/runtime/types/browser.d.ts +1 -0
- package/dist/runtime/types/playback/animation.d.ts +2 -7
- package/dist/runtime/types/playback/ink.d.ts +18 -0
- package/dist/runtime/types/playback/written-overlay.d.ts +14 -0
- package/dist/runtime/types/score/layout-map.d.ts +2 -0
- package/dist/runtime/types/score/layout.d.ts +5 -0
- package/dist/runtime/vextab.js +10 -10
- package/package.json +1 -1
- package/dist/runtime/shared/OKFI2OP5.mjs +0 -1
- package/dist/runtime/shared/OWAKZY4J.mjs +0 -352
|
@@ -7,6 +7,7 @@ export { Vex, Artist, VexTab, Div, Player, };
|
|
|
7
7
|
export { parseScore, ScoreError, ScoreV2Error, type ScoreCapacity, type ScoreV2, type ParsedScore, type SourceRange } from './score/parse';
|
|
8
8
|
export { resolvePart, type PartSelector } from './score/resolve';
|
|
9
9
|
export { renderScore, renderConductor, renderEdition, renderScorePart, type Part } from './score/layout';
|
|
10
|
+
export type { PlaybackOverlay } from './playback/written-overlay';
|
|
10
11
|
export type { ScoreLocation, ScoreBounds, ScoreLayoutPosition, ScoreLayoutMap } from './score/layout-map';
|
|
11
12
|
export * from './playback/performer';
|
|
12
13
|
export { createWebAudioPlayback } from './playback/web-audio';
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { Geometry } from './geometry';
|
|
2
2
|
import type { Performance } from './transport';
|
|
3
|
-
export
|
|
3
|
+
export { anticipation } from './ink';
|
|
4
4
|
/** Pool the visible dots, and interpolate between the actual engraved attacks on each system. */
|
|
5
5
|
export declare class PlaybackAnimation {
|
|
6
6
|
private surface;
|
|
7
7
|
private music;
|
|
8
8
|
private follow?;
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly bar;
|
|
11
|
-
private readonly gradient;
|
|
12
|
-
private readonly dots;
|
|
9
|
+
private readonly ink;
|
|
13
10
|
private readonly anchors;
|
|
14
11
|
private readonly pulses;
|
|
15
12
|
private readonly active;
|
|
@@ -30,8 +27,6 @@ export declare class PlaybackAnimation {
|
|
|
30
27
|
private drawBar;
|
|
31
28
|
/** Compact the active set in place. Frame work scales with audible polyphony. */
|
|
32
29
|
private drawHeads;
|
|
33
|
-
/** Reuse each ellipse and leave sustained notes alone between frames. */
|
|
34
|
-
private drawDot;
|
|
35
30
|
/** Stop schedules no further frames and restores the untouched printed page. */
|
|
36
31
|
stop(): void;
|
|
37
32
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Point } from './geometry';
|
|
2
|
+
export declare const anticipation = 0.075;
|
|
3
|
+
/** Create one SVG engraving overlay element in the correct namespace. */
|
|
4
|
+
export declare function svg<K extends keyof SVGElementTagNameMap>(name: K, attrs?: Record<string, string | number>): SVGElementTagNameMap[K];
|
|
5
|
+
/** Pulse strength in seconds, rising just before the attack and fading toward release. */
|
|
6
|
+
export declare function glowOpacity(time: number, start: number, end: number): number;
|
|
7
|
+
/** Own the visible SVG elements for one overlay. Callers place them in screen or page coordinates. */
|
|
8
|
+
export declare class PlaybackInk {
|
|
9
|
+
readonly layer: SVGGElement;
|
|
10
|
+
readonly bar: SVGLineElement;
|
|
11
|
+
private readonly gradient;
|
|
12
|
+
private readonly dots;
|
|
13
|
+
constructor();
|
|
14
|
+
/** Reuse each ellipse and leave sustained notes alone between frames. */
|
|
15
|
+
drawDot(index: number, point: Point, opacity: number, group: SVGGElement): void;
|
|
16
|
+
/** Hide pooled ellipses that the current position no longer uses. */
|
|
17
|
+
hideUnused(used: number): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ScoreLayoutMap, type ScoreLocation } from '../score/layout-map';
|
|
2
|
+
import type { ParsedScore } from '../score/model';
|
|
3
|
+
import type { Geometry } from './geometry';
|
|
4
|
+
/** A host clock supplies each position explicitly, including repeats, seeks and manual scrubbing. */
|
|
5
|
+
export interface PlaybackOverlay {
|
|
6
|
+
/** An invalid address clears the ink. The optional tempo is in quarter notes per minute. */
|
|
7
|
+
setPosition(location: ScoreLocation, tempo?: number): void;
|
|
8
|
+
/** Hide the current position, for example during a count-in. */
|
|
9
|
+
clear(): void;
|
|
10
|
+
/** Release the layer. Subsequent calls have no effect. */
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
/** Render one position synchronously. No instrument, timer, or animation frame is needed. */
|
|
14
|
+
export declare function writtenPlaybackOverlay(container: HTMLElement, surface: SVGSVGElement | HTMLCanvasElement, map: ScoreLayoutMap, scores: readonly ParsedScore[], geometry: Geometry): PlaybackOverlay;
|
|
@@ -52,6 +52,8 @@ interface Instrument {
|
|
|
52
52
|
}
|
|
53
53
|
/** Names used by the screen renderer for each projection of an instrument. */
|
|
54
54
|
type StaffName = 'notation' | 'tab' | PianoHand;
|
|
55
|
+
/** Only accept a complete, nonnegative whole-note fraction with a positive denominator. */
|
|
56
|
+
export declare function wholeNotes(offset: ScoreLocation['offset']): number;
|
|
55
57
|
/** Capture the unscaled Canvas size once, since CSS can change the displayed size after rendering. */
|
|
56
58
|
export declare function screenClientPoint(surface: SVGSVGElement | HTMLCanvasElement): ScoreLayoutMap['clientPoint'];
|
|
57
59
|
/** Index one screen layout, including the conductor's common rhythmic columns. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PrintAnchor } from '../playback/geometry';
|
|
2
|
+
import { type PlaybackOverlay } from '../playback/written-overlay';
|
|
2
3
|
import { type ScoreLayoutMap } from './layout-map';
|
|
3
4
|
import { type EditionOptions } from './editions';
|
|
4
5
|
import type { ScoreV2 } from './grammar2/model';
|
|
@@ -87,6 +88,8 @@ export declare function renderScore(host: HTMLElement, source: ParsedScore | Sco
|
|
|
87
88
|
rangeFor: (id: string, revision: string) => SourceRange;
|
|
88
89
|
headRangeFor: (event: string, head: number, revision: string) => SourceRange;
|
|
89
90
|
readonly layoutMap: ScoreLayoutMap;
|
|
91
|
+
/** Mount the guide's playback bar and sounding-head glows for an external clock. */
|
|
92
|
+
createPlaybackOverlay(): PlaybackOverlay;
|
|
90
93
|
sourceFor: (id: string) => string | undefined;
|
|
91
94
|
};
|
|
92
95
|
/** Build one native conductor composition and retain each source instrument for independent extraction. */
|
|
@@ -107,6 +110,8 @@ export declare function renderConductor(host: HTMLElement, document: ScoreV2, op
|
|
|
107
110
|
rangeFor: (id: string, revision: string) => SourceRange;
|
|
108
111
|
headRangeFor: (event: string, head: number, revision: string) => SourceRange;
|
|
109
112
|
readonly layoutMap: ScoreLayoutMap;
|
|
113
|
+
/** Mount the guide's playback bar and sounding-head glows for an external clock. */
|
|
114
|
+
createPlaybackOverlay(): PlaybackOverlay;
|
|
110
115
|
sourceFor: (id: string) => string | undefined;
|
|
111
116
|
};
|
|
112
117
|
/** Rebuild an independent part with the same descriptors and native decorations as the screen. */
|