@ugfoundation/swaralipi-js 0.7.7 → 0.8.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.
Files changed (50) hide show
  1. package/dist/{batch-6MCPHHKF.js → batch-NJMT3M5Z.js} +5 -5
  2. package/dist/{batch-6MCPHHKF.js.map → batch-NJMT3M5Z.js.map} +1 -1
  3. package/dist/{chunk-ALN4SWMS.js → chunk-4HMHTXDE.js} +15 -4
  4. package/dist/chunk-4HMHTXDE.js.map +1 -0
  5. package/dist/{chunk-QM4CXKW2.js → chunk-4HNT6OAT.js} +24 -3
  6. package/dist/chunk-4HNT6OAT.js.map +1 -0
  7. package/dist/{chunk-TKTQCUKD.js → chunk-4IVUPMRK.js} +27 -9
  8. package/dist/chunk-4IVUPMRK.js.map +1 -0
  9. package/dist/{chunk-QQC6WVLJ.js → chunk-YFVAVICF.js} +4 -4
  10. package/dist/{chunk-QQC6WVLJ.js.map → chunk-YFVAVICF.js.map} +1 -1
  11. package/dist/cli.cjs +13 -2
  12. package/dist/cli.cjs.map +1 -1
  13. package/dist/cli.js +3 -3
  14. package/dist/convert/index.cjs +12 -1
  15. package/dist/convert/index.cjs.map +1 -1
  16. package/dist/convert/index.d.cts +1 -1
  17. package/dist/convert/index.d.ts +1 -1
  18. package/dist/convert/index.js +3 -3
  19. package/dist/index.cjs +39 -1
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +2 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +2 -2
  24. package/dist/{taals-CjzBuZ35.d.ts → lay-Csa4CD46.d.cts} +38 -1
  25. package/dist/{taals-CjzBuZ35.d.cts → lay-Ct9ky_EE.d.ts} +38 -1
  26. package/dist/player/index.cjs +276 -117
  27. package/dist/player/index.cjs.map +1 -1
  28. package/dist/player/index.d.cts +22 -9
  29. package/dist/player/index.d.ts +22 -9
  30. package/dist/player/index.js +230 -114
  31. package/dist/player/index.js.map +1 -1
  32. package/dist/{schedule-BpBYGXPL.d.cts → schedule-B_UaluBi.d.cts} +27 -3
  33. package/dist/{schedule-Tzk01FKj.d.ts → schedule-CdILTNsk.d.ts} +27 -3
  34. package/dist/{schema-DqBXPGkL.d.cts → schema-DGA_bNVZ.d.cts} +97 -1
  35. package/dist/{schema-DqBXPGkL.d.ts → schema-DGA_bNVZ.d.ts} +97 -1
  36. package/dist/spec/index.cjs +39 -1
  37. package/dist/spec/index.cjs.map +1 -1
  38. package/dist/spec/index.d.cts +16 -4
  39. package/dist/spec/index.d.ts +16 -4
  40. package/dist/spec/index.js +2 -2
  41. package/dist/viewer/index.cjs +114 -12
  42. package/dist/viewer/index.cjs.map +1 -1
  43. package/dist/viewer/index.d.cts +10 -5
  44. package/dist/viewer/index.d.ts +10 -5
  45. package/dist/viewer/index.js +43 -7
  46. package/dist/viewer/index.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-ALN4SWMS.js.map +0 -1
  49. package/dist/chunk-QM4CXKW2.js.map +0 -1
  50. package/dist/chunk-TKTQCUKD.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as tone from 'tone';
2
- import { T as Taal, S as Swaralipi, N as Note } from './schema-DqBXPGkL.cjs';
3
- import { T as TaalId } from './taals-CjzBuZ35.cjs';
2
+ import { T as Taal, S as Swaralipi, N as Note } from './schema-DGA_bNVZ.cjs';
3
+ import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-Csa4CD46.cjs';
4
4
 
5
5
  /** The dynamically-imported Tone module, typed without importing it. */
6
6
  type ToneModule = typeof tone;
@@ -175,6 +175,20 @@ interface PlayEvent {
175
175
  */
176
176
  glide?: true;
177
177
  }
