@ugfoundation/swaralipi-js 0.8.1 → 0.9.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/dist/{batch-NDL6CW7Q.js → batch-PYBXQ4OM.js} +5 -5
- package/dist/{batch-NDL6CW7Q.js.map → batch-PYBXQ4OM.js.map} +1 -1
- package/dist/{chunk-LPCKL3AM.js → chunk-3ZQPM2CE.js} +28 -19
- package/dist/chunk-3ZQPM2CE.js.map +1 -0
- package/dist/{chunk-4IVUPMRK.js → chunk-7SMRG4IS.js} +14 -9
- package/dist/chunk-7SMRG4IS.js.map +1 -0
- package/dist/{chunk-4HNT6OAT.js → chunk-MYVIQU4O.js} +12 -3
- package/dist/chunk-MYVIQU4O.js.map +1 -0
- package/dist/{chunk-Z42M5JAA.js → chunk-RT4SVJMK.js} +5 -4
- package/dist/chunk-RT4SVJMK.js.map +1 -0
- package/dist/cli.cjs +33 -19
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/convert/index.cjs +31 -17
- package/dist/convert/index.cjs.map +1 -1
- package/dist/convert/index.d.cts +1 -1
- package/dist/convert/index.d.ts +1 -1
- package/dist/convert/index.js +3 -3
- package/dist/index.cjs +38 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{lay-Csa4CD46.d.cts → lay-CZIzR9cM.d.ts} +16 -2
- package/dist/{lay-Ct9ky_EE.d.ts → lay-CfDlPhH2.d.cts} +16 -2
- package/dist/player/index.cjs +80 -48
- package/dist/player/index.cjs.map +1 -1
- package/dist/player/index.d.cts +11 -9
- package/dist/player/index.d.ts +11 -9
- package/dist/player/index.js +68 -46
- package/dist/player/index.js.map +1 -1
- package/dist/{schedule-B_UaluBi.d.cts → schedule-9uvjnCG_.d.ts} +15 -10
- package/dist/{schedule-CdILTNsk.d.ts → schedule-TxSfHL-T.d.cts} +15 -10
- package/dist/{schema-DGA_bNVZ.d.ts → schema-Cf_epUIC.d.cts} +333 -63
- package/dist/{schema-DGA_bNVZ.d.cts → schema-Cf_epUIC.d.ts} +333 -63
- package/dist/spec/index.cjs +38 -17
- package/dist/spec/index.cjs.map +1 -1
- package/dist/spec/index.d.cts +26 -8
- package/dist/spec/index.d.ts +26 -8
- package/dist/spec/index.js +2 -2
- package/dist/viewer/index.cjs +306 -178
- package/dist/viewer/index.cjs.map +1 -1
- package/dist/viewer/index.d.cts +36 -12
- package/dist/viewer/index.d.ts +36 -12
- package/dist/viewer/index.js +234 -135
- package/dist/viewer/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4HNT6OAT.js.map +0 -1
- package/dist/chunk-4IVUPMRK.js.map +0 -1
- package/dist/chunk-LPCKL3AM.js.map +0 -1
- package/dist/chunk-Z42M5JAA.js.map +0 -1
package/dist/viewer/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-
|
|
2
|
-
import { L as Lay } from '../lay-
|
|
3
|
-
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-
|
|
1
|
+
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-Cf_epUIC.cjs';
|
|
2
|
+
import { L as Lay } from '../lay-CfDlPhH2.cjs';
|
|
3
|
+
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-TxSfHL-T.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'tone';
|
|
6
6
|
|
|
@@ -31,6 +31,9 @@ declare const LABELS: Record<GridLang, {
|
|
|
31
31
|
* term; en names the tempo first (a reader of the English sheet may not know
|
|
32
32
|
* the word — the same call `LABELS.en` makes with "Cycles" over "Avartan"). */
|
|
33
33
|
declare const LAY_LABELS: Record<GridLang, Record<Lay, string>>;
|
|
34
|
+
/** Printed where a row switches to free rhythm (`row.taal: null`) with no
|
|
35
|
+
* `taalName` of its own. bn is the converter's canonical মুক্তছন্দ. */
|
|
36
|
+
declare const FREE_TAAL_LABELS: Record<GridLang, string>;
|
|
34
37
|
/** A composed notation cluster: the font's ASCII text plus any residual CSS
|
|
35
38
|
* classes the font itself cannot express (only the bn ati-octave dot). */
|
|
36
39
|
interface Cluster {
|
|
@@ -116,6 +119,9 @@ interface Arc {
|
|
|
116
119
|
/** 0-based index of the arc's first / last **cell** within the row. */
|
|
117
120
|
start: number;
|
|
118
121
|
end: number;
|
|
122
|
+
/** Index, within that cell's notes, of the note the arc hangs from / into. */
|
|
123
|
+
startNote: number;
|
|
124
|
+
endNote: number;
|
|
119
125
|
/** True when the matching end lies on a previous / following system. */
|
|
120
126
|
openLeft: boolean;
|
|
121
127
|
openRight: boolean;
|
|
@@ -123,11 +129,14 @@ interface Arc {
|
|
|
123
129
|
line?: boolean;
|
|
124
130
|
}
|
|
125
131
|
/**
|
|
126
|
-
* Resolve under-arcs for one row
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* -
|
|
132
|
+
* Resolve under-arcs for one row down to the **note** each end hangs from, so a
|
|
133
|
+
* slur inside one half-matra cell (মজ্ঞা) still runs centre to centre. Sources,
|
|
134
|
+
* scanned left→right:
|
|
135
|
+
* - spec `meend: 'start' | 'end'` — exact notes;
|
|
136
|
+
* - below-annotation raws, which belong to the whole cell (NLTR types them
|
|
137
|
+
* centred under the column): `w` opens on the cell's first sounded note,
|
|
138
|
+
* `x` closes on its last, `$` (Swarabitan's short in-cell arc) runs first to
|
|
139
|
+
* last, and `xw` — close, then re-open — meets in the middle instead.
|
|
131
140
|
* Unmatched `x` → arc from cell 0 with a squared-off (open) left end;
|
|
132
141
|
* unclosed `w` → arc to the last cell with an open right end — both match
|
|
133
142
|
* the print's behavior when an arc continues across a system wrap.
|
|
@@ -208,7 +217,7 @@ declare const ZOOM_STEP = 1.2;
|
|
|
208
217
|
* --sw-matra minimum width of one matra column
|
|
209
218
|
* --sw-header-min floor for the নাম/তাল/আবর্তন header (it must stay legible
|
|
210
219
|
* when the notation is scaled down to fit a phone)
|
|
211
|
-
* --sw-lay-min same floor for the
|
|
220
|
+
* --sw-lay-min same floor for the তাল / লয় change band
|
|
212
221
|
* --sw-hl player-highlight background (P2.3)
|
|
213
222
|
* --sw-rule header rule / muted line color
|
|
214
223
|
*
|
|
@@ -236,7 +245,7 @@ declare const SWARALIPI_CSS: string;
|
|
|
236
245
|
* - rows are un-clipped (no scrollbar on paper) and kept whole across page
|
|
237
246
|
* breaks; part headings stay with their first row.
|
|
238
247
|
*/
|
|
239
|
-
declare const SWARALIPI_PRINT_CSS = "\n@page { margin: 16mm; }\n@media print {\n .sw-sheet, .sw-staff { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; }\n .sw-scroll { overflow: visible !important; }\n .sw-row { break-inside: avoid; page-break-inside: avoid; }\n .sw-part-name, .sw-header, .sw-
|
|
248
|
+
declare const SWARALIPI_PRINT_CSS = "\n@page { margin: 16mm; }\n@media print {\n .sw-sheet, .sw-staff { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; }\n .sw-scroll { overflow: visible !important; }\n .sw-row { break-inside: avoid; page-break-inside: avoid; }\n .sw-part-name, .sw-header, .sw-change { break-after: avoid-page; page-break-after: avoid; }\n .sw-hl { background: none !important; }\n /* Keep each engraved staff system whole across a page break (the abcjs line\n is a <div> wrapping the <svg>, so the break rule must sit on the div). */\n .sw-staff-lines > div { break-inside: avoid; page-break-inside: avoid; }\n .sw-staff-meta { break-after: avoid-page; page-break-after: avoid; }\n}\n";
|
|
240
249
|
/** Staff-notation (abcjs) wrapper chrome: instrument/tempo header + a fluid
|
|
241
250
|
* SVG. The engraving itself is drawn by abcjs; this only frames it. */
|
|
242
251
|
declare const SWARALIPI_STAFF_CSS = "\n.sw-staff { color: currentColor; }\n.sw-staff-meta { display: flex; gap: 1.25em; align-items: baseline; margin: 0 0 .5em; font-size: .95em; opacity: .85; }\n.sw-staff-instrument { font-weight: 600; }\n.sw-staff-drums { opacity: .75; }\n.sw-staff-tempo { font-variant-numeric: tabular-nums; }\n/* abcjs (oneSvgPerLine) wraps the music into one <div><svg> per system; stack\n them as short, swaralipi-style lines. abcjs sets a fixed pixel height +\n overflow:hidden on each wrapper div \u2014 neutralise it so the viewBox'd SVG can\n scale to the container (and to the print page) instead of being clipped. */\n.sw-staff-lines > div { margin: 0 0 .35em; height: auto !important; overflow: visible !important; }\n/* Fill up to the engraved (staffwidth) size \u2014 shrink to fit a narrow container,\n but never stretch past natural width (abcToSvg pins per-SVG max-width in px),\n else a short last system balloons. */\n.sw-staff-lines svg { display: block; width: 100%; height: auto; }\n.sw-staff-missing { padding: 1em; border: 1px dashed currentColor; border-radius: 6px; opacity: .8; font-size: .9em; }\n.sw-staff-title { font-size: 1.15em; font-weight: 700; }\n.sw-staff-subtitle { opacity: .8; font-size: .95em; margin-top: .15em; }\n";
|
|
@@ -305,6 +314,15 @@ declare function midiToAbc(midi: number): string;
|
|
|
305
314
|
* nearest 1/4-matra count of `/4` units so odd durations still sum correctly.
|
|
306
315
|
*/
|
|
307
316
|
declare function abcDuration(beats: number): string;
|
|
317
|
+
/** One তাল stretch of the score: its meter, and drum voices when drums are on. */
|
|
318
|
+
interface AbcMeter {
|
|
319
|
+
/** Start, in schedule beats. */
|
|
320
|
+
beat: number;
|
|
321
|
+
/** Matra per bar (one তাল cycle) from here on. */
|
|
322
|
+
beatsPerBar: number;
|
|
323
|
+
/** Per-matra drum voices from here on; `undefined` rests (মুক্তছন্দ). */
|
|
324
|
+
drums?: DrumVoice[];
|
|
325
|
+
}
|
|
308
326
|
/**
|
|
309
327
|
* Build a complete ABC tune string from a schedule. Pure and dependency-free
|
|
310
328
|
* (the testable seam). Rests advance time as `z`; melody notes carry duration;
|
|
@@ -320,15 +338,21 @@ declare function abcDuration(beats: number): string;
|
|
|
320
338
|
* pattern one quarter-note per matra with `%%percmap` GM drum sounds (see
|
|
321
339
|
* `buildDrumVoice`). Both voices share the same bar grid, so they wrap and
|
|
322
340
|
* align together.
|
|
341
|
+
*
|
|
342
|
+
* `meters`, if given, is one entry per তাল stretch (তালফেরতা): at each start
|
|
343
|
+
* the running bar is closed and the new meter restated inline as `[M:n/4]` —
|
|
344
|
+
* the bracketed form, because a bare `M:` line forces a new system.
|
|
323
345
|
*/
|
|
324
346
|
declare function buildAbc(schedule: Schedule, lyricOf: (ev: PlayEvent) => string | undefined, opts: {
|
|
325
347
|
bpm: number;
|
|
326
348
|
lyrics: boolean;
|
|
327
349
|
beatsPerBar: number;
|
|
328
350
|
drums?: DrumVoice[];
|
|
351
|
+
meters?: AbcMeter[];
|
|
329
352
|
}): string;
|
|
330
353
|
/** Build the ABC tune string for a whole document (schedule + lyrics + tempo).
|
|
331
|
-
* The measure length is one তাল cycle
|
|
354
|
+
* The measure length is one তাল cycle — per stretch, so a তালফেরতা changes the
|
|
355
|
+
* time signature where the taal changes — falling back to 4.
|
|
332
356
|
* `opts.drums` adds the percussion staff (see `buildAbc`). */
|
|
333
357
|
declare function docToAbc(doc: Swaralipi, opts?: StaffOptions): string;
|
|
334
358
|
/**
|
|
@@ -527,4 +551,4 @@ type Transliterator = (bengaliText: string) => string;
|
|
|
527
551
|
*/
|
|
528
552
|
declare function loadLyricTransliterator(lang: ViewerLang): Promise<Transliterator | undefined>;
|
|
529
553
|
|
|
530
|
-
export { type Arc, type Cell, type Cluster, type ComposeOptions, DEFAULT_NOTATOR, DEFAULT_WATERMARK, DIGITS, type GridLang, LABELS, LAY_LABELS, type Layout, MARKS, MAX_ZOOM, MIN_ZOOM, NOTATION_FONT_URLS, type PrintOptions, type RenderOptions, SWARALIPI_CSS, SWARALIPI_PRINT_CSS, SWARALIPI_STAFF_CSS, type StaffOptions, type SwaralipiSheetElement, type TaalStaffOptions, type Transliterator, type ViewerLang, ZOOM_STEP, abcDuration, abcToSvg, alignRows, buildAbc, buildTaalAbc, cellMatra, composeCluster, defineSwaralipiSheet, docToAbc, fitSwaralipi, groupRowIntoCells, loadLyricTransliterator, localizeDigits, midiToAbc, printSwaralipi, renderMetaHeader, renderPrintDocument, renderStaffHtml, renderStaffPrintDocument, renderTaalStaffHtml, renderToHtml, resolveArcs };
|
|
554
|
+
export { type AbcMeter, type Arc, type Cell, type Cluster, type ComposeOptions, DEFAULT_NOTATOR, DEFAULT_WATERMARK, DIGITS, FREE_TAAL_LABELS, type GridLang, LABELS, LAY_LABELS, type Layout, MARKS, MAX_ZOOM, MIN_ZOOM, NOTATION_FONT_URLS, type PrintOptions, type RenderOptions, SWARALIPI_CSS, SWARALIPI_PRINT_CSS, SWARALIPI_STAFF_CSS, type StaffOptions, type SwaralipiSheetElement, type TaalStaffOptions, type Transliterator, type ViewerLang, ZOOM_STEP, abcDuration, abcToSvg, alignRows, buildAbc, buildTaalAbc, cellMatra, composeCluster, defineSwaralipiSheet, docToAbc, fitSwaralipi, groupRowIntoCells, loadLyricTransliterator, localizeDigits, midiToAbc, printSwaralipi, renderMetaHeader, renderPrintDocument, renderStaffHtml, renderStaffPrintDocument, renderTaalStaffHtml, renderToHtml, resolveArcs };
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-
|
|
2
|
-
import { L as Lay } from '../lay-
|
|
3
|
-
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-
|
|
1
|
+
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-Cf_epUIC.js';
|
|
2
|
+
import { L as Lay } from '../lay-CZIzR9cM.js';
|
|
3
|
+
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-9uvjnCG_.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'tone';
|
|
6
6
|
|
|
@@ -31,6 +31,9 @@ declare const LABELS: Record<GridLang, {
|
|
|
31
31
|
* term; en names the tempo first (a reader of the English sheet may not know
|
|
32
32
|
* the word — the same call `LABELS.en` makes with "Cycles" over "Avartan"). */
|
|
33
33
|
declare const LAY_LABELS: Record<GridLang, Record<Lay, string>>;
|
|
34
|
+
/** Printed where a row switches to free rhythm (`row.taal: null`) with no
|
|
35
|
+
* `taalName` of its own. bn is the converter's canonical মুক্তছন্দ. */
|
|
36
|
+
declare const FREE_TAAL_LABELS: Record<GridLang, string>;
|
|
34
37
|
/** A composed notation cluster: the font's ASCII text plus any residual CSS
|
|
35
38
|
* classes the font itself cannot express (only the bn ati-octave dot). */
|
|
36
39
|
interface Cluster {
|
|
@@ -116,6 +119,9 @@ interface Arc {
|
|
|
116
119
|
/** 0-based index of the arc's first / last **cell** within the row. */
|
|
117
120
|
start: number;
|
|
118
121
|
end: number;
|
|
122
|
+
/** Index, within that cell's notes, of the note the arc hangs from / into. */
|
|
123
|
+
startNote: number;
|
|
124
|
+
endNote: number;
|
|
119
125
|
/** True when the matching end lies on a previous / following system. */
|
|
120
126
|
openLeft: boolean;
|
|
121
127
|
openRight: boolean;
|
|
@@ -123,11 +129,14 @@ interface Arc {
|
|
|
123
129
|
line?: boolean;
|
|
124
130
|
}
|
|
125
131
|
/**
|
|
126
|
-
* Resolve under-arcs for one row
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* -
|
|
132
|
+
* Resolve under-arcs for one row down to the **note** each end hangs from, so a
|
|
133
|
+
* slur inside one half-matra cell (মজ্ঞা) still runs centre to centre. Sources,
|
|
134
|
+
* scanned left→right:
|
|
135
|
+
* - spec `meend: 'start' | 'end'` — exact notes;
|
|
136
|
+
* - below-annotation raws, which belong to the whole cell (NLTR types them
|
|
137
|
+
* centred under the column): `w` opens on the cell's first sounded note,
|
|
138
|
+
* `x` closes on its last, `$` (Swarabitan's short in-cell arc) runs first to
|
|
139
|
+
* last, and `xw` — close, then re-open — meets in the middle instead.
|
|
131
140
|
* Unmatched `x` → arc from cell 0 with a squared-off (open) left end;
|
|
132
141
|
* unclosed `w` → arc to the last cell with an open right end — both match
|
|
133
142
|
* the print's behavior when an arc continues across a system wrap.
|
|
@@ -208,7 +217,7 @@ declare const ZOOM_STEP = 1.2;
|
|
|
208
217
|
* --sw-matra minimum width of one matra column
|
|
209
218
|
* --sw-header-min floor for the নাম/তাল/আবর্তন header (it must stay legible
|
|
210
219
|
* when the notation is scaled down to fit a phone)
|
|
211
|
-
* --sw-lay-min same floor for the
|
|
220
|
+
* --sw-lay-min same floor for the তাল / লয় change band
|
|
212
221
|
* --sw-hl player-highlight background (P2.3)
|
|
213
222
|
* --sw-rule header rule / muted line color
|
|
214
223
|
*
|
|
@@ -236,7 +245,7 @@ declare const SWARALIPI_CSS: string;
|
|
|
236
245
|
* - rows are un-clipped (no scrollbar on paper) and kept whole across page
|
|
237
246
|
* breaks; part headings stay with their first row.
|
|
238
247
|
*/
|
|
239
|
-
declare const SWARALIPI_PRINT_CSS = "\n@page { margin: 16mm; }\n@media print {\n .sw-sheet, .sw-staff { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; }\n .sw-scroll { overflow: visible !important; }\n .sw-row { break-inside: avoid; page-break-inside: avoid; }\n .sw-part-name, .sw-header, .sw-
|
|
248
|
+
declare const SWARALIPI_PRINT_CSS = "\n@page { margin: 16mm; }\n@media print {\n .sw-sheet, .sw-staff { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; }\n .sw-scroll { overflow: visible !important; }\n .sw-row { break-inside: avoid; page-break-inside: avoid; }\n .sw-part-name, .sw-header, .sw-change { break-after: avoid-page; page-break-after: avoid; }\n .sw-hl { background: none !important; }\n /* Keep each engraved staff system whole across a page break (the abcjs line\n is a <div> wrapping the <svg>, so the break rule must sit on the div). */\n .sw-staff-lines > div { break-inside: avoid; page-break-inside: avoid; }\n .sw-staff-meta { break-after: avoid-page; page-break-after: avoid; }\n}\n";
|
|
240
249
|
/** Staff-notation (abcjs) wrapper chrome: instrument/tempo header + a fluid
|
|
241
250
|
* SVG. The engraving itself is drawn by abcjs; this only frames it. */
|
|
242
251
|
declare const SWARALIPI_STAFF_CSS = "\n.sw-staff { color: currentColor; }\n.sw-staff-meta { display: flex; gap: 1.25em; align-items: baseline; margin: 0 0 .5em; font-size: .95em; opacity: .85; }\n.sw-staff-instrument { font-weight: 600; }\n.sw-staff-drums { opacity: .75; }\n.sw-staff-tempo { font-variant-numeric: tabular-nums; }\n/* abcjs (oneSvgPerLine) wraps the music into one <div><svg> per system; stack\n them as short, swaralipi-style lines. abcjs sets a fixed pixel height +\n overflow:hidden on each wrapper div \u2014 neutralise it so the viewBox'd SVG can\n scale to the container (and to the print page) instead of being clipped. */\n.sw-staff-lines > div { margin: 0 0 .35em; height: auto !important; overflow: visible !important; }\n/* Fill up to the engraved (staffwidth) size \u2014 shrink to fit a narrow container,\n but never stretch past natural width (abcToSvg pins per-SVG max-width in px),\n else a short last system balloons. */\n.sw-staff-lines svg { display: block; width: 100%; height: auto; }\n.sw-staff-missing { padding: 1em; border: 1px dashed currentColor; border-radius: 6px; opacity: .8; font-size: .9em; }\n.sw-staff-title { font-size: 1.15em; font-weight: 700; }\n.sw-staff-subtitle { opacity: .8; font-size: .95em; margin-top: .15em; }\n";
|
|
@@ -305,6 +314,15 @@ declare function midiToAbc(midi: number): string;
|
|
|
305
314
|
* nearest 1/4-matra count of `/4` units so odd durations still sum correctly.
|
|
306
315
|
*/
|
|
307
316
|
declare function abcDuration(beats: number): string;
|
|
317
|
+
/** One তাল stretch of the score: its meter, and drum voices when drums are on. */
|
|
318
|
+
interface AbcMeter {
|
|
319
|
+
/** Start, in schedule beats. */
|
|
320
|
+
beat: number;
|
|
321
|
+
/** Matra per bar (one তাল cycle) from here on. */
|
|
322
|
+
beatsPerBar: number;
|
|
323
|
+
/** Per-matra drum voices from here on; `undefined` rests (মুক্তছন্দ). */
|
|
324
|
+
drums?: DrumVoice[];
|
|
325
|
+
}
|
|
308
326
|
/**
|
|
309
327
|
* Build a complete ABC tune string from a schedule. Pure and dependency-free
|
|
310
328
|
* (the testable seam). Rests advance time as `z`; melody notes carry duration;
|
|
@@ -320,15 +338,21 @@ declare function abcDuration(beats: number): string;
|
|
|
320
338
|
* pattern one quarter-note per matra with `%%percmap` GM drum sounds (see
|
|
321
339
|
* `buildDrumVoice`). Both voices share the same bar grid, so they wrap and
|
|
322
340
|
* align together.
|
|
341
|
+
*
|
|
342
|
+
* `meters`, if given, is one entry per তাল stretch (তালফেরতা): at each start
|
|
343
|
+
* the running bar is closed and the new meter restated inline as `[M:n/4]` —
|
|
344
|
+
* the bracketed form, because a bare `M:` line forces a new system.
|
|
323
345
|
*/
|
|
324
346
|
declare function buildAbc(schedule: Schedule, lyricOf: (ev: PlayEvent) => string | undefined, opts: {
|
|
325
347
|
bpm: number;
|
|
326
348
|
lyrics: boolean;
|
|
327
349
|
beatsPerBar: number;
|
|
328
350
|
drums?: DrumVoice[];
|
|
351
|
+
meters?: AbcMeter[];
|
|
329
352
|
}): string;
|
|
330
353
|
/** Build the ABC tune string for a whole document (schedule + lyrics + tempo).
|
|
331
|
-
* The measure length is one তাল cycle
|
|
354
|
+
* The measure length is one তাল cycle — per stretch, so a তালফেরতা changes the
|
|
355
|
+
* time signature where the taal changes — falling back to 4.
|
|
332
356
|
* `opts.drums` adds the percussion staff (see `buildAbc`). */
|
|
333
357
|
declare function docToAbc(doc: Swaralipi, opts?: StaffOptions): string;
|
|
334
358
|
/**
|
|
@@ -527,4 +551,4 @@ type Transliterator = (bengaliText: string) => string;
|
|
|
527
551
|
*/
|
|
528
552
|
declare function loadLyricTransliterator(lang: ViewerLang): Promise<Transliterator | undefined>;
|
|
529
553
|
|
|
530
|
-
export { type Arc, type Cell, type Cluster, type ComposeOptions, DEFAULT_NOTATOR, DEFAULT_WATERMARK, DIGITS, type GridLang, LABELS, LAY_LABELS, type Layout, MARKS, MAX_ZOOM, MIN_ZOOM, NOTATION_FONT_URLS, type PrintOptions, type RenderOptions, SWARALIPI_CSS, SWARALIPI_PRINT_CSS, SWARALIPI_STAFF_CSS, type StaffOptions, type SwaralipiSheetElement, type TaalStaffOptions, type Transliterator, type ViewerLang, ZOOM_STEP, abcDuration, abcToSvg, alignRows, buildAbc, buildTaalAbc, cellMatra, composeCluster, defineSwaralipiSheet, docToAbc, fitSwaralipi, groupRowIntoCells, loadLyricTransliterator, localizeDigits, midiToAbc, printSwaralipi, renderMetaHeader, renderPrintDocument, renderStaffHtml, renderStaffPrintDocument, renderTaalStaffHtml, renderToHtml, resolveArcs };
|
|
554
|
+
export { type AbcMeter, type Arc, type Cell, type Cluster, type ComposeOptions, DEFAULT_NOTATOR, DEFAULT_WATERMARK, DIGITS, FREE_TAAL_LABELS, type GridLang, LABELS, LAY_LABELS, type Layout, MARKS, MAX_ZOOM, MIN_ZOOM, NOTATION_FONT_URLS, type PrintOptions, type RenderOptions, SWARALIPI_CSS, SWARALIPI_PRINT_CSS, SWARALIPI_STAFF_CSS, type StaffOptions, type SwaralipiSheetElement, type TaalStaffOptions, type Transliterator, type ViewerLang, ZOOM_STEP, abcDuration, abcToSvg, alignRows, buildAbc, buildTaalAbc, cellMatra, composeCluster, defineSwaralipiSheet, docToAbc, fitSwaralipi, groupRowIntoCells, loadLyricTransliterator, localizeDigits, midiToAbc, printSwaralipi, renderMetaHeader, renderPrintDocument, renderStaffHtml, renderStaffPrintDocument, renderTaalStaffHtml, renderToHtml, resolveArcs };
|