@dsebastien/music-notation 0.10.0 → 0.11.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.
@@ -1,5 +1,30 @@
1
- import { type StrumScore } from '../strum/play.js';
1
+ import { type PassMaker, type StrumScore } from '../strum/play.js';
2
2
  import { type PlayOptions } from './controls.js';
3
+ import type { NotePlayer } from './player.js';
3
4
  /** The score of a drawn pattern; null when it has no slots. */
4
5
  export declare function scoreFromDrawing(drawing: Element): StrumScore | null;
6
+ /**
7
+ * The app's player in the window `wrap` is in now (a host may move it to a popout), the light
8
+ * synthesizer when that one fails. It says when its notes start like the player it wraps (the
9
+ * light one does too), or once the player it wraps was seen saying it, here or on another bar.
10
+ */
11
+ export declare function barPlayer(wrap: Element, win: Window, options: PlayOptions): NotePlayer;
5
12
  export declare function strumBarFor(doc: Document, win: Window, drawing: Element, options: PlayOptions): () => void;
13
+ /** What a timed bar plays: its passes, and how it's counted. */
14
+ export interface TimedPiece {
15
+ /** The wrapper's own class, beside `mn-playable`. */
16
+ cls: string;
17
+ /** The bar's name for screen readers. */
18
+ label: string;
19
+ /** Counted in dotted beats (6/8): the tempo slider shows ♩. */
20
+ compound: boolean;
21
+ make: PassMaker;
22
+ /** Shows a click (metronome) button, on or off at the start; none when absent. */
23
+ click?: boolean;
24
+ }
25
+ /**
26
+ * The bar of a piece played in time over a drawing whose slots are `[data-mn-beat]` elements:
27
+ * play / stop, loop, count-in, click when asked, tempo, volume, sound. Each pass's slots light
28
+ * as they sound.
29
+ */
30
+ export declare function timedBarFor(doc: Document, win: Window, drawing: Element, options: PlayOptions, piece: TimedPiece): () => void;