@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.
Files changed (51) hide show
  1. package/dist/{batch-NDL6CW7Q.js → batch-PYBXQ4OM.js} +5 -5
  2. package/dist/{batch-NDL6CW7Q.js.map → batch-PYBXQ4OM.js.map} +1 -1
  3. package/dist/{chunk-LPCKL3AM.js → chunk-3ZQPM2CE.js} +28 -19
  4. package/dist/chunk-3ZQPM2CE.js.map +1 -0
  5. package/dist/{chunk-4IVUPMRK.js → chunk-7SMRG4IS.js} +14 -9
  6. package/dist/chunk-7SMRG4IS.js.map +1 -0
  7. package/dist/{chunk-4HNT6OAT.js → chunk-MYVIQU4O.js} +12 -3
  8. package/dist/chunk-MYVIQU4O.js.map +1 -0
  9. package/dist/{chunk-Z42M5JAA.js → chunk-RT4SVJMK.js} +5 -4
  10. package/dist/chunk-RT4SVJMK.js.map +1 -0
  11. package/dist/cli.cjs +33 -19
  12. package/dist/cli.cjs.map +1 -1
  13. package/dist/cli.js +3 -3
  14. package/dist/convert/index.cjs +31 -17
  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 +38 -17
  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/{lay-Csa4CD46.d.cts → lay-CZIzR9cM.d.ts} +16 -2
  25. package/dist/{lay-Ct9ky_EE.d.ts → lay-CfDlPhH2.d.cts} +16 -2
  26. package/dist/player/index.cjs +80 -48
  27. package/dist/player/index.cjs.map +1 -1
  28. package/dist/player/index.d.cts +11 -9
  29. package/dist/player/index.d.ts +11 -9
  30. package/dist/player/index.js +68 -46
  31. package/dist/player/index.js.map +1 -1
  32. package/dist/{schedule-B_UaluBi.d.cts → schedule-9uvjnCG_.d.ts} +15 -10
  33. package/dist/{schedule-CdILTNsk.d.ts → schedule-TxSfHL-T.d.cts} +15 -10
  34. package/dist/{schema-DGA_bNVZ.d.ts → schema-Cf_epUIC.d.cts} +333 -63
  35. package/dist/{schema-DGA_bNVZ.d.cts → schema-Cf_epUIC.d.ts} +333 -63
  36. package/dist/spec/index.cjs +38 -17
  37. package/dist/spec/index.cjs.map +1 -1
  38. package/dist/spec/index.d.cts +26 -8
  39. package/dist/spec/index.d.ts +26 -8
  40. package/dist/spec/index.js +2 -2
  41. package/dist/viewer/index.cjs +306 -178
  42. package/dist/viewer/index.cjs.map +1 -1
  43. package/dist/viewer/index.d.cts +36 -12
  44. package/dist/viewer/index.d.ts +36 -12
  45. package/dist/viewer/index.js +234 -135
  46. package/dist/viewer/index.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-4HNT6OAT.js.map +0 -1
  49. package/dist/chunk-4IVUPMRK.js.map +0 -1
  50. package/dist/chunk-LPCKL3AM.js.map +0 -1
  51. package/dist/chunk-Z42M5JAA.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-DGA_bNVZ.cjs';
3
- import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-Csa4CD46.cjs';
2
+ import { T as Taal, S as Swaralipi, N as Note } from './schema-Cf_epUIC.js';
3
+ import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-CZIzR9cM.js';
4
4
 
5
5
  /** The dynamically-imported Tone module, typed without importing it. */
6
6
  type ToneModule = typeof tone;
@@ -176,10 +176,12 @@ interface PlayEvent {
176
176
  glide?: true;
177
177
  }
178
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.
179
+ * One accompaniment stretch of the timeline: a লয় and a তাল held constant.
180
+ * A new segment starts wherever either changes — they are independent marks.
181
+ * `scale` is the fraction of the base bpm the passage sounds at, and it is
182
+ * exactly the factor a looping accompaniment must change its own tempo by —
183
+ * `beat` × secondsPerBeat gives its start in seconds. Always at least one
184
+ * segment, the first at beat 0.
183
185
  */
