@libraz/libcantus 1.3.0 → 1.4.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/NOTICE +63 -0
- package/README.md +3 -1
- package/README_ja.md +13 -11
- package/dist/analyze/index.cjs +7 -7
- package/dist/analyze/index.cjs.map +1 -1
- package/dist/analyze/index.d.cts +14 -12
- package/dist/analyze/index.d.ts +14 -12
- package/dist/analyze/index.js +6 -6
- package/dist/{chunk-NB25P3EH.js → chunk-2G5MCGYU.js} +33 -11
- package/dist/chunk-2G5MCGYU.js.map +1 -0
- package/dist/{chunk-NM7UAMC3.cjs → chunk-3FDBMIPR.cjs} +64 -64
- package/dist/chunk-3FDBMIPR.cjs.map +1 -0
- package/dist/{chunk-YFA7X2F6.cjs → chunk-3MDOEFIQ.cjs} +411 -327
- package/dist/chunk-3MDOEFIQ.cjs.map +1 -0
- package/dist/{chunk-IPEF6NWB.js → chunk-5MWRBYAT.js} +278 -154
- package/dist/chunk-5MWRBYAT.js.map +1 -0
- package/dist/{chunk-B2PW6EHN.cjs → chunk-6TTBEON3.cjs} +1253 -889
- package/dist/chunk-6TTBEON3.cjs.map +1 -0
- package/dist/{chunk-UMWZ4ZET.js → chunk-7NQ6AL3H.js} +4 -4
- package/dist/chunk-7NQ6AL3H.js.map +1 -0
- package/dist/{chunk-PWC4CRWT.cjs → chunk-E3QO3UET.cjs} +31 -23
- package/dist/chunk-E3QO3UET.cjs.map +1 -0
- package/dist/{chunk-GNVN4PPJ.js → chunk-FJFULJZE.js} +531 -213
- package/dist/chunk-FJFULJZE.js.map +1 -0
- package/dist/{chunk-CPMB7P75.js → chunk-FK3DGAIZ.js} +608 -244
- package/dist/chunk-FK3DGAIZ.js.map +1 -0
- package/dist/chunk-GEDTJHAC.cjs.map +1 -1
- package/dist/{chunk-RFIBF2RR.js → chunk-H7FVMBUC.js} +138 -65
- package/dist/chunk-H7FVMBUC.js.map +1 -0
- package/dist/{chunk-4R2LWV7E.cjs → chunk-HYSVSFNI.cjs} +664 -540
- package/dist/chunk-HYSVSFNI.cjs.map +1 -0
- package/dist/{chunk-35NBV2FT.cjs → chunk-KMYGRFZ6.cjs} +47 -24
- package/dist/chunk-KMYGRFZ6.cjs.map +1 -0
- package/dist/{chunk-IFZDWIKM.cjs → chunk-LQZQDBCD.cjs} +1048 -730
- package/dist/chunk-LQZQDBCD.cjs.map +1 -0
- package/dist/{chunk-PM4XJE2Y.cjs → chunk-P3CPXAJ5.cjs} +76 -54
- package/dist/chunk-P3CPXAJ5.cjs.map +1 -0
- package/dist/{chunk-S5BKZZGM.cjs → chunk-S3QELJUE.cjs} +72 -56
- package/dist/chunk-S3QELJUE.cjs.map +1 -0
- package/dist/{chunk-PUKJP2Z5.js → chunk-TXFWSU5D.js} +31 -8
- package/dist/chunk-TXFWSU5D.js.map +1 -0
- package/dist/{chunk-76ZBTRG2.cjs → chunk-U4EQTDGN.cjs} +258 -218
- package/dist/chunk-U4EQTDGN.cjs.map +1 -0
- package/dist/chunk-UGLFDG7L.cjs.map +1 -1
- package/dist/{chunk-MLBPXA4Z.js → chunk-UTE5A36R.js} +198 -114
- package/dist/chunk-UTE5A36R.js.map +1 -0
- package/dist/{chunk-ZBUROTJQ.js → chunk-UZKQISRF.js} +17 -9
- package/dist/chunk-UZKQISRF.js.map +1 -0
- package/dist/{chunk-7KG3RTYS.js → chunk-VL5NXVCN.js} +281 -155
- package/dist/chunk-VL5NXVCN.js.map +1 -0
- package/dist/{chunk-CGBADIO5.cjs → chunk-WOMCXN2W.cjs} +328 -202
- package/dist/chunk-WOMCXN2W.cjs.map +1 -0
- package/dist/{chunk-3R3QVKY5.cjs → chunk-YDGMWH43.cjs} +397 -324
- package/dist/chunk-YDGMWH43.cjs.map +1 -0
- package/dist/{chunk-AGOVW7U6.js → chunk-YYVXRV3V.js} +72 -56
- package/dist/chunk-YYVXRV3V.js.map +1 -0
- package/dist/{chunk-M5RYMAFI.js → chunk-ZLNSH4UL.js} +71 -31
- package/dist/chunk-ZLNSH4UL.js.map +1 -0
- package/dist/{coerce-DRERzdve.d.cts → coerce-CUhHc3Tu.d.ts} +16 -8
- package/dist/{coerce-DP0vYu-x.d.ts → coerce-Ytt2Eiq9.d.cts} +16 -8
- package/dist/core/index.cjs +5 -5
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +9 -8
- package/dist/core/index.d.ts +9 -8
- package/dist/core/index.js +4 -4
- package/dist/generate/index.cjs +8 -8
- package/dist/generate/index.cjs.map +1 -1
- package/dist/generate/index.d.cts +28 -18
- package/dist/generate/index.d.ts +28 -18
- package/dist/generate/index.js +7 -7
- package/dist/{index-BMweUlm5.d.cts → index-5VJgKz_Q.d.cts} +6 -2
- package/dist/{index-BHIUyjhZ.d.ts → index-BLuDesVG.d.ts} +20 -13
- package/dist/{index-B9QLziDe.d.cts → index-BV6APVa6.d.cts} +20 -13
- package/dist/{index-CL4b4gUQ.d.ts → index-Bf0Sv8a9.d.ts} +6 -2
- package/dist/{index-Dw2DP7vm.d.ts → index-BkT21EMv.d.cts} +3 -2
- package/dist/{index-BL5N2Oyz.d.cts → index-C7KCaTRz.d.ts} +3 -2
- package/dist/{index-Cy15oTvh.d.ts → index-C9MYbuKS.d.cts} +7 -3
- package/dist/{index-Cy15oTvh.d.cts → index-C9MYbuKS.d.ts} +7 -3
- package/dist/{index-CY-3NVfy.d.cts → index-DVInzCDS.d.cts} +53 -29
- package/dist/{index-9eoQs2C1.d.ts → index-Dg-SAfhz.d.ts} +6 -4
- package/dist/{index-zaZdmnU4.d.ts → index-jgeug9EA.d.ts} +53 -29
- package/dist/{index-cHvbYgJI.d.cts → index-pQihL4z7.d.cts} +6 -4
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +12 -12
- package/dist/{masks-Cc7-MzzY.d.ts → masks-BnzXnBj0.d.cts} +3 -2
- package/dist/{masks-pADfTOiD.d.cts → masks-tycmkrgs.d.ts} +3 -2
- package/dist/model/index.cjs +12 -12
- package/dist/model/index.cjs.map +1 -1
- package/dist/model/index.d.cts +63 -48
- package/dist/model/index.d.ts +63 -48
- package/dist/model/index.js +11 -11
- package/dist/{positional-DJgs6ltD.d.ts → positional-CscpxtlE.d.cts} +3 -2
- package/dist/{positional-DMZer-FM.d.cts → positional-DLnfUgqG.d.ts} +3 -2
- package/dist/{profile-DLdlIpS9.d.ts → profile-B4WqcM4H.d.ts} +25 -17
- package/dist/{profile-CQMEqdH9.d.cts → profile-BJd1XkPB.d.cts} +25 -17
- package/dist/theory/index.cjs +5 -5
- package/dist/theory/index.cjs.map +1 -1
- package/dist/theory/index.d.cts +18 -14
- package/dist/theory/index.d.ts +18 -14
- package/dist/theory/index.js +4 -4
- package/dist/{types-D-XgxGvp.d.cts → types-7mGFwvMm.d.ts} +45 -22
- package/dist/{types-Dh7C064C.d.ts → types-_ofpb2be.d.cts} +45 -22
- package/package.json +13 -13
- package/dist/chunk-35NBV2FT.cjs.map +0 -1
- package/dist/chunk-3R3QVKY5.cjs.map +0 -1
- package/dist/chunk-4R2LWV7E.cjs.map +0 -1
- package/dist/chunk-76ZBTRG2.cjs.map +0 -1
- package/dist/chunk-7KG3RTYS.js.map +0 -1
- package/dist/chunk-AGOVW7U6.js.map +0 -1
- package/dist/chunk-B2PW6EHN.cjs.map +0 -1
- package/dist/chunk-CGBADIO5.cjs.map +0 -1
- package/dist/chunk-CPMB7P75.js.map +0 -1
- package/dist/chunk-GNVN4PPJ.js.map +0 -1
- package/dist/chunk-IFZDWIKM.cjs.map +0 -1
- package/dist/chunk-IPEF6NWB.js.map +0 -1
- package/dist/chunk-M5RYMAFI.js.map +0 -1
- package/dist/chunk-MLBPXA4Z.js.map +0 -1
- package/dist/chunk-NB25P3EH.js.map +0 -1
- package/dist/chunk-NM7UAMC3.cjs.map +0 -1
- package/dist/chunk-PM4XJE2Y.cjs.map +0 -1
- package/dist/chunk-PUKJP2Z5.js.map +0 -1
- package/dist/chunk-PWC4CRWT.cjs.map +0 -1
- package/dist/chunk-RFIBF2RR.js.map +0 -1
- package/dist/chunk-S5BKZZGM.cjs.map +0 -1
- package/dist/chunk-UMWZ4ZET.js.map +0 -1
- package/dist/chunk-YFA7X2F6.cjs.map +0 -1
- package/dist/chunk-ZBUROTJQ.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TimeSignature, b as MeterLike, c as MeterMap } from './index-
|
|
2
|
-
import { a as Articulation, h as NoteEvent } from './index-
|
|
3
|
-
import { S as SeedPath, d as PositionalRng, I as InstrumentProfile, f as StringedProfile } from './positional-
|
|
4
|
-
import { d as ChordQuality, e as ChordSegment, c as ChordLike, K as KeyLike, b as Chord, m as ProfileWeights, g as ChordSpan, n as ResolvedKey, r as SpelledKeyLike } from './coerce-
|
|
5
|
-
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-
|
|
6
|
-
import { H as HarmonyRole } from './index-
|
|
1
|
+
import { T as TimeSignature, b as MeterLike, c as MeterMap } from './index-5VJgKz_Q.cjs';
|
|
2
|
+
import { a as Articulation, h as NoteEvent } from './index-C9MYbuKS.cjs';
|
|
3
|
+
import { S as SeedPath, d as PositionalRng, I as InstrumentProfile, f as StringedProfile } from './positional-CscpxtlE.cjs';
|
|
4
|
+
import { d as ChordQuality, e as ChordSegment, c as ChordLike, K as KeyLike, b as Chord, m as ProfileWeights, g as ChordSpan, n as ResolvedKey, r as SpelledKeyLike } from './coerce-Ytt2Eiq9.cjs';
|
|
5
|
+
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-_ofpb2be.cjs';
|
|
6
|
+
import { H as HarmonyRole } from './index-BkT21EMv.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The samplers a generator needs, each addressed by the position it is drawing
|
|
@@ -547,8 +547,9 @@ declare function thin<T extends GridEvent>(events: readonly T[], amount: number,
|
|
|
547
547
|
* Fill in the gaps of a figure, one note per gap.
|
|
548
548
|
*
|
|
549
549
|
* Doubling is what a player does when asked for more of the same rather than
|
|
550
|
-
* for something different: the added note sits halfway between two
|
|
551
|
-
*
|
|
550
|
+
* for something different: the added note sits halfway between two onsets of
|
|
551
|
+
* one stream (the limb, else the voice), takes its predecessor's identity, and
|
|
552
|
+
* is played softer. A gap between two limbs is no gap for either of them.
|
|
552
553
|
*
|
|
553
554
|
* @param events The figure, which need not be sorted.
|
|
554
555
|
* @param spanSteps Length of the figure in sixteenths.
|
|
@@ -574,6 +575,9 @@ declare function halfTime<T extends GridEvent>(events: readonly T[], spanSteps?:
|
|
|
574
575
|
* The repeat is what makes this the mirror of {@link halfTime} rather than a
|
|
575
576
|
* figure with a hole in it: the bar stays full.
|
|
576
577
|
*
|
|
578
|
+
* A whole step halves onto the nearest sixteenth; an onset off the straight
|
|
579
|
+
* grid, a triplet, halves exactly and stays on its own grid.
|
|
580
|
+
*
|
|
577
581
|
* Halving brings positions together, and two onsets of one stream landing on
|
|
578
582
|
* the same step are one stroke played louder rather than two: a drum struck
|
|
579
583
|
* twice at the same instant is a pair of note-ons a reader turns into a hung or
|
|
@@ -713,8 +717,8 @@ type DeformOptions = {
|
|
|
713
717
|
* const busier = deform(figure, { rhythmic: 0.9 }, draw, 'bar', 0);
|
|
714
718
|
* // Above the neutral middle the figure is syncopated: onsets are added off
|
|
715
719
|
* // the beat, and the result comes back sorted by position.
|
|
716
|
-
* busier.length; //
|
|
717
|
-
* busier.map((event) => event.step); // [0, 3, 4,
|
|
720
|
+
* busier.length; // 6
|
|
721
|
+
* busier.map((event) => event.step); // [0, 3, 4, 8, 11, 12]
|
|
718
722
|
* ```
|
|
719
723
|
*
|
|
720
724
|
* @category Composition
|
|
@@ -747,9 +751,12 @@ declare function withinCeiling(events: readonly GridEvent[], bpm: number | undef
|
|
|
747
751
|
* Given a sequence of chord segments and a key, this builds a monophonic bass
|
|
748
752
|
* line in a chosen low register. Several idiomatic styles are supported, from a
|
|
749
753
|
* single held root per segment to a quarter-note walking line that leads by
|
|
750
|
-
* step into each chord change.
|
|
751
|
-
*
|
|
752
|
-
*
|
|
754
|
+
* step into each chord change. Root-position chord tones are kept in an
|
|
755
|
+
* octave-wide bass band `[low, low + 12]`. A slash chord's other tones sit up to
|
|
756
|
+
* an octave above its placed bass, so they can rise past the top of the band,
|
|
757
|
+
* and the `pop` octave pickup and the walking approach notes leave the band by
|
|
758
|
+
* design; consecutive notes can therefore lie more than an octave apart. Given
|
|
759
|
+
* a seed the output is fully reproducible.
|
|
753
760
|
*
|
|
754
761
|
* Positions and durations are measured in quarter-note beats, matching the
|
|
755
762
|
* library-wide convention.
|
|
@@ -847,9 +854,12 @@ type BassLineOptions = {
|
|
|
847
854
|
* Generate a bass line following a chord placement.
|
|
848
855
|
*
|
|
849
856
|
* Each segment contributes notes in the chosen bass register per the selected
|
|
850
|
-
* style
|
|
851
|
-
*
|
|
852
|
-
*
|
|
857
|
+
* style. Root-position chord tones lie in the `[low, low + 12]` band; a slash
|
|
858
|
+
* chord's other tones sit up to an octave above its placed bass, and the `pop`
|
|
859
|
+
* octave pickup and the walking approach notes leave the band, so consecutive
|
|
860
|
+
* notes can be more than an octave apart. Every note's duration extends to the
|
|
861
|
+
* next onset (the final note extends to the last segment's end). Given a seed
|
|
862
|
+
* the output is fully reproducible.
|
|
853
863
|
*
|
|
854
864
|
* The `pop` style's pickups are drawn per position, so raising
|
|
855
865
|
* `complexity.rhythmic` adds pickups without moving the notes already written.
|
|
@@ -1247,6 +1257,8 @@ declare function generateDrums(opts: DrumsOptions): DrumHit[];
|
|
|
1247
1257
|
type HumanizeOptions = {
|
|
1248
1258
|
/**
|
|
1249
1259
|
* Time signature used to derive metric accents, in any form that names one.
|
|
1260
|
+
* A meter map is read bar by bar, so a note after a change is accented in the
|
|
1261
|
+
* signature in force where it sounds.
|
|
1250
1262
|
*
|
|
1251
1263
|
* @defaultValue 4/4
|
|
1252
1264
|
*/
|
|
@@ -1374,11 +1386,13 @@ type GrooveTemplate = {
|
|
|
1374
1386
|
* template so {@link applyGrooveTemplate} can verify the meter matches.
|
|
1375
1387
|
*
|
|
1376
1388
|
* @param events The (typically "groovy", human-played) events to analyze.
|
|
1377
|
-
* @param ts The time signature, used to compute the bar length.
|
|
1389
|
+
* @param ts The time signature, used to compute the bar length. A meter map
|
|
1390
|
+
* is accepted while it keeps one signature throughout.
|
|
1378
1391
|
* @param subdivision Grid resolution: equal grid steps per quarter-note beat.
|
|
1379
1392
|
* Defaults to a sixteenth-note grid, which is where the timing deviations a
|
|
1380
1393
|
* template records — swing, push, drag — are audible.
|
|
1381
1394
|
* @returns The extracted groove template.
|
|
1395
|
+
* @throws If `ts` changes signature.
|
|
1382
1396
|
* @category Rhythm & Meter
|
|
1383
1397
|
*/
|
|
1384
1398
|
declare function extractGrooveTemplate(events: readonly NoteEvent[], ts: MeterLike, subdivision?: number): GrooveTemplate;
|
|
@@ -1403,11 +1417,13 @@ declare function extractGrooveTemplate(events: readonly NoteEvent[], ts: MeterLi
|
|
|
1403
1417
|
*
|
|
1404
1418
|
* @param events The events to reshape.
|
|
1405
1419
|
* @param template The groove template, from {@link extractGrooveTemplate}.
|
|
1406
|
-
* @param ts The time signature, used to compute the bar length.
|
|
1420
|
+
* @param ts The time signature, used to compute the bar length. A meter map
|
|
1421
|
+
* is accepted while it keeps one signature throughout.
|
|
1407
1422
|
* @returns Reshaped copies of `events`, in input order.
|
|
1408
|
-
* @throws If `template.ts` is set and does not
|
|
1409
|
-
* not the number of slots a bar of `ts` holds
|
|
1410
|
-
* or if a slot carries a non-finite offset or
|
|
1423
|
+
* @throws If `ts` changes signature, if `template.ts` is set and does not
|
|
1424
|
+
* match `ts`, if `slotsPerBar` is not the number of slots a bar of `ts` holds
|
|
1425
|
+
* at the template's subdivision, or if a slot carries a non-finite offset or
|
|
1426
|
+
* a velocity outside [0, 127].
|
|
1411
1427
|
* @example
|
|
1412
1428
|
* ```ts
|
|
1413
1429
|
* import { extractGrooveTemplate, applyGrooveTemplate, parseTimeSignature } from '@libraz/libcantus';
|
|
@@ -1603,7 +1619,10 @@ declare function pickProgressionPreset(style: ProgStyle, ctx?: GenerationContext
|
|
|
1603
1619
|
* the secondary dominant (V7) of the following chord, flagged with
|
|
1604
1620
|
* `secondaryDominant`. Only a chord the key can make a local tonic is given one:
|
|
1605
1621
|
* nothing tonicizes a diminished triad, so the supertonic of a minor key takes
|
|
1606
|
-
* no dominant of its own
|
|
1622
|
+
* no dominant of its own, and a dominant seventh the key already contains
|
|
1623
|
+
* (the tonic seventh of mixolydian) is a native chord rather than an applied
|
|
1624
|
+
* one, so it is not inserted. A chord that already sounds a dominant seventh
|
|
1625
|
+
* onto the next one is left as written.
|
|
1607
1626
|
*
|
|
1608
1627
|
* @param opts Generation options.
|
|
1609
1628
|
* @returns One chord per bar in timeline order.
|
|
@@ -1674,7 +1693,7 @@ type HarmonizePlacement = {
|
|
|
1674
1693
|
* @category Reharmonization
|
|
1675
1694
|
*/
|
|
1676
1695
|
type HarmonizeOptions = {
|
|
1677
|
-
/** The melody to harmonize, in
|
|
1696
|
+
/** The melody to harmonize, in any order; it is read in onset order. */
|
|
1678
1697
|
melody: readonly MelodyNote[];
|
|
1679
1698
|
/**
|
|
1680
1699
|
* The key to harmonize in, or `'infer'` to estimate it from the melody's
|
|
@@ -1974,7 +1993,8 @@ type PlannedRhythm = {
|
|
|
1974
1993
|
* The plan is a hard constraint where the generator is free: every root, every
|
|
1975
1994
|
* span no motif covers and every closing note keeps its phrase's register and
|
|
1976
1995
|
* offers only the pitches its position class admits — a chord tone on a strong
|
|
1977
|
-
* pulse, a scale tone on a weak one
|
|
1996
|
+
* pulse, a scale tone on a weak one or on a strong one where no chord is
|
|
1997
|
+
* planned, anything in the register off the pulses.
|
|
1978
1998
|
* A derived statement is its source replayed through the named relation at the
|
|
1979
1999
|
* pitch level that suits its phrase best; there the transformation outranks
|
|
1980
2000
|
* the harmony, and the register outranks both. A root takes its plan's onset
|
|
@@ -2318,7 +2338,8 @@ type OrnamentOptions = {
|
|
|
2318
2338
|
amount?: number;
|
|
2319
2339
|
/**
|
|
2320
2340
|
* Time signature, in any form that names one, used to tell strong positions
|
|
2321
|
-
* from weak ones.
|
|
2341
|
+
* from weak ones. A meter map is read bar by bar, so a note after a change
|
|
2342
|
+
* is weighed in the signature in force where it sounds.
|
|
2322
2343
|
*
|
|
2323
2344
|
* @defaultValue 4/4
|
|
2324
2345
|
*/
|
|
@@ -2663,8 +2684,9 @@ type SubstituteOptions = {
|
|
|
2663
2684
|
* tritone substitute of G7 formats as `Db7` and its chromatic mediants as `Bb`
|
|
2664
2685
|
* and `Eb`. Where the substitution's function and the bare pitch class disagree,
|
|
2665
2686
|
* the function decides — a tritone substitute is a bII7 and so is written on the
|
|
2666
|
-
* flattened supertonic of the chord it resolves to,
|
|
2667
|
-
*
|
|
2687
|
+
* flattened supertonic of the chord it resolves to, a borrowed chord takes the
|
|
2688
|
+
* spelling of the mode it is borrowed from, and a chromatic mediant is written
|
|
2689
|
+
* on the letter a third from the source root (E's mediants are G#, not Ab).
|
|
2668
2690
|
*
|
|
2669
2691
|
* @param chord The chord to reharmonize, as a chord symbol or as chord data.
|
|
2670
2692
|
* @param key The prevailing key, as a key name or as a key/scale.
|
|
@@ -2781,7 +2803,8 @@ type RhythmEvent = {
|
|
|
2781
2803
|
* @param pitch The MIDI pitch to give every note.
|
|
2782
2804
|
* @param velocity Velocity for every note; defaults to a mezzo-forte 96.
|
|
2783
2805
|
* @returns The note events, in the order given.
|
|
2784
|
-
* @throws If the pitch or the velocity is not a whole MIDI value in [0, 127]
|
|
2806
|
+
* @throws If the pitch or the velocity is not a whole MIDI value in [0, 127], or an event is not
|
|
2807
|
+
* a record with a finite position and duration.
|
|
2785
2808
|
* @example
|
|
2786
2809
|
* ```ts
|
|
2787
2810
|
* import { generateRhythm, humanize, rhythmToNoteEvents } from '@libraz/libcantus';
|
|
@@ -2867,4 +2890,5 @@ declare function generateRhythm(ts: MeterLike, opts?: RhythmOptions): RhythmEven
|
|
|
2867
2890
|
*/
|
|
2868
2891
|
declare function rhythmDensity(events: RhythmEvent[], ts: MeterLike): number;
|
|
2869
2892
|
|
|
2870
|
-
export {
|
|
2893
|
+
export { BAR_STEPS as B, COMPOSITION_PLAN_VERSION as C, DRUM_NOTES as D, GENRES as G, ORNAMENT_STYLES as T, PROVENANCE_BASES as W, BASS_STYLES as a, generateRhythm as aA, gridMetricWeight as aB, halfTime as aC, humanize as aD, mergeVocabulary as aE, modalInterchangePalette as aF, motifToNoteEvents as aG, negativeHarmonyMirror as aH, onsetWeightCurve as aI, ornament as aJ, ornamentBy as aK, pickProgressionPreset as aL, pickVocabulary as aM, progressions as aN, progressionsByStyle as aO, resolveContext as aP, rhythmDensity as aQ, rhythmToNoteEvents as aR, selectVocabulary as aS, substituteChord as aT, syncopate as aU, thin as aV, transformMotif as aW, vocabularyOfKind as aX, withinCeiling as aY, STEP_BEATS as ab, applyGrooveTemplate as aj, assertVocabulary as ak, deform as al, deriveCompositionPlan as am, developMotif as an, double as ao, doubleTime as ap, drumVoiceOf as aq, evaluateComposition as ar, extractGrooveTemplate as as, fitsQuery as at, generateBassLine as au, generateCounterMelody as av, generateDrums as aw, generateMelody as ax, generateMotif as ay, generateProgression as az, BEAT_STEPS as b, BORROWED_DEGREES as c };
|
|
2894
|
+
export type { PlannedSection as $, GrooveSlot as A, EuclideanKick as E, GrooveStyle as F, GrooveTemplate as H, HarmonizeOptions as I, HarmonizePlacement as J, HarmonizeResult as K, HumanizeOptions as L, MelodyNote as M, MelodyOptions as N, MotifCell as O, MotifContour as P, MotifNote as Q, MotifOptions as R, MotifTransform as S, OrnamentOptions as U, OrnamentStyle as V, PlannedChord as X, PlannedMotif as Y, PlannedPhrase as Z, PlannedRhythm as _, PreserveWeights as a0, ProgFunction as a1, ProgStyle as a2, ProgressionDegree as a3, ProgressionOptions as a4, ProgressionPreset as a5, Provenance as a6, ProvenanceBasis as a7, ResolvedContext as a8, RhythmEvent as a9, RhythmOptions as aa, Section as ac, SubstituteOptions as ad, Substitution as ae, SubstitutionType as af, SyncopateOptions as ag, Vocabulary as ah, VocabularyQuery as ai, BassLineOptions as d, BassSegment as e, BassStyle as f, BorrowedChord as g, Complexity as h, CompositionEvaluation as i, CompositionPlan as j, CompositionPlanOptions as k, CompositionViolation as l, CounterMelodyOptions as m, DeformOptions as n, Draw as o, DrumHit as p, DrumRole as q, DrumStyle as r, DrumVoice as s, DrumsOptions as t, EvaluateCompositionOptions as u, GenerationContext as v, GenerationContextInput as w, Genre as x, GridEvent as y, GrooveFeel as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as NoteEvent } from './index-
|
|
2
|
-
import { e as StringFingering, c as Limb, b as InstrumentProfileLike } from './positional-
|
|
1
|
+
import { h as NoteEvent } from './index-C9MYbuKS.js';
|
|
2
|
+
import { e as StringFingering, c as Limb, b as InstrumentProfileLike } from './positional-DLnfUgqG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* What makes a passage hard or impossible on an instrument.
|
|
@@ -453,7 +453,8 @@ declare function tempoAt(beat: number, map: TempoMap): number;
|
|
|
453
453
|
* @param beat Position or length in quarter-note beats.
|
|
454
454
|
* @param ppq Pulses (ticks) per quarter note, e.g. 96, 480, or 960.
|
|
455
455
|
* @returns The whole tick count.
|
|
456
|
-
* @throws If `beat` is not finite
|
|
456
|
+
* @throws If `beat` is not finite, `ppq` is not a positive integer, or the
|
|
457
|
+
* tick count is past the safe integers.
|
|
457
458
|
* @example
|
|
458
459
|
* ```ts
|
|
459
460
|
* import { beatsToTicks } from '@libraz/libcantus';
|
|
@@ -655,4 +656,5 @@ declare const JUST_RATIOS: Readonly<Record<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|
|
|
655
656
|
*/
|
|
656
657
|
declare function justDeviationCents(semitoneClass: number): number;
|
|
657
658
|
|
|
658
|
-
export { playability as A, ratioToCents as B, secondsToBeats as C,
|
|
659
|
+
export { playability as A, ratioToCents as B, secondsToBeats as C, stepOf as E, stepsOfCents as F, tempoAt as G, ticksToBeats as H, JUST_RATIOS as J, NOTE_VALUES as N, TWELVE_TET as T, beatsToDuration as l, beatsToSeconds as m, beatsToTicks as n, beatsToTiedDurations as o, centsBetweenFreq as p, centsFromNearestStep as q, centsOfSteps as r, centsToRatio as s, createNoteEventIndex as t, durationToBeats as u, durationToSeconds as v, edo as w, frequencyOf as x, justDeviationCents as y, nearestStep as z };
|
|
660
|
+
export type { DurationData as D, IndexedNoteEvent as I, OnsetTieBreak as O, PlayabilityIssue as P, SpelledDuration as S, NoteEventIndex as a, NoteEventIndexOptions as b, NotePlacement as c, NoteValue as d, PlayabilityIssueType as e, PlayabilityLayer as f, PlayabilityReport as g, TempoEvent as h, TempoMap as i, TuningTable as j, Tuplet as k };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TimeSignature, b as MeterLike, c as MeterMap } from './index-
|
|
2
|
-
import { a as Articulation, h as NoteEvent } from './index-
|
|
3
|
-
import { S as SeedPath, d as PositionalRng, I as InstrumentProfile, f as StringedProfile } from './positional-
|
|
4
|
-
import { d as ChordQuality, e as ChordSegment, c as ChordLike, K as KeyLike, b as Chord, m as ProfileWeights, g as ChordSpan, n as ResolvedKey, r as SpelledKeyLike } from './coerce-
|
|
5
|
-
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-
|
|
6
|
-
import { H as HarmonyRole } from './index-
|
|
1
|
+
import { T as TimeSignature, b as MeterLike, c as MeterMap } from './index-Bf0Sv8a9.js';
|
|
2
|
+
import { a as Articulation, h as NoteEvent } from './index-C9MYbuKS.js';
|
|
3
|
+
import { S as SeedPath, d as PositionalRng, I as InstrumentProfile, f as StringedProfile } from './positional-DLnfUgqG.js';
|
|
4
|
+
import { d as ChordQuality, e as ChordSegment, c as ChordLike, K as KeyLike, b as Chord, m as ProfileWeights, g as ChordSpan, n as ResolvedKey, r as SpelledKeyLike } from './coerce-CUhHc3Tu.js';
|
|
5
|
+
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-7mGFwvMm.js';
|
|
6
|
+
import { H as HarmonyRole } from './index-C7KCaTRz.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The samplers a generator needs, each addressed by the position it is drawing
|
|
@@ -547,8 +547,9 @@ declare function thin<T extends GridEvent>(events: readonly T[], amount: number,
|
|
|
547
547
|
* Fill in the gaps of a figure, one note per gap.
|
|
548
548
|
*
|
|
549
549
|
* Doubling is what a player does when asked for more of the same rather than
|
|
550
|
-
* for something different: the added note sits halfway between two
|
|
551
|
-
*
|
|
550
|
+
* for something different: the added note sits halfway between two onsets of
|
|
551
|
+
* one stream (the limb, else the voice), takes its predecessor's identity, and
|
|
552
|
+
* is played softer. A gap between two limbs is no gap for either of them.
|
|
552
553
|
*
|
|
553
554
|
* @param events The figure, which need not be sorted.
|
|
554
555
|
* @param spanSteps Length of the figure in sixteenths.
|
|
@@ -574,6 +575,9 @@ declare function halfTime<T extends GridEvent>(events: readonly T[], spanSteps?:
|
|
|
574
575
|
* The repeat is what makes this the mirror of {@link halfTime} rather than a
|
|
575
576
|
* figure with a hole in it: the bar stays full.
|
|
576
577
|
*
|
|
578
|
+
* A whole step halves onto the nearest sixteenth; an onset off the straight
|
|
579
|
+
* grid, a triplet, halves exactly and stays on its own grid.
|
|
580
|
+
*
|
|
577
581
|
* Halving brings positions together, and two onsets of one stream landing on
|
|
578
582
|
* the same step are one stroke played louder rather than two: a drum struck
|
|
579
583
|
* twice at the same instant is a pair of note-ons a reader turns into a hung or
|
|
@@ -713,8 +717,8 @@ type DeformOptions = {
|
|
|
713
717
|
* const busier = deform(figure, { rhythmic: 0.9 }, draw, 'bar', 0);
|
|
714
718
|
* // Above the neutral middle the figure is syncopated: onsets are added off
|
|
715
719
|
* // the beat, and the result comes back sorted by position.
|
|
716
|
-
* busier.length; //
|
|
717
|
-
* busier.map((event) => event.step); // [0, 3, 4,
|
|
720
|
+
* busier.length; // 6
|
|
721
|
+
* busier.map((event) => event.step); // [0, 3, 4, 8, 11, 12]
|
|
718
722
|
* ```
|
|
719
723
|
*
|
|
720
724
|
* @category Composition
|
|
@@ -747,9 +751,12 @@ declare function withinCeiling(events: readonly GridEvent[], bpm: number | undef
|
|
|
747
751
|
* Given a sequence of chord segments and a key, this builds a monophonic bass
|
|
748
752
|
* line in a chosen low register. Several idiomatic styles are supported, from a
|
|
749
753
|
* single held root per segment to a quarter-note walking line that leads by
|
|
750
|
-
* step into each chord change.
|
|
751
|
-
*
|
|
752
|
-
*
|
|
754
|
+
* step into each chord change. Root-position chord tones are kept in an
|
|
755
|
+
* octave-wide bass band `[low, low + 12]`. A slash chord's other tones sit up to
|
|
756
|
+
* an octave above its placed bass, so they can rise past the top of the band,
|
|
757
|
+
* and the `pop` octave pickup and the walking approach notes leave the band by
|
|
758
|
+
* design; consecutive notes can therefore lie more than an octave apart. Given
|
|
759
|
+
* a seed the output is fully reproducible.
|
|
753
760
|
*
|
|
754
761
|
* Positions and durations are measured in quarter-note beats, matching the
|
|
755
762
|
* library-wide convention.
|
|
@@ -847,9 +854,12 @@ type BassLineOptions = {
|
|
|
847
854
|
* Generate a bass line following a chord placement.
|
|
848
855
|
*
|
|
849
856
|
* Each segment contributes notes in the chosen bass register per the selected
|
|
850
|
-
* style
|
|
851
|
-
*
|
|
852
|
-
*
|
|
857
|
+
* style. Root-position chord tones lie in the `[low, low + 12]` band; a slash
|
|
858
|
+
* chord's other tones sit up to an octave above its placed bass, and the `pop`
|
|
859
|
+
* octave pickup and the walking approach notes leave the band, so consecutive
|
|
860
|
+
* notes can be more than an octave apart. Every note's duration extends to the
|
|
861
|
+
* next onset (the final note extends to the last segment's end). Given a seed
|
|
862
|
+
* the output is fully reproducible.
|
|
853
863
|
*
|
|
854
864
|
* The `pop` style's pickups are drawn per position, so raising
|
|
855
865
|
* `complexity.rhythmic` adds pickups without moving the notes already written.
|
|
@@ -1247,6 +1257,8 @@ declare function generateDrums(opts: DrumsOptions): DrumHit[];
|
|
|
1247
1257
|
type HumanizeOptions = {
|
|
1248
1258
|
/**
|
|
1249
1259
|
* Time signature used to derive metric accents, in any form that names one.
|
|
1260
|
+
* A meter map is read bar by bar, so a note after a change is accented in the
|
|
1261
|
+
* signature in force where it sounds.
|
|
1250
1262
|
*
|
|
1251
1263
|
* @defaultValue 4/4
|
|
1252
1264
|
*/
|
|
@@ -1374,11 +1386,13 @@ type GrooveTemplate = {
|
|
|
1374
1386
|
* template so {@link applyGrooveTemplate} can verify the meter matches.
|
|
1375
1387
|
*
|
|
1376
1388
|
* @param events The (typically "groovy", human-played) events to analyze.
|
|
1377
|
-
* @param ts The time signature, used to compute the bar length.
|
|
1389
|
+
* @param ts The time signature, used to compute the bar length. A meter map
|
|
1390
|
+
* is accepted while it keeps one signature throughout.
|
|
1378
1391
|
* @param subdivision Grid resolution: equal grid steps per quarter-note beat.
|
|
1379
1392
|
* Defaults to a sixteenth-note grid, which is where the timing deviations a
|
|
1380
1393
|
* template records — swing, push, drag — are audible.
|
|
1381
1394
|
* @returns The extracted groove template.
|
|
1395
|
+
* @throws If `ts` changes signature.
|
|
1382
1396
|
* @category Rhythm & Meter
|
|
1383
1397
|
*/
|
|
1384
1398
|
declare function extractGrooveTemplate(events: readonly NoteEvent[], ts: MeterLike, subdivision?: number): GrooveTemplate;
|
|
@@ -1403,11 +1417,13 @@ declare function extractGrooveTemplate(events: readonly NoteEvent[], ts: MeterLi
|
|
|
1403
1417
|
*
|
|
1404
1418
|
* @param events The events to reshape.
|
|
1405
1419
|
* @param template The groove template, from {@link extractGrooveTemplate}.
|
|
1406
|
-
* @param ts The time signature, used to compute the bar length.
|
|
1420
|
+
* @param ts The time signature, used to compute the bar length. A meter map
|
|
1421
|
+
* is accepted while it keeps one signature throughout.
|
|
1407
1422
|
* @returns Reshaped copies of `events`, in input order.
|
|
1408
|
-
* @throws If `template.ts` is set and does not
|
|
1409
|
-
* not the number of slots a bar of `ts` holds
|
|
1410
|
-
* or if a slot carries a non-finite offset or
|
|
1423
|
+
* @throws If `ts` changes signature, if `template.ts` is set and does not
|
|
1424
|
+
* match `ts`, if `slotsPerBar` is not the number of slots a bar of `ts` holds
|
|
1425
|
+
* at the template's subdivision, or if a slot carries a non-finite offset or
|
|
1426
|
+
* a velocity outside [0, 127].
|
|
1411
1427
|
* @example
|
|
1412
1428
|
* ```ts
|
|
1413
1429
|
* import { extractGrooveTemplate, applyGrooveTemplate, parseTimeSignature } from '@libraz/libcantus';
|
|
@@ -1603,7 +1619,10 @@ declare function pickProgressionPreset(style: ProgStyle, ctx?: GenerationContext
|
|
|
1603
1619
|
* the secondary dominant (V7) of the following chord, flagged with
|
|
1604
1620
|
* `secondaryDominant`. Only a chord the key can make a local tonic is given one:
|
|
1605
1621
|
* nothing tonicizes a diminished triad, so the supertonic of a minor key takes
|
|
1606
|
-
* no dominant of its own
|
|
1622
|
+
* no dominant of its own, and a dominant seventh the key already contains
|
|
1623
|
+
* (the tonic seventh of mixolydian) is a native chord rather than an applied
|
|
1624
|
+
* one, so it is not inserted. A chord that already sounds a dominant seventh
|
|
1625
|
+
* onto the next one is left as written.
|
|
1607
1626
|
*
|
|
1608
1627
|
* @param opts Generation options.
|
|
1609
1628
|
* @returns One chord per bar in timeline order.
|
|
@@ -1674,7 +1693,7 @@ type HarmonizePlacement = {
|
|
|
1674
1693
|
* @category Reharmonization
|
|
1675
1694
|
*/
|
|
1676
1695
|
type HarmonizeOptions = {
|
|
1677
|
-
/** The melody to harmonize, in
|
|
1696
|
+
/** The melody to harmonize, in any order; it is read in onset order. */
|
|
1678
1697
|
melody: readonly MelodyNote[];
|
|
1679
1698
|
/**
|
|
1680
1699
|
* The key to harmonize in, or `'infer'` to estimate it from the melody's
|
|
@@ -1974,7 +1993,8 @@ type PlannedRhythm = {
|
|
|
1974
1993
|
* The plan is a hard constraint where the generator is free: every root, every
|
|
1975
1994
|
* span no motif covers and every closing note keeps its phrase's register and
|
|
1976
1995
|
* offers only the pitches its position class admits — a chord tone on a strong
|
|
1977
|
-
* pulse, a scale tone on a weak one
|
|
1996
|
+
* pulse, a scale tone on a weak one or on a strong one where no chord is
|
|
1997
|
+
* planned, anything in the register off the pulses.
|
|
1978
1998
|
* A derived statement is its source replayed through the named relation at the
|
|
1979
1999
|
* pitch level that suits its phrase best; there the transformation outranks
|
|
1980
2000
|
* the harmony, and the register outranks both. A root takes its plan's onset
|
|
@@ -2318,7 +2338,8 @@ type OrnamentOptions = {
|
|
|
2318
2338
|
amount?: number;
|
|
2319
2339
|
/**
|
|
2320
2340
|
* Time signature, in any form that names one, used to tell strong positions
|
|
2321
|
-
* from weak ones.
|
|
2341
|
+
* from weak ones. A meter map is read bar by bar, so a note after a change
|
|
2342
|
+
* is weighed in the signature in force where it sounds.
|
|
2322
2343
|
*
|
|
2323
2344
|
* @defaultValue 4/4
|
|
2324
2345
|
*/
|
|
@@ -2663,8 +2684,9 @@ type SubstituteOptions = {
|
|
|
2663
2684
|
* tritone substitute of G7 formats as `Db7` and its chromatic mediants as `Bb`
|
|
2664
2685
|
* and `Eb`. Where the substitution's function and the bare pitch class disagree,
|
|
2665
2686
|
* the function decides — a tritone substitute is a bII7 and so is written on the
|
|
2666
|
-
* flattened supertonic of the chord it resolves to,
|
|
2667
|
-
*
|
|
2687
|
+
* flattened supertonic of the chord it resolves to, a borrowed chord takes the
|
|
2688
|
+
* spelling of the mode it is borrowed from, and a chromatic mediant is written
|
|
2689
|
+
* on the letter a third from the source root (E's mediants are G#, not Ab).
|
|
2668
2690
|
*
|
|
2669
2691
|
* @param chord The chord to reharmonize, as a chord symbol or as chord data.
|
|
2670
2692
|
* @param key The prevailing key, as a key name or as a key/scale.
|
|
@@ -2781,7 +2803,8 @@ type RhythmEvent = {
|
|
|
2781
2803
|
* @param pitch The MIDI pitch to give every note.
|
|
2782
2804
|
* @param velocity Velocity for every note; defaults to a mezzo-forte 96.
|
|
2783
2805
|
* @returns The note events, in the order given.
|
|
2784
|
-
* @throws If the pitch or the velocity is not a whole MIDI value in [0, 127]
|
|
2806
|
+
* @throws If the pitch or the velocity is not a whole MIDI value in [0, 127], or an event is not
|
|
2807
|
+
* a record with a finite position and duration.
|
|
2785
2808
|
* @example
|
|
2786
2809
|
* ```ts
|
|
2787
2810
|
* import { generateRhythm, humanize, rhythmToNoteEvents } from '@libraz/libcantus';
|
|
@@ -2867,4 +2890,5 @@ declare function generateRhythm(ts: MeterLike, opts?: RhythmOptions): RhythmEven
|
|
|
2867
2890
|
*/
|
|
2868
2891
|
declare function rhythmDensity(events: RhythmEvent[], ts: MeterLike): number;
|
|
2869
2892
|
|
|
2870
|
-
export {
|
|
2893
|
+
export { BAR_STEPS as B, COMPOSITION_PLAN_VERSION as C, DRUM_NOTES as D, GENRES as G, ORNAMENT_STYLES as T, PROVENANCE_BASES as W, BASS_STYLES as a, generateRhythm as aA, gridMetricWeight as aB, halfTime as aC, humanize as aD, mergeVocabulary as aE, modalInterchangePalette as aF, motifToNoteEvents as aG, negativeHarmonyMirror as aH, onsetWeightCurve as aI, ornament as aJ, ornamentBy as aK, pickProgressionPreset as aL, pickVocabulary as aM, progressions as aN, progressionsByStyle as aO, resolveContext as aP, rhythmDensity as aQ, rhythmToNoteEvents as aR, selectVocabulary as aS, substituteChord as aT, syncopate as aU, thin as aV, transformMotif as aW, vocabularyOfKind as aX, withinCeiling as aY, STEP_BEATS as ab, applyGrooveTemplate as aj, assertVocabulary as ak, deform as al, deriveCompositionPlan as am, developMotif as an, double as ao, doubleTime as ap, drumVoiceOf as aq, evaluateComposition as ar, extractGrooveTemplate as as, fitsQuery as at, generateBassLine as au, generateCounterMelody as av, generateDrums as aw, generateMelody as ax, generateMotif as ay, generateProgression as az, BEAT_STEPS as b, BORROWED_DEGREES as c };
|
|
2894
|
+
export type { PlannedSection as $, GrooveSlot as A, EuclideanKick as E, GrooveStyle as F, GrooveTemplate as H, HarmonizeOptions as I, HarmonizePlacement as J, HarmonizeResult as K, HumanizeOptions as L, MelodyNote as M, MelodyOptions as N, MotifCell as O, MotifContour as P, MotifNote as Q, MotifOptions as R, MotifTransform as S, OrnamentOptions as U, OrnamentStyle as V, PlannedChord as X, PlannedMotif as Y, PlannedPhrase as Z, PlannedRhythm as _, PreserveWeights as a0, ProgFunction as a1, ProgStyle as a2, ProgressionDegree as a3, ProgressionOptions as a4, ProgressionPreset as a5, Provenance as a6, ProvenanceBasis as a7, ResolvedContext as a8, RhythmEvent as a9, RhythmOptions as aa, Section as ac, SubstituteOptions as ad, Substitution as ae, SubstitutionType as af, SyncopateOptions as ag, Vocabulary as ah, VocabularyQuery as ai, BassLineOptions as d, BassSegment as e, BassStyle as f, BorrowedChord as g, Complexity as h, CompositionEvaluation as i, CompositionPlan as j, CompositionPlanOptions as k, CompositionViolation as l, CounterMelodyOptions as m, DeformOptions as n, Draw as o, DrumHit as p, DrumRole as q, DrumStyle as r, DrumVoice as s, DrumsOptions as t, EvaluateCompositionOptions as u, GenerationContext as v, GenerationContextInput as w, Genre as x, GridEvent as y, GrooveFeel as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as NoteEvent } from './index-
|
|
2
|
-
import { e as StringFingering, c as Limb, b as InstrumentProfileLike } from './positional-
|
|
1
|
+
import { h as NoteEvent } from './index-C9MYbuKS.cjs';
|
|
2
|
+
import { e as StringFingering, c as Limb, b as InstrumentProfileLike } from './positional-CscpxtlE.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* What makes a passage hard or impossible on an instrument.
|
|
@@ -453,7 +453,8 @@ declare function tempoAt(beat: number, map: TempoMap): number;
|
|
|
453
453
|
* @param beat Position or length in quarter-note beats.
|
|
454
454
|
* @param ppq Pulses (ticks) per quarter note, e.g. 96, 480, or 960.
|
|
455
455
|
* @returns The whole tick count.
|
|
456
|
-
* @throws If `beat` is not finite
|
|
456
|
+
* @throws If `beat` is not finite, `ppq` is not a positive integer, or the
|
|
457
|
+
* tick count is past the safe integers.
|
|
457
458
|
* @example
|
|
458
459
|
* ```ts
|
|
459
460
|
* import { beatsToTicks } from '@libraz/libcantus';
|
|
@@ -655,4 +656,5 @@ declare const JUST_RATIOS: Readonly<Record<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|
|
|
655
656
|
*/
|
|
656
657
|
declare function justDeviationCents(semitoneClass: number): number;
|
|
657
658
|
|
|
658
|
-
export { playability as A, ratioToCents as B, secondsToBeats as C,
|
|
659
|
+
export { playability as A, ratioToCents as B, secondsToBeats as C, stepOf as E, stepsOfCents as F, tempoAt as G, ticksToBeats as H, JUST_RATIOS as J, NOTE_VALUES as N, TWELVE_TET as T, beatsToDuration as l, beatsToSeconds as m, beatsToTicks as n, beatsToTiedDurations as o, centsBetweenFreq as p, centsFromNearestStep as q, centsOfSteps as r, centsToRatio as s, createNoteEventIndex as t, durationToBeats as u, durationToSeconds as v, edo as w, frequencyOf as x, justDeviationCents as y, nearestStep as z };
|
|
660
|
+
export type { DurationData as D, IndexedNoteEvent as I, OnsetTieBreak as O, PlayabilityIssue as P, SpelledDuration as S, NoteEventIndex as a, NoteEventIndexOptions as b, NotePlacement as c, NoteValue as d, PlayabilityIssueType as e, PlayabilityLayer as f, PlayabilityReport as g, TempoEvent as h, TempoMap as i, TuningTable as j, Tuplet as k };
|