178
+ /**
179
+ * One লয় stretch of the timeline. `scale` is the fraction of the base bpm the
180
+ * passage sounds at, and it is exactly the factor a looping accompaniment must
181
+ * change its own tempo by — `beat` × secondsPerBeat gives its start in seconds.
182
+ * Always at least one segment, the first at beat 0.
183
+ */
184
+ interface TempoSegment {
185
+ /** Start, in schedule beats (see PlayEvent.beat). */
186
+ beat: number;
187
+ /** End, in schedule beats (= the next segment's start, or totalBeats). */
188
+ endBeat: number;
189
+ scale: number;
190
+ lay: Lay;
191
+ }
178
192
  interface Schedule {
179
193
  events: PlayEvent[];
180
194
  /** Total length in matra (the cursor's final value). */
@@ -189,12 +203,22 @@ interface Schedule {
189
203
  * no sam tick. The player/exporter apply it only when a rhythm actually loops.
190
204
  */
191
205
  pickupBeats: number;
206
+ /** লয় stretches, in order and gapless. One entry (drut, scale 1) for a
207
+ * document that never changes tempo — i.e. every document written before
208
+ * `row.lay` existed. */
209
+ tempo: TempoSegment[];
192
210
  }
193
211
  interface ScheduleOptions {
194
212
  /** Tonic; accepts `C`, `C#`, `cs`… (see parseTonic). Default C. */
195
213
  tonic?: string;
196
214
  /** Octave of madhyam Sa (C4 = MIDI 60). Default 4. */
197
215
  baseOctave?: number;
216
+ /** Override the লয় tempo factors (see LAY_SPEEDS / meta.laySpeeds). */
217
+ laySpeeds?: LaySpeeds;
218
+ /** Apply লয় at all. Default true. The staff view sets it false: it reads
219
+ * `durationBeats` as written note values, where a 0.75 stretch is not a
220
+ * writable duration. */
221
+ lay?: boolean;
198
222
  }
199
223
  /**
200
224
  * Below-annotation raws that are মীড় arc drawing segments (codec known-raw):
@@ -250,4 +274,4 @@ declare function glideTargets(events: PlayEvent[], i: number): PlayEvent[];
250
274
  */
251
275
  declare function buildSchedule(doc: Swaralipi, opts?: ScheduleOptions): Schedule;
252
276
 
253
- export { ARC_RAW_RE as A, triggerGlide as B, type DrumVoice as D, type GlideLeg as G, type InstrumentId as I, MEEND_HOLD as M, type PlayEvent as P, type Schedule as S, TABLA_BPMS as T, type InstrumentDef as a, DEFAULT_SOUNDS_BASE as b, DRUM_KIT_BASE as c, INSTRUMENTS as d, SALAMANDER_BASE as e, SAMPLED_TAALS as f, type ScheduleOptions as g, TABLA_VARIATIONS as h, TONEJS_INSTRUMENTS_BASE as i, type ToneModule as j, buildSchedule as k, createBuffers as l, drumPattern as m, glideTargets as n, instrumentSampleUrl as o, isArcRaw as p, meendContinuations as q, nearestSampleKey as r, nearestTablaBpm as s, normalizeBase as t, probeUrl as u, quantizeLoopEnd as v, santoorUrls as w, subsetUrls as x, tablaBpms as y, tablaUrl as z };
277
+ export { ARC_RAW_RE as A, tablaUrl as B, triggerGlide as C, type DrumVoice as D, type GlideLeg as G, type InstrumentId as I, MEEND_HOLD as M, type PlayEvent as P, type Schedule as S, TABLA_BPMS as T, type InstrumentDef as a, DEFAULT_SOUNDS_BASE as b, DRUM_KIT_BASE as c, INSTRUMENTS as d, SALAMANDER_BASE as e, SAMPLED_TAALS as f, type ScheduleOptions as g, TABLA_VARIATIONS as h, TONEJS_INSTRUMENTS_BASE as i, type TempoSegment as j, type ToneModule as k, buildSchedule as l, createBuffers as m, drumPattern as n, glideTargets as o, instrumentSampleUrl as p, isArcRaw as q, meendContinuations as r, nearestSampleKey as s, nearestTablaBpm as t, normalizeBase as u, probeUrl as v, quantizeLoopEnd as w, santoorUrls as x, subsetUrls as y, tablaBpms as z };
@@ -1,6 +1,6 @@
1
1
  import * as tone from 'tone';
2
- import { T as Taal, S as Swaralipi, N as Note } from './schema-DqBXPGkL.js';
3
- import { T as TaalId } from './taals-CjzBuZ35.js';
2
+ import { T as Taal, S as Swaralipi, N as Note } from './schema-DGA_bNVZ.js';
3
+ import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-Ct9ky_EE.js';
4
4
 
5
5
  /** The dynamically-imported Tone module, typed without importing it. */
6
6
  type ToneModule = typeof tone;
@@ -175,6 +175,20 @@ interface PlayEvent {
175
175
  */
176
176
  glide?: true;
177
177
  }
178
+ /**
179
+ * One লয় stretch of the timeline. `scale` is the fraction of the base bpm the
180
+ * passage sounds at, and it is exactly the factor a looping accompaniment must
181
+ * change its own tempo by — `beat` × secondsPerBeat gives its start in seconds.
182
+ * Always at least one segment, the first at beat 0.
183
+ */
184
+ interface TempoSegment {
185
+ /** Start, in schedule beats (see PlayEvent.beat). */
186
+ beat: number;
187
+ /** End, in schedule beats (= the next segment's start, or totalBeats). */
188
+ endBeat: number;
189
+ scale: number;
190
+ lay: Lay;
191
+ }
178
192
  interface Schedule {
179
193
  events: PlayEvent[];
180
194
  /** Total length in matra (the cursor's final value). */
@@ -189,12 +203,22 @@ interface Schedule {
189
203
  * no sam tick. The player/exporter apply it only when a rhythm actually loops.
190
204
  */
191
205
  pickupBeats: number;
206
+ /** লয় stretches, in order and gapless. One entry (drut, scale 1) for a
207
+ * document that never changes tempo — i.e. every document written before
208
+ * `row.lay` existed. */
209
+ tempo: TempoSegment[];
192
210
  }
193
211
  interface ScheduleOptions {
194
212
  /** Tonic; accepts `C`, `C#`, `cs`… (see parseTonic). Default C. */
195
213
  tonic?: string;
196
214
  /** Octave of madhyam Sa (C4 = MIDI 60). Default 4. */
197
215
  baseOctave?: number;
216
+ /** Override the লয় tempo factors (see LAY_SPEEDS / meta.laySpeeds). */
217
+ laySpeeds?: LaySpeeds;
218
+ /** Apply লয় at all. Default true. The staff view sets it false: it reads
219
+ * `durationBeats` as written note values, where a 0.75 stretch is not a
220
+ * writable duration. */
221
+ lay?: boolean;
198
222
  }
199
223
  /**
200
224
  * Below-annotation raws that are মীড় arc drawing segments (codec known-raw):
@@ -250,4 +274,4 @@ declare function glideTargets(events: PlayEvent[], i: number): PlayEvent[];
250
274
  */
251
275
  declare function buildSchedule(doc: Swaralipi, opts?: ScheduleOptions): Schedule;
252
276
 
253
- export { ARC_RAW_RE as A, triggerGlide as B, type DrumVoice as D, type GlideLeg as G, type InstrumentId as I, MEEND_HOLD as M, type PlayEvent as P, type Schedule as S, TABLA_BPMS as T, type InstrumentDef as a, DEFAULT_SOUNDS_BASE as b, DRUM_KIT_BASE as c, INSTRUMENTS as d, SALAMANDER_BASE as e, SAMPLED_TAALS as f, type ScheduleOptions as g, TABLA_VARIATIONS as h, TONEJS_INSTRUMENTS_BASE as i, type ToneModule as j, buildSchedule as k, createBuffers as l, drumPattern as m, glideTargets as n, instrumentSampleUrl as o, isArcRaw as p, meendContinuations as q, nearestSampleKey as r, nearestTablaBpm as s, normalizeBase as t, probeUrl as u, quantizeLoopEnd as v, santoorUrls as w, subsetUrls as x, tablaBpms as y, tablaUrl as z };
277
+ export { ARC_RAW_RE as A, tablaUrl as B, triggerGlide as C, type DrumVoice as D, type GlideLeg as G, type InstrumentId as I, MEEND_HOLD as M, type PlayEvent as P, type Schedule as S, TABLA_BPMS as T, type InstrumentDef as a, DEFAULT_SOUNDS_BASE as b, DRUM_KIT_BASE as c, INSTRUMENTS as d, SALAMANDER_BASE as e, SAMPLED_TAALS as f, type ScheduleOptions as g, TABLA_VARIATIONS as h, TONEJS_INSTRUMENTS_BASE as i, type TempoSegment as j, type ToneModule as k, buildSchedule as l, createBuffers as m, drumPattern as n, glideTargets as o, instrumentSampleUrl as p, isArcRaw as q, meendContinuations as r, nearestSampleKey as s, nearestTablaBpm as t, normalizeBase as u, probeUrl as v, quantizeLoopEnd as w, santoorUrls as x, subsetUrls as y, tablaBpms as z };
@@ -122,17 +122,29 @@ interface Note {
122
122
  below?: Note[];
123
123
  }
124
124
  declare const noteSchema: z.ZodType<Note>;
125
+ /** লয় tier. `Lay` (and the tempo factors) live in the zod-free ./lay.js,
126
+ * which the viewer/player import directly; `satisfies` keeps the two in step. */
127
+ declare const laySchema: z.ZodEnum<["drut", "madhya", "vilambit"]>;
125
128
  /** A written line of the song: a sequence of note tokens. */
126
129
  declare const rowSchema: z.ZodObject<{
127
130
  /** Optional line label (e.g. a tuk/section marker). */
128
131
  label: z.ZodOptional<z.ZodString>;
132
+ /**
133
+ * লয়: the tempo tier this row switches to, held until another row changes
134
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
135
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
136
+ * ("বিলম্বিত লয়:") in already-converted documents.
137
+ */
138
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
129
139
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
130
140
  }, "strip", z.ZodTypeAny, {
131
141
  notes: Note[];
132
142
  label?: string | undefined;
143
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
133
144
  }, {
134
145
  notes: Note[];
135
146
  label?: string | undefined;
147
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
136
148
  }>;
137
149
  type Row = z.infer<typeof rowSchema>;
138
150
  /** A structural section: আস্থায়ী / অন্তরা / সঞ্চারী / আভোগ, or free text. */
@@ -141,24 +153,35 @@ declare const partSchema: z.ZodObject<{
141
153
  rows: z.ZodArray<z.ZodObject<{
142
154
  /** Optional line label (e.g. a tuk/section marker). */
143
155
  label: z.ZodOptional<z.ZodString>;
156
+ /**
157
+ * লয়: the tempo tier this row switches to, held until another row changes
158
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
159
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
160
+ * ("বিলম্বিত লয়:") in already-converted documents.
161
+ */
162
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
144
163
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
145
164
  }, "strip", z.ZodTypeAny, {
146
165
  notes: Note[];
147
166
  label?: string | undefined;
167
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
148
168
  }, {
149
169
  notes: Note[];
150
170
  label?: string | undefined;
171
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
151
172
  }>, "many">;
152
173
  }, "strip", z.ZodTypeAny, {
153
174
  rows: {
154
175
  notes: Note[];
155
176
  label?: string | undefined;
177
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
156
178
  }[];
157
179
  name?: string | undefined;
158
180
  }, {
159
181
  rows: {
160
182
  notes: Note[];
161
183
  label?: string | undefined;
184
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
162
185
  }[];
163
186
  name?: string | undefined;
164
187
  }>;
@@ -279,6 +302,21 @@ declare const metaSchema: z.ZodObject<{
279
302
  * The player adopts it on `load()` (precedence: constructor `bpm` → `setBpm`
280
303
  * tweak → this → 90). `null` is the converter's blank placeholder = unset. */
281
304
  bpm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
305
+ /** Per-document override of the লয় tempo factors (fractions of `bpm`).
306
+ * Defaults live in `LAY_SPEEDS`; a player/export option overrides both. */
307
+ laySpeeds: z.ZodOptional<z.ZodObject<{
308
+ drut: z.ZodOptional<z.ZodNumber>;
309
+ madhya: z.ZodOptional<z.ZodNumber>;
310
+ vilambit: z.ZodOptional<z.ZodNumber>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ drut?: number | undefined;
313
+ madhya?: number | undefined;
314
+ vilambit?: number | undefined;
315
+ }, {
316
+ drut?: number | undefined;
317
+ madhya?: number | undefined;
318
+ vilambit?: number | undefined;
319
+ }>>;
282
320
  raag: z.ZodOptional<z.ZodString>;
283
321
  /** আবর্তন: number of taal cycles, when the source states it. */
284
322
  avartan: z.ZodOptional<z.ZodNumber>;
@@ -301,6 +339,11 @@ declare const metaSchema: z.ZodObject<{
301
339
  taalName?: string | undefined;
302
340
  tonic?: string | undefined;
303
341
  bpm?: number | null | undefined;
342
+ laySpeeds?: {
343
+ drut?: number | undefined;
344
+ madhya?: number | undefined;
345
+ vilambit?: number | undefined;
346
+ } | undefined;
304
347
  raag?: string | undefined;
305
348
  avartan?: number | undefined;
306
349
  notationBy?: string | undefined;
@@ -320,6 +363,11 @@ declare const metaSchema: z.ZodObject<{
320
363
  taalName?: string | undefined;
321
364
  tonic?: string | undefined;
322
365
  bpm?: number | null | undefined;
366
+ laySpeeds?: {
367
+ drut?: number | undefined;
368
+ madhya?: number | undefined;
369
+ vilambit?: number | undefined;
370
+ } | undefined;
323
371
  raag?: string | undefined;
324
372
  avartan?: number | undefined;
325
373
  notationBy?: string | undefined;
@@ -394,6 +442,21 @@ declare const swaralipiSchema: z.ZodObject<{
394
442
  * The player adopts it on `load()` (precedence: constructor `bpm` → `setBpm`
395
443
  * tweak → this → 90). `null` is the converter's blank placeholder = unset. */
396
444
  bpm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
445
+ /** Per-document override of the লয় tempo factors (fractions of `bpm`).
446
+ * Defaults live in `LAY_SPEEDS`; a player/export option overrides both. */
447
+ laySpeeds: z.ZodOptional<z.ZodObject<{
448
+ drut: z.ZodOptional<z.ZodNumber>;
449
+ madhya: z.ZodOptional<z.ZodNumber>;
450
+ vilambit: z.ZodOptional<z.ZodNumber>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ drut?: number | undefined;
453
+ madhya?: number | undefined;
454
+ vilambit?: number | undefined;
455
+ }, {
456
+ drut?: number | undefined;
457
+ madhya?: number | undefined;
458
+ vilambit?: number | undefined;
459
+ }>>;
397
460
  raag: z.ZodOptional<z.ZodString>;
398
461
  /** আবর্তন: number of taal cycles, when the source states it. */
399
462
  avartan: z.ZodOptional<z.ZodNumber>;
@@ -416,6 +479,11 @@ declare const swaralipiSchema: z.ZodObject<{
416
479
  taalName?: string | undefined;
417
480
  tonic?: string | undefined;
418
481
  bpm?: number | null | undefined;
482
+ laySpeeds?: {
483
+ drut?: number | undefined;
484
+ madhya?: number | undefined;
485
+ vilambit?: number | undefined;
486
+ } | undefined;
419
487
  raag?: string | undefined;
420
488
  avartan?: number | undefined;
421
489
  notationBy?: string | undefined;
@@ -435,6 +503,11 @@ declare const swaralipiSchema: z.ZodObject<{
435
503
  taalName?: string | undefined;
436
504
  tonic?: string | undefined;
437
505
  bpm?: number | null | undefined;
506
+ laySpeeds?: {
507
+ drut?: number | undefined;
508
+ madhya?: number | undefined;
509
+ vilambit?: number | undefined;
510
+ } | undefined;
438
511
  raag?: string | undefined;
439
512
  avartan?: number | undefined;
440
513
  notationBy?: string | undefined;
@@ -445,24 +518,35 @@ declare const swaralipiSchema: z.ZodObject<{
445
518
  rows: z.ZodArray<z.ZodObject<{
446
519
  /** Optional line label (e.g. a tuk/section marker). */
447
520
  label: z.ZodOptional<z.ZodString>;
521
+ /**
522
+ * লয়: the tempo tier this row switches to, held until another row changes
523
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
524
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
525
+ * ("বিলম্বিত লয়:") in already-converted documents.
526
+ */
527
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
448
528
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
449
529
  }, "strip", z.ZodTypeAny, {
450
530
  notes: Note[];
451
531
  label?: string | undefined;
532
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
452
533
  }, {
453
534
  notes: Note[];
454
535
  label?: string | undefined;
536
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
455
537
  }>, "many">;
456
538
  }, "strip", z.ZodTypeAny, {
457
539
  rows: {
458
540
  notes: Note[];
459
541
  label?: string | undefined;
542
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
460
543
  }[];
461
544
  name?: string | undefined;
462
545
  }, {
463
546
  rows: {
464
547
  notes: Note[];
465
548
  label?: string | undefined;
549
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
466
550
  }[];
467
551
  name?: string | undefined;
468
552
  }>, "many">;
@@ -483,6 +567,11 @@ declare const swaralipiSchema: z.ZodObject<{
483
567
  taalName?: string | undefined;
484
568
  tonic?: string | undefined;
485
569
  bpm?: number | null | undefined;
570
+ laySpeeds?: {
571
+ drut?: number | undefined;
572
+ madhya?: number | undefined;
573
+ vilambit?: number | undefined;
574
+ } | undefined;
486
575
  raag?: string | undefined;
487
576
  avartan?: number | undefined;
488
577
  notationBy?: string | undefined;
@@ -492,6 +581,7 @@ declare const swaralipiSchema: z.ZodObject<{
492
581
  rows: {
493
582
  notes: Note[];
494
583
  label?: string | undefined;
584
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
495
585
  }[];
496
586
  name?: string | undefined;
497
587
  }[];
@@ -512,6 +602,11 @@ declare const swaralipiSchema: z.ZodObject<{
512
602
  taalName?: string | undefined;
513
603
  tonic?: string | undefined;
514
604
  bpm?: number | null | undefined;
605
+ laySpeeds?: {
606
+ drut?: number | undefined;
607
+ madhya?: number | undefined;
608
+ vilambit?: number | undefined;
609
+ } | undefined;
515
610
  raag?: string | undefined;
516
611
  avartan?: number | undefined;
517
612
  notationBy?: string | undefined;
@@ -521,10 +616,11 @@ declare const swaralipiSchema: z.ZodObject<{
521
616
  rows: {
522
617
  notes: Note[];
523
618
  label?: string | undefined;
619
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
524
620
  }[];
525
621
  name?: string | undefined;
526
622
  }[];
527
623
  }>;
528
624
  type Swaralipi = z.infer<typeof swaralipiSchema>;
529
625
 
530
- export { type Bar as B, type Grace as G, type Meta as M, type Note as N, type Octave as O, type Part as P, type Row as R, type Swaralipi as S, type Taal as T, type SvaraLetter as a, type Bracket as b, type Microtone as c, type Svara as d, barSchema as e, bracketSchema as f, graceSchema as g, microtoneSchema as h, svaraSchema as i, swaralipiSchema as j, metaSchema as m, noteSchema as n, octaveSchema as o, partSchema as p, rowSchema as r, svaraLetterSchema as s, taalSchema as t };
626
+ export { type Bar as B, type Grace as G, type Meta as M, type Note as N, type Octave as O, type Part as P, type Row as R, type Swaralipi as S, type Taal as T, type SvaraLetter as a, type Bracket as b, type Microtone as c, type Svara as d, barSchema as e, bracketSchema as f, graceSchema as g, microtoneSchema as h, svaraSchema as i, swaralipiSchema as j, laySchema as l, metaSchema as m, noteSchema as n, octaveSchema as o, partSchema as p, rowSchema as r, svaraLetterSchema as s, taalSchema as t };
@@ -122,17 +122,29 @@ interface Note {
122
122
  below?: Note[];
123
123
  }
124
124
  declare const noteSchema: z.ZodType<Note>;
125
+ /** লয় tier. `Lay` (and the tempo factors) live in the zod-free ./lay.js,
126
+ * which the viewer/player import directly; `satisfies` keeps the two in step. */
127
+ declare const laySchema: z.ZodEnum<["drut", "madhya", "vilambit"]>;
125
128
  /** A written line of the song: a sequence of note tokens. */
126
129
  declare const rowSchema: z.ZodObject<{
127
130
  /** Optional line label (e.g. a tuk/section marker). */
128
131
  label: z.ZodOptional<z.ZodString>;
132
+ /**
133
+ * লয়: the tempo tier this row switches to, held until another row changes
134
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
135
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
136
+ * ("বিলম্বিত লয়:") in already-converted documents.
137
+ */
138
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
129
139
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
130
140
  }, "strip", z.ZodTypeAny, {
131
141
  notes: Note[];
132
142
  label?: string | undefined;
143
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
133
144
  }, {
134
145
  notes: Note[];
135
146
  label?: string | undefined;
147
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
136
148
  }>;
137
149
  type Row = z.infer<typeof rowSchema>;
138
150
  /** A structural section: আস্থায়ী / অন্তরা / সঞ্চারী / আভোগ, or free text. */
@@ -141,24 +153,35 @@ declare const partSchema: z.ZodObject<{
141
153
  rows: z.ZodArray<z.ZodObject<{
142
154
  /** Optional line label (e.g. a tuk/section marker). */
143
155
  label: z.ZodOptional<z.ZodString>;
156
+ /**
157
+ * লয়: the tempo tier this row switches to, held until another row changes
158
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
159
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
160
+ * ("বিলম্বিত লয়:") in already-converted documents.
161
+ */
162
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
144
163
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
145
164
  }, "strip", z.ZodTypeAny, {
146
165
  notes: Note[];
147
166
  label?: string | undefined;
167
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
148
168
  }, {
149
169
  notes: Note[];
150
170
  label?: string | undefined;
171
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
151
172
  }>, "many">;
152
173
  }, "strip", z.ZodTypeAny, {
153
174
  rows: {
154
175
  notes: Note[];
155
176
  label?: string | undefined;
177
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
156
178
  }[];
157
179
  name?: string | undefined;
158
180
  }, {
159
181
  rows: {
160
182
  notes: Note[];
161
183
  label?: string | undefined;
184
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
162
185
  }[];
163
186
  name?: string | undefined;
164
187
  }>;
@@ -279,6 +302,21 @@ declare const metaSchema: z.ZodObject<{
279
302
  * The player adopts it on `load()` (precedence: constructor `bpm` → `setBpm`
280
303
  * tweak → this → 90). `null` is the converter's blank placeholder = unset. */
281
304
  bpm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
305
+ /** Per-document override of the লয় tempo factors (fractions of `bpm`).
306
+ * Defaults live in `LAY_SPEEDS`; a player/export option overrides both. */
307
+ laySpeeds: z.ZodOptional<z.ZodObject<{
308
+ drut: z.ZodOptional<z.ZodNumber>;
309
+ madhya: z.ZodOptional<z.ZodNumber>;
310
+ vilambit: z.ZodOptional<z.ZodNumber>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ drut?: number | undefined;
313
+ madhya?: number | undefined;
314
+ vilambit?: number | undefined;
315
+ }, {
316
+ drut?: number | undefined;
317
+ madhya?: number | undefined;
318
+ vilambit?: number | undefined;
319
+ }>>;
282
320
  raag: z.ZodOptional<z.ZodString>;
283
321
  /** আবর্তন: number of taal cycles, when the source states it. */
284
322
  avartan: z.ZodOptional<z.ZodNumber>;
@@ -301,6 +339,11 @@ declare const metaSchema: z.ZodObject<{
301
339
  taalName?: string | undefined;
302
340
  tonic?: string | undefined;
303
341
  bpm?: number | null | undefined;
342
+ laySpeeds?: {
343
+ drut?: number | undefined;
344
+ madhya?: number | undefined;
345
+ vilambit?: number | undefined;
346
+ } | undefined;
304
347
  raag?: string | undefined;
305
348
  avartan?: number | undefined;
306
349
  notationBy?: string | undefined;
@@ -320,6 +363,11 @@ declare const metaSchema: z.ZodObject<{
320
363
  taalName?: string | undefined;
321
364
  tonic?: string | undefined;
322
365
  bpm?: number | null | undefined;
366
+ laySpeeds?: {
367
+ drut?: number | undefined;
368
+ madhya?: number | undefined;
369
+ vilambit?: number | undefined;
370
+ } | undefined;
323
371
  raag?: string | undefined;
324
372
  avartan?: number | undefined;
325
373
  notationBy?: string | undefined;
@@ -394,6 +442,21 @@ declare const swaralipiSchema: z.ZodObject<{
394
442
  * The player adopts it on `load()` (precedence: constructor `bpm` → `setBpm`
395
443
  * tweak → this → 90). `null` is the converter's blank placeholder = unset. */
396
444
  bpm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
445
+ /** Per-document override of the লয় tempo factors (fractions of `bpm`).
446
+ * Defaults live in `LAY_SPEEDS`; a player/export option overrides both. */
447
+ laySpeeds: z.ZodOptional<z.ZodObject<{
448
+ drut: z.ZodOptional<z.ZodNumber>;
449
+ madhya: z.ZodOptional<z.ZodNumber>;
450
+ vilambit: z.ZodOptional<z.ZodNumber>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ drut?: number | undefined;
453
+ madhya?: number | undefined;
454
+ vilambit?: number | undefined;
455
+ }, {
456
+ drut?: number | undefined;
457
+ madhya?: number | undefined;
458
+ vilambit?: number | undefined;
459
+ }>>;
397
460
  raag: z.ZodOptional<z.ZodString>;
398
461
  /** আবর্তন: number of taal cycles, when the source states it. */
399
462
  avartan: z.ZodOptional<z.ZodNumber>;
@@ -416,6 +479,11 @@ declare const swaralipiSchema: z.ZodObject<{
416
479
  taalName?: string | undefined;
417
480
  tonic?: string | undefined;
418
481
  bpm?: number | null | undefined;
482
+ laySpeeds?: {
483
+ drut?: number | undefined;
484
+ madhya?: number | undefined;
485
+ vilambit?: number | undefined;
486
+ } | undefined;
419
487
  raag?: string | undefined;
420
488
  avartan?: number | undefined;
421
489
  notationBy?: string | undefined;
@@ -435,6 +503,11 @@ declare const swaralipiSchema: z.ZodObject<{
435
503
  taalName?: string | undefined;
436
504
  tonic?: string | undefined;
437
505
  bpm?: number | null | undefined;
506
+ laySpeeds?: {
507
+ drut?: number | undefined;
508
+ madhya?: number | undefined;
509
+ vilambit?: number | undefined;
510
+ } | undefined;
438
511
  raag?: string | undefined;
439
512
  avartan?: number | undefined;
440
513
  notationBy?: string | undefined;
@@ -445,24 +518,35 @@ declare const swaralipiSchema: z.ZodObject<{
445
518
  rows: z.ZodArray<z.ZodObject<{
446
519
  /** Optional line label (e.g. a tuk/section marker). */
447
520
  label: z.ZodOptional<z.ZodString>;
521
+ /**
522
+ * লয়: the tempo tier this row switches to, held until another row changes
523
+ * it (absent on every row = the whole song at `meta.bpm`, i.e. দ্রুত).
524
+ * Read it with `rowLay()`, which also picks up the mark NLTR *prints*
525
+ * ("বিলম্বিত লয়:") in already-converted documents.
526
+ */
527
+ lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
448
528
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
449
529
  }, "strip", z.ZodTypeAny, {
450
530
  notes: Note[];
451
531
  label?: string | undefined;
532
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
452
533
  }, {
453
534
  notes: Note[];
454
535
  label?: string | undefined;
536
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
455
537
  }>, "many">;
456
538
  }, "strip", z.ZodTypeAny, {
457
539
  rows: {
458
540
  notes: Note[];
459
541
  label?: string | undefined;
542
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
460
543
  }[];
461
544
  name?: string | undefined;
462
545
  }, {
463
546
  rows: {
464
547
  notes: Note[];
465
548
  label?: string | undefined;
549
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
466
550
  }[];
467
551
  name?: string | undefined;
468
552
  }>, "many">;
@@ -483,6 +567,11 @@ declare const swaralipiSchema: z.ZodObject<{
483
567
  taalName?: string | undefined;
484
568
  tonic?: string | undefined;
485
569
  bpm?: number | null | undefined;
570
+ laySpeeds?: {
571
+ drut?: number | undefined;
572
+ madhya?: number | undefined;
573
+ vilambit?: number | undefined;
574
+ } | undefined;
486
575
  raag?: string | undefined;
487
576
  avartan?: number | undefined;
488
577
  notationBy?: string | undefined;
@@ -492,6 +581,7 @@ declare const swaralipiSchema: z.ZodObject<{
492
581
  rows: {
493
582
  notes: Note[];
494
583
  label?: string | undefined;
584
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
495
585
  }[];
496
586
  name?: string | undefined;
497
587
  }[];
@@ -512,6 +602,11 @@ declare const swaralipiSchema: z.ZodObject<{
512
602
  taalName?: string | undefined;
513
603
  tonic?: string | undefined;
514
604
  bpm?: number | null | undefined;
605
+ laySpeeds?: {
606
+ drut?: number | undefined;
607
+ madhya?: number | undefined;
608
+ vilambit?: number | undefined;
609
+ } | undefined;
515
610
  raag?: string | undefined;
516
611
  avartan?: number | undefined;
517
612
  notationBy?: string | undefined;
@@ -521,10 +616,11 @@ declare const swaralipiSchema: z.ZodObject<{
521
616
  rows: {
522
617
  notes: Note[];
523
618
  label?: string | undefined;
619
+ lay?: "drut" | "madhya" | "vilambit" | undefined;
524
620
  }[];
525
621
  name?: string | undefined;
526
622
  }[];
527
623
  }>;
528
624
  type Swaralipi = z.infer<typeof swaralipiSchema>;
529
625
 
530
- export { type Bar as B, type Grace as G, type Meta as M, type Note as N, type Octave as O, type Part as P, type Row as R, type Swaralipi as S, type Taal as T, type SvaraLetter as a, type Bracket as b, type Microtone as c, type Svara as d, barSchema as e, bracketSchema as f, graceSchema as g, microtoneSchema as h, svaraSchema as i, swaralipiSchema as j, metaSchema as m, noteSchema as n, octaveSchema as o, partSchema as p, rowSchema as r, svaraLetterSchema as s, taalSchema as t };
626
+ export { type Bar as B, type Grace as G, type Meta as M, type Note as N, type Octave as O, type Part as P, type Row as R, type Swaralipi as S, type Taal as T, type SvaraLetter as a, type Bracket as b, type Microtone as c, type Svara as d, barSchema as e, bracketSchema as f, graceSchema as g, microtoneSchema as h, svaraSchema as i, swaralipiSchema as j, laySchema as l, metaSchema as m, noteSchema as n, octaveSchema as o, partSchema as p, rowSchema as r, svaraLetterSchema as s, taalSchema as t };