184
186
  interface TempoSegment {
185
187
  /** Start, in schedule beats (see PlayEvent.beat). */
@@ -188,6 +190,9 @@ interface TempoSegment {
188
190
  endBeat: number;
189
191
  scale: number;
190
192
  lay: Lay;
193
+ /** তাল in force: `meta.taal` until a row's `taal` changes it. `null` = an
194
+ * explicit মুক্তছন্দ passage; `undefined` = the document names no taal. */
195
+ taal?: Taal | null;
191
196
  }
192
197
  interface Schedule {
193
198
  events: PlayEvent[];
@@ -203,9 +208,9 @@ interface Schedule {
203
208
  * no sam tick. The player/exporter apply it only when a rhythm actually loops.
204
209
  */
205
210
  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. */
211
+ /** লয় / তাল stretches, in order and gapless. One entry (drut, scale 1,
212
+ * `meta.taal`) for a document that never changes either — i.e. every
213
+ * document written before `row.lay` / `row.taal` existed. */
209
214
  tempo: TempoSegment[];
210
215
  }
211
216
  interface ScheduleOptions {
@@ -274,4 +279,4 @@ declare function glideTargets(events: PlayEvent[], i: number): PlayEvent[];
274
279
  */
275
280
  declare function buildSchedule(doc: Swaralipi, opts?: ScheduleOptions): Schedule;
276
281
 
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 };
282
+ 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, type TempoSegment 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_BPMS as h, TABLA_VARIATIONS as i, TONEJS_INSTRUMENTS_BASE 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-DGA_bNVZ.js';
3
- import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-Ct9ky_EE.js';
2
+ import { T as Taal, S as Swaralipi, N as Note } from './schema-Cf_epUIC.cjs';
3
+ import { T as TaalId, L as Lay, a as LaySpeeds } from './lay-CfDlPhH2.cjs';
4
4
 
5
5
  /** The dynamically-imported Tone module, typed without importing it. */
6
6
  type ToneModule = typeof tone;
@@ -176,10 +176,12 @@ interface PlayEvent {
176
176
  glide?: true;
177
177
  }
178
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.
179
+ * One accompaniment stretch of the timeline: a লয় and a তাল held constant.
180
+ * A new segment starts wherever either changes — they are independent marks.
181
+ * `scale` is the fraction of the base bpm the passage sounds at, and it is
182
+ * exactly the factor a looping accompaniment must change its own tempo by —
183
+ * `beat` × secondsPerBeat gives its start in seconds. Always at least one
184
+ * segment, the first at beat 0.
183
185
  */
184
186
  interface TempoSegment {
185
187
  /** Start, in schedule beats (see PlayEvent.beat). */
@@ -188,6 +190,9 @@ interface TempoSegment {
188
190
  endBeat: number;
189
191
  scale: number;
190
192
  lay: Lay;
193
+ /** তাল in force: `meta.taal` until a row's `taal` changes it. `null` = an
194
+ * explicit মুক্তছন্দ passage; `undefined` = the document names no taal. */
195
+ taal?: Taal | null;
191
196
  }
192
197
  interface Schedule {
193
198
  events: PlayEvent[];
@@ -203,9 +208,9 @@ interface Schedule {
203
208
  * no sam tick. The player/exporter apply it only when a rhythm actually loops.
204
209
  */
205
210
  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. */
211
+ /** লয় / তাল stretches, in order and gapless. One entry (drut, scale 1,
212
+ * `meta.taal`) for a document that never changes either — i.e. every
213
+ * document written before `row.lay` / `row.taal` existed. */
209
214
  tempo: TempoSegment[];
210
215
  }
211
216
  interface ScheduleOptions {
@@ -274,4 +279,4 @@ declare function glideTargets(events: PlayEvent[], i: number): PlayEvent[];
274
279
  */
275
280
  declare function buildSchedule(doc: Swaralipi, opts?: ScheduleOptions): Schedule;
276
281
 
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 };
282
+ 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, type TempoSegment 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_BPMS as h, TABLA_VARIATIONS as i, TONEJS_INSTRUMENTS_BASE 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 };
@@ -125,6 +125,57 @@ declare const noteSchema: z.ZodType<Note>;
125
125
  /** লয় tier. `Lay` (and the tempo factors) live in the zod-free ./lay.js,
126
126
  * which the viewer/player import directly; `satisfies` keeps the two in step. */
127
127
  declare const laySchema: z.ZodEnum<["drut", "madhya", "vilambit"]>;
128
+ /**
129
+ * Taal definition. `numBeats` is the cycle length in মাত্রা; `bhaags` (if
130
+ * present) must sum to `numBeats`; `sam`/`khaali` are 0-based beat indices.
131
+ */
132
+ declare const taalSchema: z.ZodEffects<z.ZodObject<{
133
+ /** Player sample key, e.g. `dadra`, `teentaal`. */
134
+ id: z.ZodString;
135
+ /**
136
+ * Which tabla loop variation to play, e.g. `pro` (CDN dir suffix). Optional
137
+ * and additive — omitted means the taal's default variation, so existing
138
+ * docs are unaffected. The player honors it but never exposes a variation
139
+ * picker; selecting a non-default variation is the consumer's premium policy.
140
+ */
141
+ variation: z.ZodOptional<z.ZodString>;
142
+ numBeats: z.ZodNumber;
143
+ /** Vibhag groupings; if given, they sum to numBeats. */
144
+ bhaags: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
145
+ /** Sam (cycle start) beat index, 0-based. */
146
+ sam: z.ZodOptional<z.ZodNumber>;
147
+ /** Khaali (wave) beat indices, 0-based. */
148
+ khaali: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ id: string;
151
+ numBeats: number;
152
+ variation?: string | undefined;
153
+ bhaags?: number[] | undefined;
154
+ sam?: number | undefined;
155
+ khaali?: number[] | undefined;
156
+ }, {
157
+ id: string;
158
+ numBeats: number;
159
+ variation?: string | undefined;
160
+ bhaags?: number[] | undefined;
161
+ sam?: number | undefined;
162
+ khaali?: number[] | undefined;
163
+ }>, {
164
+ id: string;
165
+ numBeats: number;
166
+ variation?: string | undefined;
167
+ bhaags?: number[] | undefined;
168
+ sam?: number | undefined;
169
+ khaali?: number[] | undefined;
170
+ }, {
171
+ id: string;
172
+ numBeats: number;
173
+ variation?: string | undefined;
174
+ bhaags?: number[] | undefined;
175
+ sam?: number | undefined;
176
+ khaali?: number[] | undefined;
177
+ }>;
178
+ type Taal = z.infer<typeof taalSchema>;
128
179
  /** A written line of the song: a sequence of note tokens. */
129
180
  declare const rowSchema: z.ZodObject<{
130
181
  /** Optional line label (e.g. a tuk/section marker). */
@@ -136,15 +187,87 @@ declare const rowSchema: z.ZodObject<{
136
187
  * ("বিলম্বিত লয়:") in already-converted documents.
137
188
  */
138
189
  lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
190
+ /**
191
+ * তালফেরতা: the তাল this row switches to, held until another row changes it
192
+ * (absent on every row = the whole song in `meta.taal`). `null` = মুক্তছন্দ
193
+ * from here on: the accompaniment rests until a later row names a taal.
194
+ * Independent of `lay` — either, both or neither may change on one row.
195
+ */
196
+ taal: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
197
+ /** Player sample key, e.g. `dadra`, `teentaal`. */
198
+ id: z.ZodString;
199
+ /**
200
+ * Which tabla loop variation to play, e.g. `pro` (CDN dir suffix). Optional
201
+ * and additive — omitted means the taal's default variation, so existing
202
+ * docs are unaffected. The player honors it but never exposes a variation
203
+ * picker; selecting a non-default variation is the consumer's premium policy.
204
+ */
205
+ variation: z.ZodOptional<z.ZodString>;
206
+ numBeats: z.ZodNumber;
207
+ /** Vibhag groupings; if given, they sum to numBeats. */
208
+ bhaags: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
209
+ /** Sam (cycle start) beat index, 0-based. */
210
+ sam: z.ZodOptional<z.ZodNumber>;
211
+ /** Khaali (wave) beat indices, 0-based. */
212
+ khaali: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ id: string;
215
+ numBeats: number;
216
+ variation?: string | undefined;
217
+ bhaags?: number[] | undefined;
218
+ sam?: number | undefined;
219
+ khaali?: number[] | undefined;
220
+ }, {
221
+ id: string;
222
+ numBeats: number;
223
+ variation?: string | undefined;
224
+ bhaags?: number[] | undefined;
225
+ sam?: number | undefined;
226
+ khaali?: number[] | undefined;
227
+ }>, {
228
+ id: string;
229
+ numBeats: number;
230
+ variation?: string | undefined;
231
+ bhaags?: number[] | undefined;
232
+ sam?: number | undefined;
233
+ khaali?: number[] | undefined;
234
+ }, {
235
+ id: string;
236
+ numBeats: number;
237
+ variation?: string | undefined;
238
+ bhaags?: number[] | undefined;
239
+ sam?: number | undefined;
240
+ khaali?: number[] | undefined;
241
+ }>>>;
242
+ /** That taal's name as printed (e.g. `ষষ্ঠী(২/৪)`) — `meta.taalName`'s twin. */
243
+ taalName: z.ZodOptional<z.ZodString>;
139
244
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
140
245
  }, "strip", z.ZodTypeAny, {
141
246
  notes: Note[];
142
247
  label?: string | undefined;
143
248
  lay?: "drut" | "madhya" | "vilambit" | undefined;
249
+ taal?: {
250
+ id: string;
251
+ numBeats: number;
252
+ variation?: string | undefined;
253
+ bhaags?: number[] | undefined;
254
+ sam?: number | undefined;
255
+ khaali?: number[] | undefined;
256
+ } | null | undefined;
257
+ taalName?: string | undefined;
144
258
  }, {
145
259
  notes: Note[];
146
260
  label?: string | undefined;
147
261
  lay?: "drut" | "madhya" | "vilambit" | undefined;
262
+ taal?: {
263
+ id: string;
264
+ numBeats: number;
265
+ variation?: string | undefined;
266
+ bhaags?: number[] | undefined;
267
+ sam?: number | undefined;
268
+ khaali?: number[] | undefined;
269
+ } | null | undefined;
270
+ taalName?: string | undefined;
148
271
  }>;
149
272
  type Row = z.infer<typeof rowSchema>;
150
273
  /** A structural section: আস্থায়ী / অন্তরা / সঞ্চারী / আভোগ, or free text. */
@@ -160,21 +283,102 @@ declare const partSchema: z.ZodObject<{
160
283
  * ("বিলম্বিত লয়:") in already-converted documents.
161
284
  */
162
285
  lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
286
+ /**
287
+ * তালফেরতা: the তাল this row switches to, held until another row changes it
288
+ * (absent on every row = the whole song in `meta.taal`). `null` = মুক্তছন্দ
289
+ * from here on: the accompaniment rests until a later row names a taal.
290
+ * Independent of `lay` — either, both or neither may change on one row.
291
+ */
292
+ taal: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
293
+ /** Player sample key, e.g. `dadra`, `teentaal`. */
294
+ id: z.ZodString;
295
+ /**
296
+ * Which tabla loop variation to play, e.g. `pro` (CDN dir suffix). Optional
297
+ * and additive — omitted means the taal's default variation, so existing
298
+ * docs are unaffected. The player honors it but never exposes a variation
299
+ * picker; selecting a non-default variation is the consumer's premium policy.
300
+ */
301
+ variation: z.ZodOptional<z.ZodString>;
302
+ numBeats: z.ZodNumber;
303
+ /** Vibhag groupings; if given, they sum to numBeats. */
304
+ bhaags: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
305
+ /** Sam (cycle start) beat index, 0-based. */
306
+ sam: z.ZodOptional<z.ZodNumber>;
307
+ /** Khaali (wave) beat indices, 0-based. */
308
+ khaali: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ id: string;
311
+ numBeats: number;
312
+ variation?: string | undefined;
313
+ bhaags?: number[] | undefined;
314
+ sam?: number | undefined;
315
+ khaali?: number[] | undefined;
316
+ }, {
317
+ id: string;
318
+ numBeats: number;
319
+ variation?: string | undefined;
320
+ bhaags?: number[] | undefined;
321
+ sam?: number | undefined;
322
+ khaali?: number[] | undefined;
323
+ }>, {
324
+ id: string;
325
+ numBeats: number;
326
+ variation?: string | undefined;
327
+ bhaags?: number[] | undefined;
328
+ sam?: number | undefined;
329
+ khaali?: number[] | undefined;
330
+ }, {
331
+ id: string;
332
+ numBeats: number;
333
+ variation?: string | undefined;
334
+ bhaags?: number[] | undefined;
335
+ sam?: number | undefined;
336
+ khaali?: number[] | undefined;
337
+ }>>>;
338
+ /** That taal's name as printed (e.g. `ষষ্ঠী(২/৪)`) — `meta.taalName`'s twin. */
339
+ taalName: z.ZodOptional<z.ZodString>;
163
340
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
164
341
  }, "strip", z.ZodTypeAny, {
165
342
  notes: Note[];
166
343
  label?: string | undefined;
167
344
  lay?: "drut" | "madhya" | "vilambit" | undefined;
345
+ taal?: {
346
+ id: string;
347
+ numBeats: number;
348
+ variation?: string | undefined;
349
+ bhaags?: number[] | undefined;
350
+ sam?: number | undefined;
351
+ khaali?: number[] | undefined;
352
+ } | null | undefined;
353
+ taalName?: string | undefined;
168
354
  }, {
169
355
  notes: Note[];
170
356
  label?: string | undefined;
171
357
  lay?: "drut" | "madhya" | "vilambit" | undefined;
358
+ taal?: {
359
+ id: string;
360
+ numBeats: number;
361
+ variation?: string | undefined;
362
+ bhaags?: number[] | undefined;
363
+ sam?: number | undefined;
364
+ khaali?: number[] | undefined;
365
+ } | null | undefined;
366
+ taalName?: string | undefined;
172
367
  }>, "many">;
173
368
  }, "strip", z.ZodTypeAny, {
174
369
  rows: {
175
370
  notes: Note[];
176
371
  label?: string | undefined;
177
372
  lay?: "drut" | "madhya" | "vilambit" | undefined;
373
+ taal?: {
374
+ id: string;
375
+ numBeats: number;
376
+ variation?: string | undefined;
377
+ bhaags?: number[] | undefined;
378
+ sam?: number | undefined;
379
+ khaali?: number[] | undefined;
380
+ } | null | undefined;
381
+ taalName?: string | undefined;
178
382
  }[];
179
383
  name?: string | undefined;
180
384
  }, {
@@ -182,61 +386,19 @@ declare const partSchema: z.ZodObject<{
182
386
  notes: Note[];
183
387
  label?: string | undefined;
184
388
  lay?: "drut" | "madhya" | "vilambit" | undefined;
389
+ taal?: {
390
+ id: string;
391
+ numBeats: number;
392
+ variation?: string | undefined;
393
+ bhaags?: number[] | undefined;
394
+ sam?: number | undefined;
395
+ khaali?: number[] | undefined;
396
+ } | null | undefined;
397
+ taalName?: string | undefined;
185
398
  }[];
186
399
  name?: string | undefined;
187
400
  }>;
188
401
  type Part = z.infer<typeof partSchema>;
189
- /**
190
- * Taal definition. `numBeats` is the cycle length in মাত্রা; `bhaags` (if
191
- * present) must sum to `numBeats`; `sam`/`khaali` are 0-based beat indices.
192
- */
193
- declare const taalSchema: z.ZodEffects<z.ZodObject<{
194
- /** Player sample key, e.g. `dadra`, `teentaal`. */
195
- id: z.ZodString;
196
- /**
197
- * Which tabla loop variation to play, e.g. `pro` (CDN dir suffix). Optional
198
- * and additive — omitted means the taal's default variation, so existing
199
- * docs are unaffected. The player honors it but never exposes a variation
200
- * picker; selecting a non-default variation is the consumer's premium policy.
201
- */
202
- variation: z.ZodOptional<z.ZodString>;
203
- numBeats: z.ZodNumber;
204
- /** Vibhag groupings; if given, they sum to numBeats. */
205
- bhaags: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
206
- /** Sam (cycle start) beat index, 0-based. */
207
- sam: z.ZodOptional<z.ZodNumber>;
208
- /** Khaali (wave) beat indices, 0-based. */
209
- khaali: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
210
- }, "strip", z.ZodTypeAny, {
211
- id: string;
212
- numBeats: number;
213
- variation?: string | undefined;
214
- bhaags?: number[] | undefined;
215
- sam?: number | undefined;
216
- khaali?: number[] | undefined;
217
- }, {
218
- id: string;
219
- numBeats: number;
220
- variation?: string | undefined;
221
- bhaags?: number[] | undefined;
222
- sam?: number | undefined;
223
- khaali?: number[] | undefined;
224
- }>, {
225
- id: string;
226
- numBeats: number;
227
- variation?: string | undefined;
228
- bhaags?: number[] | undefined;
229
- sam?: number | undefined;
230
- khaali?: number[] | undefined;
231
- }, {
232
- id: string;
233
- numBeats: number;
234
- variation?: string | undefined;
235
- bhaags?: number[] | undefined;
236
- sam?: number | undefined;
237
- khaali?: number[] | undefined;
238
- }>;
239
- type Taal = z.infer<typeof taalSchema>;
240
402
  /** Document-level metadata. */
241
403
  declare const metaSchema: z.ZodObject<{
242
404
  title: z.ZodString;
@@ -326,8 +488,6 @@ declare const metaSchema: z.ZodObject<{
326
488
  source: z.ZodOptional<z.ZodString>;
327
489
  }, "strip", z.ZodTypeAny, {
328
490
  title: string;
329
- songId?: string | undefined;
330
- nltrId?: number | undefined;
331
491
  taal?: {
332
492
  id: string;
333
493
  numBeats: number;
@@ -337,6 +497,8 @@ declare const metaSchema: z.ZodObject<{
337
497
  khaali?: number[] | undefined;
338
498
  } | undefined;
339
499
  taalName?: string | undefined;
500
+ songId?: string | undefined;
501
+ nltrId?: number | undefined;
340
502
  tonic?: string | undefined;
341
503
  bpm?: number | null | undefined;
342
504
  laySpeeds?: {
@@ -350,8 +512,6 @@ declare const metaSchema: z.ZodObject<{
350
512
  source?: string | undefined;
351
513
  }, {
352
514
  title: string;
353
- songId?: string | undefined;
354
- nltrId?: number | undefined;
355
515
  taal?: {
356
516
  id: string;
357
517
  numBeats: number;
@@ -361,6 +521,8 @@ declare const metaSchema: z.ZodObject<{
361
521
  khaali?: number[] | undefined;
362
522
  } | undefined;
363
523
  taalName?: string | undefined;
524
+ songId?: string | undefined;
525
+ nltrId?: number | undefined;
364
526
  tonic?: string | undefined;
365
527
  bpm?: number | null | undefined;
366
528
  laySpeeds?: {
@@ -466,8 +628,6 @@ declare const swaralipiSchema: z.ZodObject<{
466
628
  source: z.ZodOptional<z.ZodString>;
467
629
  }, "strip", z.ZodTypeAny, {
468
630
  title: string;
469
- songId?: string | undefined;
470
- nltrId?: number | undefined;
471
631
  taal?: {
472
632
  id: string;
473
633
  numBeats: number;
@@ -477,6 +637,8 @@ declare const swaralipiSchema: z.ZodObject<{
477
637
  khaali?: number[] | undefined;
478
638
  } | undefined;
479
639
  taalName?: string | undefined;
640
+ songId?: string | undefined;
641
+ nltrId?: number | undefined;
480
642
  tonic?: string | undefined;
481
643
  bpm?: number | null | undefined;
482
644
  laySpeeds?: {
@@ -490,8 +652,6 @@ declare const swaralipiSchema: z.ZodObject<{
490
652
  source?: string | undefined;
491
653
  }, {
492
654
  title: string;
493
- songId?: string | undefined;
494
- nltrId?: number | undefined;
495
655
  taal?: {
496
656
  id: string;
497
657
  numBeats: number;
@@ -501,6 +661,8 @@ declare const swaralipiSchema: z.ZodObject<{
501
661
  khaali?: number[] | undefined;
502
662
  } | undefined;
503
663
  taalName?: string | undefined;
664
+ songId?: string | undefined;
665
+ nltrId?: number | undefined;
504
666
  tonic?: string | undefined;
505
667
  bpm?: number | null | undefined;
506
668
  laySpeeds?: {
@@ -525,21 +687,102 @@ declare const swaralipiSchema: z.ZodObject<{
525
687
  * ("বিলম্বিত লয়:") in already-converted documents.
526
688
  */
527
689
  lay: z.ZodOptional<z.ZodEnum<["drut", "madhya", "vilambit"]>>;
690
+ /**
691
+ * তালফেরতা: the তাল this row switches to, held until another row changes it
692
+ * (absent on every row = the whole song in `meta.taal`). `null` = মুক্তছন্দ
693
+ * from here on: the accompaniment rests until a later row names a taal.
694
+ * Independent of `lay` — either, both or neither may change on one row.
695
+ */
696
+ taal: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
697
+ /** Player sample key, e.g. `dadra`, `teentaal`. */
698
+ id: z.ZodString;
699
+ /**
700
+ * Which tabla loop variation to play, e.g. `pro` (CDN dir suffix). Optional
701
+ * and additive — omitted means the taal's default variation, so existing
702
+ * docs are unaffected. The player honors it but never exposes a variation
703
+ * picker; selecting a non-default variation is the consumer's premium policy.
704
+ */
705
+ variation: z.ZodOptional<z.ZodString>;
706
+ numBeats: z.ZodNumber;
707
+ /** Vibhag groupings; if given, they sum to numBeats. */
708
+ bhaags: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
709
+ /** Sam (cycle start) beat index, 0-based. */
710
+ sam: z.ZodOptional<z.ZodNumber>;
711
+ /** Khaali (wave) beat indices, 0-based. */
712
+ khaali: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ id: string;
715
+ numBeats: number;
716
+ variation?: string | undefined;
717
+ bhaags?: number[] | undefined;
718
+ sam?: number | undefined;
719
+ khaali?: number[] | undefined;
720
+ }, {
721
+ id: string;
722
+ numBeats: number;
723
+ variation?: string | undefined;
724
+ bhaags?: number[] | undefined;
725
+ sam?: number | undefined;
726
+ khaali?: number[] | undefined;
727
+ }>, {
728
+ id: string;
729
+ numBeats: number;
730
+ variation?: string | undefined;
731
+ bhaags?: number[] | undefined;
732
+ sam?: number | undefined;
733
+ khaali?: number[] | undefined;
734
+ }, {
735
+ id: string;
736
+ numBeats: number;
737
+ variation?: string | undefined;
738
+ bhaags?: number[] | undefined;
739
+ sam?: number | undefined;
740
+ khaali?: number[] | undefined;
741
+ }>>>;
742
+ /** That taal's name as printed (e.g. `ষষ্ঠী(২/৪)`) — `meta.taalName`'s twin. */
743
+ taalName: z.ZodOptional<z.ZodString>;
528
744
  notes: z.ZodArray<z.ZodType<Note, z.ZodTypeDef, Note>, "many">;
529
745
  }, "strip", z.ZodTypeAny, {
530
746
  notes: Note[];
531
747
  label?: string | undefined;
532
748
  lay?: "drut" | "madhya" | "vilambit" | undefined;
749
+ taal?: {
750
+ id: string;
751
+ numBeats: number;
752
+ variation?: string | undefined;
753
+ bhaags?: number[] | undefined;
754
+ sam?: number | undefined;
755
+ khaali?: number[] | undefined;
756
+ } | null | undefined;
757
+ taalName?: string | undefined;
533
758
  }, {
534
759
  notes: Note[];
535
760
  label?: string | undefined;
536
761
  lay?: "drut" | "madhya" | "vilambit" | undefined;
762
+ taal?: {
763
+ id: string;
764
+ numBeats: number;
765
+ variation?: string | undefined;
766
+ bhaags?: number[] | undefined;
767
+ sam?: number | undefined;
768
+ khaali?: number[] | undefined;
769
+ } | null | undefined;
770
+ taalName?: string | undefined;
537
771
  }>, "many">;
538
772
  }, "strip", z.ZodTypeAny, {
539
773
  rows: {
540
774
  notes: Note[];
541
775
  label?: string | undefined;
542
776
  lay?: "drut" | "madhya" | "vilambit" | undefined;
777
+ taal?: {
778
+ id: string;
779
+ numBeats: number;
780
+ variation?: string | undefined;
781
+ bhaags?: number[] | undefined;
782
+ sam?: number | undefined;
783
+ khaali?: number[] | undefined;
784
+ } | null | undefined;
785
+ taalName?: string | undefined;
543
786
  }[];
544
787
  name?: string | undefined;
545
788
  }, {
@@ -547,6 +790,15 @@ declare const swaralipiSchema: z.ZodObject<{
547
790
  notes: Note[];
548
791
  label?: string | undefined;
549
792
  lay?: "drut" | "madhya" | "vilambit" | undefined;
793
+ taal?: {
794
+ id: string;
795
+ numBeats: number;
796
+ variation?: string | undefined;
797
+ bhaags?: number[] | undefined;
798
+ sam?: number | undefined;
799
+ khaali?: number[] | undefined;
800
+ } | null | undefined;
801
+ taalName?: string | undefined;
550
802
  }[];
551
803
  name?: string | undefined;
552
804
  }>, "many">;
@@ -554,8 +806,6 @@ declare const swaralipiSchema: z.ZodObject<{
554
806
  version: string;
555
807
  meta: {
556
808
  title: string;
557
- songId?: string | undefined;
558
- nltrId?: number | undefined;
559
809
  taal?: {
560
810
  id: string;
561
811
  numBeats: number;
@@ -565,6 +815,8 @@ declare const swaralipiSchema: z.ZodObject<{
565
815
  khaali?: number[] | undefined;
566
816
  } | undefined;
567
817
  taalName?: string | undefined;
818
+ songId?: string | undefined;
819
+ nltrId?: number | undefined;
568
820
  tonic?: string | undefined;
569
821
  bpm?: number | null | undefined;
570
822
  laySpeeds?: {
@@ -582,6 +834,15 @@ declare const swaralipiSchema: z.ZodObject<{
582
834
  notes: Note[];
583
835
  label?: string | undefined;
584
836
  lay?: "drut" | "madhya" | "vilambit" | undefined;
837
+ taal?: {
838
+ id: string;
839
+ numBeats: number;
840
+ variation?: string | undefined;
841
+ bhaags?: number[] | undefined;
842
+ sam?: number | undefined;
843
+ khaali?: number[] | undefined;
844
+ } | null | undefined;
845
+ taalName?: string | undefined;
585
846
  }[];
586
847
  name?: string | undefined;
587
848
  }[];
@@ -589,8 +850,6 @@ declare const swaralipiSchema: z.ZodObject<{
589
850
  version: string;
590
851
  meta: {
591
852
  title: string;
592
- songId?: string | undefined;
593
- nltrId?: number | undefined;
594
853
  taal?: {
595
854
  id: string;
596
855
  numBeats: number;
@@ -600,6 +859,8 @@ declare const swaralipiSchema: z.ZodObject<{
600
859
  khaali?: number[] | undefined;
601
860
  } | undefined;
602
861
  taalName?: string | undefined;
862
+ songId?: string | undefined;
863
+ nltrId?: number | undefined;
603
864
  tonic?: string | undefined;
604
865
  bpm?: number | null | undefined;
605
866
  laySpeeds?: {
@@ -617,6 +878,15 @@ declare const swaralipiSchema: z.ZodObject<{
617
878
  notes: Note[];
618
879
  label?: string | undefined;
619
880
  lay?: "drut" | "madhya" | "vilambit" | undefined;
881
+ taal?: {
882
+ id: string;
883
+ numBeats: number;
884
+ variation?: string | undefined;
885
+ bhaags?: number[] | undefined;
886
+ sam?: number | undefined;
887
+ khaali?: number[] | undefined;
888
+ } | null | undefined;
889
+ taalName?: string | undefined;
620
890
  }[];
621
891
  name?: string | undefined;
622
892
  }[];