@libraz/libcantus 1.1.0 → 1.3.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/README.md +4 -0
- package/README_ja.md +4 -0
- package/dist/analyze/index.cjs +31 -7
- package/dist/analyze/index.cjs.map +1 -1
- package/dist/analyze/index.d.cts +155 -9
- package/dist/analyze/index.d.ts +155 -9
- package/dist/analyze/index.js +37 -13
- package/dist/{chunk-TT6PKMPR.cjs → chunk-35NBV2FT.cjs} +16 -16
- package/dist/{chunk-TT6PKMPR.cjs.map → chunk-35NBV2FT.cjs.map} +1 -1
- package/dist/{chunk-YPB3A3EY.cjs → chunk-3R3QVKY5.cjs} +314 -285
- package/dist/chunk-3R3QVKY5.cjs.map +1 -0
- package/dist/{chunk-GDKE6RQW.cjs → chunk-4R2LWV7E.cjs} +691 -413
- package/dist/chunk-4R2LWV7E.cjs.map +1 -0
- package/dist/{chunk-RVS4G4MR.cjs → chunk-76ZBTRG2.cjs} +198 -198
- package/dist/{chunk-RVS4G4MR.cjs.map → chunk-76ZBTRG2.cjs.map} +1 -1
- package/dist/{chunk-X6RJAHII.js → chunk-7KG3RTYS.js} +2 -2
- package/dist/{chunk-PQL7E5F6.js → chunk-AGOVW7U6.js} +1 -1
- package/dist/{chunk-PQL7E5F6.js.map → chunk-AGOVW7U6.js.map} +1 -1
- package/dist/{chunk-5KW7DNCJ.cjs → chunk-B2PW6EHN.cjs} +2423 -453
- package/dist/chunk-B2PW6EHN.cjs.map +1 -0
- package/dist/{chunk-J772DL3B.cjs → chunk-CGBADIO5.cjs} +53 -53
- package/dist/{chunk-J772DL3B.cjs.map → chunk-CGBADIO5.cjs.map} +1 -1
- package/dist/{chunk-R5VUXQMP.js → chunk-CPMB7P75.js} +1978 -8
- package/dist/chunk-CPMB7P75.js.map +1 -0
- package/dist/{chunk-VLE5R7PF.js → chunk-GNVN4PPJ.js} +1874 -8
- package/dist/chunk-GNVN4PPJ.js.map +1 -0
- package/dist/{chunk-Q6R3QAZD.cjs → chunk-IFZDWIKM.cjs} +2199 -333
- package/dist/chunk-IFZDWIKM.cjs.map +1 -0
- package/dist/{chunk-DKICR7AN.js → chunk-IPEF6NWB.js} +296 -18
- package/dist/chunk-IPEF6NWB.js.map +1 -0
- package/dist/{chunk-AWEMD747.js → chunk-M5RYMAFI.js} +3 -3
- package/dist/{chunk-HSY2VQXZ.js → chunk-MLBPXA4Z.js} +330 -728
- package/dist/chunk-MLBPXA4Z.js.map +1 -0
- package/dist/{chunk-H66ARFU5.js → chunk-NB25P3EH.js} +3 -3
- package/dist/{chunk-5JJ6EHEZ.cjs → chunk-NM7UAMC3.cjs} +62 -62
- package/dist/{chunk-5JJ6EHEZ.cjs.map → chunk-NM7UAMC3.cjs.map} +1 -1
- package/dist/{chunk-R7B5N2JK.cjs → chunk-PM4XJE2Y.cjs} +47 -47
- package/dist/{chunk-R7B5N2JK.cjs.map → chunk-PM4XJE2Y.cjs.map} +1 -1
- package/dist/{chunk-7GOKQJTQ.js → chunk-PUKJP2Z5.js} +2 -2
- package/dist/{chunk-QCXYKSZS.cjs → chunk-PWC4CRWT.cjs} +19 -19
- package/dist/{chunk-QCXYKSZS.cjs.map → chunk-PWC4CRWT.cjs.map} +1 -1
- package/dist/{chunk-FPBZFNCD.js → chunk-RFIBF2RR.js} +47 -18
- package/dist/{chunk-FPBZFNCD.js.map → chunk-RFIBF2RR.js.map} +1 -1
- package/dist/{chunk-XKSO2V5I.cjs → chunk-S5BKZZGM.cjs} +1 -1
- package/dist/{chunk-XKSO2V5I.cjs.map → chunk-S5BKZZGM.cjs.map} +1 -1
- package/dist/{chunk-HOHFYGKW.js → chunk-UMWZ4ZET.js} +2 -2
- package/dist/{chunk-XVMJO3QF.cjs → chunk-YFA7X2F6.cjs} +489 -887
- package/dist/chunk-YFA7X2F6.cjs.map +1 -0
- package/dist/{chunk-57WB2EDF.js → chunk-ZBUROTJQ.js} +3 -3
- package/dist/{coerce-wwdELNYS.d.ts → coerce-DP0vYu-x.d.ts} +77 -1
- package/dist/{coerce-CJlgULrQ.d.cts → coerce-DRERzdve.d.cts} +77 -1
- package/dist/core/index.cjs +5 -5
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -4
- package/dist/generate/index.cjs +20 -8
- package/dist/generate/index.cjs.map +1 -1
- package/dist/generate/index.d.cts +87 -9
- package/dist/generate/index.d.ts +87 -9
- package/dist/generate/index.js +19 -7
- package/dist/{index-BaoKVVhE.d.cts → index-B9QLziDe.d.cts} +2 -2
- package/dist/{index-CnHQgqNh.d.ts → index-BHIUyjhZ.d.ts} +2 -2
- package/dist/{index-CBCP84rv.d.cts → index-BL5N2Oyz.d.cts} +1 -1
- package/dist/{index-D_hzxD8w.d.cts → index-BMweUlm5.d.cts} +3 -0
- package/dist/{index-Ci3xyows.d.ts → index-CL4b4gUQ.d.ts} +3 -0
- package/dist/{index-BzLNkmA7.d.cts → index-CY-3NVfy.d.cts} +486 -5
- package/dist/{index-CnIdP4EZ.d.ts → index-Dw2DP7vm.d.ts} +1 -1
- package/dist/{index-DpC-mDlV.d.ts → index-zaZdmnU4.d.ts} +486 -5
- package/dist/index.cjs +49 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +55 -19
- package/dist/{masks-O73Rhj5d.d.ts → masks-Cc7-MzzY.d.ts} +1 -1
- package/dist/{masks-C8TWLFIi.d.cts → masks-pADfTOiD.d.cts} +1 -1
- package/dist/model/index.cjs +12 -12
- package/dist/model/index.d.cts +213 -16
- package/dist/model/index.d.ts +213 -16
- package/dist/model/index.js +11 -11
- package/dist/{index-DTsKaPaC.d.cts → profile-CQMEqdH9.d.cts} +88 -601
- package/dist/{index-BUtIf2go.d.ts → profile-DLdlIpS9.d.ts} +88 -601
- package/dist/theory/index.cjs +5 -5
- package/dist/theory/index.d.cts +7 -7
- package/dist/theory/index.d.ts +7 -7
- package/dist/theory/index.js +4 -4
- package/dist/{index-BpWOhkkE.d.ts → types-D-XgxGvp.d.cts} +1170 -14
- package/dist/{index-B3WCj_Hm.d.cts → types-Dh7C064C.d.ts} +1170 -14
- package/package.json +6 -5
- package/dist/chunk-5KW7DNCJ.cjs.map +0 -1
- package/dist/chunk-DKICR7AN.js.map +0 -1
- package/dist/chunk-GDKE6RQW.cjs.map +0 -1
- package/dist/chunk-HSY2VQXZ.js.map +0 -1
- package/dist/chunk-Q6R3QAZD.cjs.map +0 -1
- package/dist/chunk-R5VUXQMP.js.map +0 -1
- package/dist/chunk-VLE5R7PF.js.map +0 -1
- package/dist/chunk-XVMJO3QF.cjs.map +0 -1
- package/dist/chunk-YPB3A3EY.cjs.map +0 -1
- /package/dist/{chunk-X6RJAHII.js.map → chunk-7KG3RTYS.js.map} +0 -0
- /package/dist/{chunk-AWEMD747.js.map → chunk-M5RYMAFI.js.map} +0 -0
- /package/dist/{chunk-H66ARFU5.js.map → chunk-NB25P3EH.js.map} +0 -0
- /package/dist/{chunk-7GOKQJTQ.js.map → chunk-PUKJP2Z5.js.map} +0 -0
- /package/dist/{chunk-HOHFYGKW.js.map → chunk-UMWZ4ZET.js.map} +0 -0
- /package/dist/{chunk-57WB2EDF.js.map → chunk-ZBUROTJQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spellLine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZBUROTJQ.js";
|
|
4
4
|
import "./chunk-QYQQ5J6E.js";
|
|
5
5
|
import {
|
|
6
6
|
Arrangement,
|
|
@@ -20,25 +20,20 @@ import {
|
|
|
20
20
|
Timeline,
|
|
21
21
|
Tuning,
|
|
22
22
|
Voicing
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IPEF6NWB.js";
|
|
24
24
|
import {
|
|
25
25
|
analyzeArrangement,
|
|
26
26
|
analyzePolyphony,
|
|
27
|
-
|
|
27
|
+
analyzeReference,
|
|
28
|
+
compareReferences,
|
|
28
29
|
createArrangementSession,
|
|
29
|
-
extractMotifs,
|
|
30
30
|
hypermeter,
|
|
31
|
-
melodicContour,
|
|
32
|
-
melodicSimilarity,
|
|
33
|
-
motifFromNotes,
|
|
34
31
|
phrasesFromTimeline,
|
|
35
|
-
reduceProgression,
|
|
36
|
-
relateMotifs,
|
|
37
32
|
sectionsFromNotes,
|
|
38
33
|
structuralCadences,
|
|
39
34
|
tensionCurve,
|
|
40
35
|
tensionCurveFrom
|
|
41
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MLBPXA4Z.js";
|
|
42
37
|
import {
|
|
43
38
|
JUST_RATIOS,
|
|
44
39
|
NOTE_VALUES,
|
|
@@ -63,13 +58,14 @@ import {
|
|
|
63
58
|
stepsOfCents,
|
|
64
59
|
tempoAt,
|
|
65
60
|
ticksToBeats
|
|
66
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UMWZ4ZET.js";
|
|
67
62
|
import {
|
|
68
63
|
BAR_STEPS,
|
|
69
64
|
BASS_LICKS,
|
|
70
65
|
BASS_STYLES,
|
|
71
66
|
BEAT_STEPS,
|
|
72
67
|
BORROWED_DEGREES,
|
|
68
|
+
COMPOSITION_PLAN_VERSION,
|
|
73
69
|
DRUM_KIT,
|
|
74
70
|
DRUM_NOTES,
|
|
75
71
|
DRUM_PATTERNS,
|
|
@@ -84,18 +80,22 @@ import {
|
|
|
84
80
|
PROVENANCE_BASES,
|
|
85
81
|
STEP_BEATS,
|
|
86
82
|
applyGrooveTemplate,
|
|
83
|
+
assertCompositionPlan,
|
|
87
84
|
assertVocabulary,
|
|
88
85
|
classifyMelodyTones,
|
|
89
86
|
deform,
|
|
87
|
+
deriveCompositionPlan,
|
|
90
88
|
developMotif,
|
|
91
89
|
double,
|
|
92
90
|
doubleTime,
|
|
93
91
|
drumVoiceOf,
|
|
92
|
+
evaluateComposition,
|
|
94
93
|
extractGrooveTemplate,
|
|
95
94
|
fitsQuery,
|
|
96
95
|
generateBassLine,
|
|
97
96
|
generateCounterMelody,
|
|
98
97
|
generateDrums,
|
|
98
|
+
generateMelody,
|
|
99
99
|
generateMotif,
|
|
100
100
|
generateProgression,
|
|
101
101
|
generateRhythm,
|
|
@@ -118,6 +118,7 @@ import {
|
|
|
118
118
|
pickVocabulary,
|
|
119
119
|
placeDrumPattern,
|
|
120
120
|
placeLicks,
|
|
121
|
+
planTimeline,
|
|
121
122
|
progressions,
|
|
122
123
|
progressionsByStyle,
|
|
123
124
|
resolveContext,
|
|
@@ -132,12 +133,21 @@ import {
|
|
|
132
133
|
transformMotif,
|
|
133
134
|
vocabularyOfKind,
|
|
134
135
|
withinCeiling
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-CPMB7P75.js";
|
|
136
137
|
import {
|
|
138
|
+
CADENCE_TYPES,
|
|
139
|
+
HARMONIC_FUNCTIONS,
|
|
140
|
+
MELODIC_CONTOUR_SHAPES,
|
|
137
141
|
MODAL_SCALE_NAMES,
|
|
142
|
+
MOTIF_RELATION_KINDS,
|
|
143
|
+
REDUCTION_LEVELS,
|
|
144
|
+
REFERENCE_PROFILE_VERSION,
|
|
145
|
+
RHYTHM_IOI_BINS,
|
|
138
146
|
analyzeChord,
|
|
147
|
+
analyzeRhythm,
|
|
139
148
|
analyzeVoice,
|
|
140
149
|
assertChordTimeline,
|
|
150
|
+
assertReferenceProfile,
|
|
141
151
|
augmentedSixthChord,
|
|
142
152
|
augmentedSixthFromPitchClasses,
|
|
143
153
|
augmentedSixthKind,
|
|
@@ -145,6 +155,7 @@ import {
|
|
|
145
155
|
chordTimelineFromChords,
|
|
146
156
|
chordTimelineFromNotes,
|
|
147
157
|
chordToRoman,
|
|
158
|
+
compareMelodies,
|
|
148
159
|
detectCadence,
|
|
149
160
|
detectCadences,
|
|
150
161
|
detectChord,
|
|
@@ -154,19 +165,26 @@ import {
|
|
|
154
165
|
detectKeyFromNotes,
|
|
155
166
|
detectModulations,
|
|
156
167
|
explainRoman,
|
|
168
|
+
extractMotifs,
|
|
157
169
|
functionOf,
|
|
158
170
|
isBorrowedChord,
|
|
159
171
|
isDiatonic,
|
|
160
172
|
isMinorKey,
|
|
161
173
|
keyTimelineFromNotes,
|
|
174
|
+
melodicContour,
|
|
175
|
+
melodicSimilarity,
|
|
176
|
+
motifFromNotes,
|
|
177
|
+
motifGraph,
|
|
162
178
|
pivotChords,
|
|
163
179
|
prevailingKeyOf,
|
|
180
|
+
reduceProgression,
|
|
181
|
+
relateMotifs,
|
|
164
182
|
romanToChord,
|
|
165
183
|
secondaryDominant,
|
|
166
184
|
secondaryDominantOf,
|
|
167
185
|
spellAugmentedSixth,
|
|
168
186
|
toVoiceNotes
|
|
169
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-GNVN4PPJ.js";
|
|
170
188
|
import {
|
|
171
189
|
ALGORITHM_VERSION,
|
|
172
190
|
BASS_4_STRING,
|
|
@@ -187,10 +205,10 @@ import {
|
|
|
187
205
|
resolveAlgorithmVersion,
|
|
188
206
|
toInstrumentProfile,
|
|
189
207
|
toStringedProfile
|
|
190
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-7KG3RTYS.js";
|
|
191
209
|
import {
|
|
192
210
|
createNoteEventIndex
|
|
193
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-PUKJP2Z5.js";
|
|
194
212
|
import "./chunk-K6OZXIR6.js";
|
|
195
213
|
import {
|
|
196
214
|
SATB_RANGES,
|
|
@@ -209,7 +227,7 @@ import {
|
|
|
209
227
|
voiceChordStyled,
|
|
210
228
|
voiceLeadingCost,
|
|
211
229
|
voiceProgression
|
|
212
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-M5RYMAFI.js";
|
|
213
231
|
import {
|
|
214
232
|
availableTensions,
|
|
215
233
|
avoidNotes,
|
|
@@ -218,7 +236,7 @@ import {
|
|
|
218
236
|
roleOf,
|
|
219
237
|
scaleMatchesChord,
|
|
220
238
|
scalesForChanges
|
|
221
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-NB25P3EH.js";
|
|
222
240
|
import {
|
|
223
241
|
ALTERED_MASK,
|
|
224
242
|
BLUES_MASK,
|
|
@@ -335,7 +353,7 @@ import {
|
|
|
335
353
|
tryResolveKeyName,
|
|
336
354
|
variantOfMask,
|
|
337
355
|
voiceIndependence
|
|
338
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-RFIBF2RR.js";
|
|
339
357
|
import {
|
|
340
358
|
ARTICULATIONS,
|
|
341
359
|
BudgetExceededError,
|
|
@@ -404,7 +422,7 @@ import {
|
|
|
404
422
|
tryParseNote,
|
|
405
423
|
tryParseTimeSignature,
|
|
406
424
|
tuplet
|
|
407
|
-
} from "./chunk-
|
|
425
|
+
} from "./chunk-AGOVW7U6.js";
|
|
408
426
|
export {
|
|
409
427
|
ALGORITHM_VERSION,
|
|
410
428
|
ALTERED_MASK,
|
|
@@ -419,7 +437,9 @@ export {
|
|
|
419
437
|
BLUES_MASK,
|
|
420
438
|
BORROWED_DEGREES,
|
|
421
439
|
BudgetExceededError,
|
|
440
|
+
CADENCE_TYPES,
|
|
422
441
|
CHROMATIC_MASK,
|
|
442
|
+
COMPOSITION_PLAN_VERSION,
|
|
423
443
|
Chord,
|
|
424
444
|
Composer,
|
|
425
445
|
ConsonanceClass,
|
|
@@ -435,6 +455,7 @@ export {
|
|
|
435
455
|
GENRES,
|
|
436
456
|
GUITAR_DROP_D,
|
|
437
457
|
GUITAR_STANDARD,
|
|
458
|
+
HARMONIC_FUNCTIONS,
|
|
438
459
|
HARMONIC_MINOR_MASK,
|
|
439
460
|
Instrument,
|
|
440
461
|
Interval,
|
|
@@ -452,6 +473,7 @@ export {
|
|
|
452
473
|
MAJOR_PENTATONIC_MASK,
|
|
453
474
|
MARWA_MASK,
|
|
454
475
|
MAX_DIFFICULTY,
|
|
476
|
+
MELODIC_CONTOUR_SHAPES,
|
|
455
477
|
MELODIC_MINOR_MASK,
|
|
456
478
|
MINOR_PENTATONIC_MASK,
|
|
457
479
|
MIN_ALGORITHM_VERSION,
|
|
@@ -460,6 +482,7 @@ export {
|
|
|
460
482
|
MIXOLYDIAN_MASK,
|
|
461
483
|
MIYAKO_BUSHI_MASK,
|
|
462
484
|
MODAL_SCALE_NAMES,
|
|
485
|
+
MOTIF_RELATION_KINDS,
|
|
463
486
|
Meter,
|
|
464
487
|
Motif,
|
|
465
488
|
NAMED_SCALES,
|
|
@@ -477,6 +500,9 @@ export {
|
|
|
477
500
|
PROVENANCE_BASES,
|
|
478
501
|
PURVI_MASK,
|
|
479
502
|
Progression,
|
|
503
|
+
REDUCTION_LEVELS,
|
|
504
|
+
REFERENCE_PROFILE_VERSION,
|
|
505
|
+
RHYTHM_IOI_BINS,
|
|
480
506
|
RITSU_MASK,
|
|
481
507
|
RYUKYU_MASK,
|
|
482
508
|
ReasonFlag,
|
|
@@ -498,9 +524,12 @@ export {
|
|
|
498
524
|
analyzeArrangement,
|
|
499
525
|
analyzeChord,
|
|
500
526
|
analyzePolyphony,
|
|
527
|
+
analyzeReference,
|
|
528
|
+
analyzeRhythm,
|
|
501
529
|
analyzeVoice,
|
|
502
530
|
applyGrooveTemplate,
|
|
503
531
|
assertChordTimeline,
|
|
532
|
+
assertCompositionPlan,
|
|
504
533
|
assertDegree,
|
|
505
534
|
assertFiniteNumber,
|
|
506
535
|
assertFiniteSemitones,
|
|
@@ -515,6 +544,7 @@ export {
|
|
|
515
544
|
assertOneOf,
|
|
516
545
|
assertPositiveInt,
|
|
517
546
|
assertRange,
|
|
547
|
+
assertReferenceProfile,
|
|
518
548
|
assertTimeSignature,
|
|
519
549
|
assertVocabulary,
|
|
520
550
|
augmentedSixthChord,
|
|
@@ -560,6 +590,7 @@ export {
|
|
|
560
590
|
classifyMelodyTones,
|
|
561
591
|
classifySpelledInterval,
|
|
562
592
|
compareMelodies,
|
|
593
|
+
compareReferences,
|
|
563
594
|
createArrangementSession,
|
|
564
595
|
createNoteEventIndex,
|
|
565
596
|
createPositionalRng,
|
|
@@ -573,6 +604,7 @@ export {
|
|
|
573
604
|
createsVoiceCrossing,
|
|
574
605
|
createsVoiceOverlap,
|
|
575
606
|
deform,
|
|
607
|
+
deriveCompositionPlan,
|
|
576
608
|
deriveSeed,
|
|
577
609
|
detectCadence,
|
|
578
610
|
detectCadences,
|
|
@@ -598,6 +630,7 @@ export {
|
|
|
598
630
|
edo,
|
|
599
631
|
enharmonicKeyOf,
|
|
600
632
|
enumerateSafePitches,
|
|
633
|
+
evaluateComposition,
|
|
601
634
|
evaluateSafety,
|
|
602
635
|
exceedsSpacing,
|
|
603
636
|
explainRoman,
|
|
@@ -618,6 +651,7 @@ export {
|
|
|
618
651
|
generateBassLine,
|
|
619
652
|
generateCounterMelody,
|
|
620
653
|
generateDrums,
|
|
654
|
+
generateMelody,
|
|
621
655
|
generateMotif,
|
|
622
656
|
generateProgression,
|
|
623
657
|
generateRhythm,
|
|
@@ -666,6 +700,7 @@ export {
|
|
|
666
700
|
minorKey,
|
|
667
701
|
modalInterchangePalette,
|
|
668
702
|
motifFromNotes,
|
|
703
|
+
motifGraph,
|
|
669
704
|
motifToNoteEvents,
|
|
670
705
|
namedScaleMask,
|
|
671
706
|
naturalPitchClassOf,
|
|
@@ -693,6 +728,7 @@ export {
|
|
|
693
728
|
pivotChords,
|
|
694
729
|
placeDrumPattern,
|
|
695
730
|
placeLicks,
|
|
731
|
+
planTimeline,
|
|
696
732
|
playability,
|
|
697
733
|
prevailingKeyOf,
|
|
698
734
|
profileWeights,
|
package/dist/model/index.cjs
CHANGED
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
22
|
-
require('../chunk-
|
|
23
|
-
require('../chunk-
|
|
24
|
-
require('../chunk-
|
|
25
|
-
require('../chunk-
|
|
26
|
-
require('../chunk-
|
|
27
|
-
require('../chunk-
|
|
19
|
+
var _chunk4R2LWV7Ecjs = require('../chunk-4R2LWV7E.cjs');
|
|
20
|
+
require('../chunk-YFA7X2F6.cjs');
|
|
21
|
+
require('../chunk-NM7UAMC3.cjs');
|
|
22
|
+
require('../chunk-B2PW6EHN.cjs');
|
|
23
|
+
require('../chunk-IFZDWIKM.cjs');
|
|
24
|
+
require('../chunk-CGBADIO5.cjs');
|
|
25
|
+
require('../chunk-35NBV2FT.cjs');
|
|
26
|
+
require('../chunk-76ZBTRG2.cjs');
|
|
27
|
+
require('../chunk-PM4XJE2Y.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunk3R3QVKY5cjs = require('../chunk-3R3QVKY5.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkS5BKZZGMcjs = require('../chunk-S5BKZZGM.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -55,5 +55,5 @@ var _chunkXKSO2V5Icjs = require('../chunk-XKSO2V5I.cjs');
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
exports.Arrangement =
|
|
58
|
+
exports.Arrangement = _chunk4R2LWV7Ecjs.Arrangement; exports.BudgetExceededError = _chunkS5BKZZGMcjs.BudgetExceededError; exports.Chord = _chunk4R2LWV7Ecjs.Chord; exports.Composer = _chunk4R2LWV7Ecjs.Composer; exports.Duration = _chunk4R2LWV7Ecjs.Duration; exports.Instrument = _chunk4R2LWV7Ecjs.Instrument; exports.Interval = _chunk4R2LWV7Ecjs.Interval; exports.InvalidInputError = _chunkS5BKZZGMcjs.InvalidInputError; exports.Key = _chunk4R2LWV7Ecjs.Key; exports.Meter = _chunk4R2LWV7Ecjs.Meter; exports.Motif = _chunk4R2LWV7Ecjs.Motif; exports.NoSolutionError = _chunkS5BKZZGMcjs.NoSolutionError; exports.Note = _chunk4R2LWV7Ecjs.Note; exports.NoteSafety = _chunk3R3QVKY5cjs.NoteSafety; exports.Progression = _chunk4R2LWV7Ecjs.Progression; exports.Rhythm = _chunk4R2LWV7Ecjs.Rhythm; exports.Score = _chunk4R2LWV7Ecjs.Score; exports.Tempo = _chunk4R2LWV7Ecjs.Tempo; exports.Timeline = _chunk4R2LWV7Ecjs.Timeline; exports.Tuning = _chunk4R2LWV7Ecjs.Tuning; exports.Voicing = _chunk4R2LWV7Ecjs.Voicing;
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
package/dist/model/index.d.cts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { b as ArrangementSession, f as
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { D as DetectChordOptions, C as ChordMatch, g as DetectKeyOptions, K as KeyMatch, d as AugmentedSixthKind, k as PhraseOptions, P as Phrase, S as StructuralCadence, h as HypermeterOptions, H as Hypermeter, R as ReferenceProfileOptions, c as ArrangementTrack, a as ArrangementOptions, A as ArrangementAnalysis, e as Conflict, n as TrackEdit, T as TensionPoint } from '../profile-CQMEqdH9.cjs';
|
|
2
|
+
export { b as ArrangementSession, f as ConflictPartner, j as ModalScaleName, l as PhraseSignal, m as TrackAnalysis, o as TrackRole } from '../profile-CQMEqdH9.cjs';
|
|
3
|
+
import { r as KeyRegion, i as ChordTimelineOptions, U as ReduceProgressionOptions, V as ReducedChord, c as CadenceHit, s as KeyTimelineOptions, k as ChordToRomanOptions, h as ChordTimeline, o as HarmonicFunction, A as AnalyzeChordOptions, D as DetectCadenceOptions, f as ChordAnalysis, d as CadenceResult, E as ExplainRomanOptions, a9 as RomanExplanation, b as BorrowedSource, n as FormSectionOptions, F as FormSection, m as ExtractMotifsOptions, x as MotifData, u as MelodicContour, a5 as ReferenceProfile, a8 as RhythmAnalysisOptions, a7 as RhythmAnalysis, J as MotifGraphOptions, y as MotifGraph, a as AnalyzedNote, I as IdentifiedVoiceNote, N as MotifRelation } from '../types-D-XgxGvp.cjs';
|
|
4
|
+
export { B as BarPositionProfile, e as CadenceType, g as ChordSegmentation, j as ChordTimelineResult, l as ContourDirection, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, v as MelodicContourShape, z as MotifGraphEdge, G as MotifGraphNode, L as MotifOccurrence, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a6 as RejectedCandidate, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote } from '../types-D-XgxGvp.cjs';
|
|
5
5
|
import { c as IntervalQualityLabel, I as IntervalData, P as ParseResult, S as SpelledInterval, g as Note$1, j as NoteNameOptions, b as IntervalLike, h as NoteEvent, i as NoteLike, e as KeyScale, a as Articulation } from '../index-Cy15oTvh.cjs';
|
|
6
6
|
export { B as BudgetExceededError, d as InvalidInputError, L as LibcantusError, N as NoSolutionError, k as NoteNameSystem } from '../index-Cy15oTvh.cjs';
|
|
7
|
-
import { K as KeyLike, e as ChordSegment, g as ChordSpan, b as Chord$1, d as ChordQuality, h as ChordSpec, i as ChordToneRole, n as ResolvedKey, k as KeyVariant, j as KeyRelation, c as ChordLike,
|
|
8
|
-
export { A as Alteration, a as AlteredDegree, C as ChordBase, f as ChordSeventh, N as NoteSafety, l as PitchSpelling, m as ProfileWeights, S as SafetyProfile,
|
|
7
|
+
import { K as KeyLike, e as ChordSegment, g as ChordSpan, b as Chord$1, d as ChordQuality, h as ChordSpec, i as ChordToneRole, n as ResolvedKey, k as KeyVariant, j as KeyRelation, c as ChordLike, r as SpelledKeyLike, p as SafetyQuery, E as EvaluateSafetyOptions, q as SafetyResult } from '../coerce-DRERzdve.cjs';
|
|
8
|
+
export { A as Alteration, a as AlteredDegree, C as ChordBase, f as ChordSeventh, N as NoteSafety, l as PitchSpelling, m as ProfileWeights, S as SafetyPartner, o as SafetyProfile, s as SpelledKeyScale, V as VoiceSnapshot } from '../coerce-DRERzdve.cjs';
|
|
9
9
|
import { j as TuningTable, i as TempoMap, g as PlayabilityReport, b as NoteEventIndexOptions, a as NoteEventIndex, d as NoteValue, k as Tuplet, D as DurationData, S as SpelledDuration } from '../index-cHvbYgJI.cjs';
|
|
10
10
|
export { I as IndexedNoteEvent, c as NotePlacement, O as OnsetTieBreak, P as PlayabilityIssue, e as PlayabilityIssueType, f as PlayabilityLayer, h as TempoEvent } from '../index-cHvbYgJI.cjs';
|
|
11
11
|
import { b as InstrumentProfileLike, d as PositionalRng, I as InstrumentProfile, e as StringFingering } from '../positional-DMZer-FM.cjs';
|
|
12
12
|
export { a as InstrumentProfileCommon, c as Limb, P as PercussionProfile, S as SeedPath, f as StringedProfile, V as ValidatedPercussionProfile, g as ValidatedProfile, h as ValidatedStringedProfile } from '../positional-DMZer-FM.cjs';
|
|
13
|
-
import { c as MeterMap, b as MeterLike, B as BarPosition, T as TimeSignature } from '../index-
|
|
14
|
-
export { M as MeterChange } from '../index-
|
|
15
|
-
import { s as ScaleNameInput, r as ScaleName } from '../masks-
|
|
16
|
-
import { n as TransposingInstrument, r as VoicingOptions, h as ScaleChoice, d as ChordSymbolOptions, m as StyledVoicingOptions, C as ChordScaleMatch, c as ChordScaleReportEntry, A as AvailableTensionsOptions, b as AvoidNotesOptions, K as KeyMode, i as ScaleSystem, q as VoiceRange, P as PartWritingOptions, e as PartWritingViolation, j as Species, k as SpeciesOptions, V as VoiceIndependenceOptions, p as VoiceIndependenceReport } from '../index-
|
|
17
|
-
export { a as AvoidNoteUse, f as PartWritingViolationKind, o as TransposingInstrumentName, s as VoicingStyle } from '../index-
|
|
18
|
-
import {
|
|
19
|
-
export { f as BassStyle, l as DrumRole, E as EuclideanKick,
|
|
20
|
-
import '../index-
|
|
13
|
+
import { c as MeterMap, b as MeterLike, B as BarPosition, T as TimeSignature } from '../index-BMweUlm5.cjs';
|
|
14
|
+
export { M as MeterChange } from '../index-BMweUlm5.cjs';
|
|
15
|
+
import { s as ScaleNameInput, r as ScaleName } from '../masks-pADfTOiD.cjs';
|
|
16
|
+
import { n as TransposingInstrument, r as VoicingOptions, h as ScaleChoice, d as ChordSymbolOptions, m as StyledVoicingOptions, C as ChordScaleMatch, c as ChordScaleReportEntry, A as AvailableTensionsOptions, b as AvoidNotesOptions, K as KeyMode, i as ScaleSystem, q as VoiceRange, P as PartWritingOptions, e as PartWritingViolation, j as Species, k as SpeciesOptions, V as VoiceIndependenceOptions, p as VoiceIndependenceReport } from '../index-B9QLziDe.cjs';
|
|
17
|
+
export { a as AvoidNoteUse, f as PartWritingViolationKind, o as TransposingInstrumentName, s as VoicingStyle } from '../index-B9QLziDe.cjs';
|
|
18
|
+
import { af as SubstitutionType, ad as SubstituteOptions, ae as Substitution, g as BorrowedChord, L as HumanizeOptions, U as OrnamentOptions, H as GrooveTemplate, j as CompositionPlan, u as EvaluateCompositionOptions, i as CompositionEvaluation, d as BassLineOptions, h as Complexity, ah as Vocabulary, a4 as ProgressionOptions, t as DrumsOptions, e as BassSegment, m as CounterMelodyOptions, I as HarmonizeOptions, k as CompositionPlanOptions, N as MelodyOptions, v as GenerationContext, O as MotifCell, P as MotifContour, w as GenerationContextInput, Q as MotifNote, S as MotifTransform, a9 as RhythmEvent, aa as RhythmOptions } from '../index-CY-3NVfy.cjs';
|
|
19
|
+
export { f as BassStyle, l as CompositionViolation, q as DrumRole, E as EuclideanKick, x as Genre, y as GridEvent, z as GrooveFeel, A as GrooveSlot, F as GrooveStyle, J as HarmonizePlacement, M as MelodyNote, V as OrnamentStyle, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, ac as Section } from '../index-CY-3NVfy.cjs';
|
|
20
|
+
import '../index-BL5N2Oyz.cjs';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* An immutable spelled interval value: a diatonic number, a quality label, and
|
|
@@ -3236,6 +3236,113 @@ declare class Score {
|
|
|
3236
3236
|
* answered for; {@link Score.voices} is what reads the polyphony as polyphony.
|
|
3237
3237
|
*/
|
|
3238
3238
|
contour(): MelodicContour;
|
|
3239
|
+
/**
|
|
3240
|
+
* The score's structural fingerprint: form, phrase shape, harmonic function
|
|
3241
|
+
* and rhythm, and how its motifs derive from one another.
|
|
3242
|
+
*
|
|
3243
|
+
* The harmony is the score's own kept chord analysis, read once whether this
|
|
3244
|
+
* is asked before or after {@link Score.timeline} — unless `opts.timeline`
|
|
3245
|
+
* gives the harmony directly, in which case the reading runs fresh through
|
|
3246
|
+
* {@link analyzeReference} rather than the harmony this score already holds.
|
|
3247
|
+
* The meter, the key and the span are the score's own and are not on offer
|
|
3248
|
+
* here: a caller wanting another meter reads through {@link
|
|
3249
|
+
* Score.withMeters}, and one wanting another key or span calls {@link
|
|
3250
|
+
* analyzeReference} directly.
|
|
3251
|
+
*
|
|
3252
|
+
* Asked with no options, the answer is kept and a copy of it handed back, as
|
|
3253
|
+
* {@link Score.timeline} keeps its own reading; asked with options, the
|
|
3254
|
+
* answer is read afresh and not kept.
|
|
3255
|
+
*
|
|
3256
|
+
* @param opts The harmony, the melody, and the budget; see {@link
|
|
3257
|
+
* ReferenceProfileOptions}. Meter, key and span are the score's own.
|
|
3258
|
+
* @returns The profile.
|
|
3259
|
+
* @example
|
|
3260
|
+
* ```ts
|
|
3261
|
+
* import { Score } from '@libraz/libcantus';
|
|
3262
|
+
* const triad = (pitches: number[], startBeat: number) =>
|
|
3263
|
+
* pitches.map((pitch) => ({ pitch, startBeat, durationBeat: 4 }));
|
|
3264
|
+
* const score = Score.of(
|
|
3265
|
+
* [
|
|
3266
|
+
* ...triad([60, 64, 67], 0),
|
|
3267
|
+
* ...triad([65, 69, 72], 4),
|
|
3268
|
+
* ...triad([67, 71, 74], 8),
|
|
3269
|
+
* ...triad([60, 64, 67], 12),
|
|
3270
|
+
* ],
|
|
3271
|
+
* { key: 'C major' },
|
|
3272
|
+
* );
|
|
3273
|
+
* score.reference().harmony.chords.map((chord) => chord.roman); // ['I', 'IV', 'V', 'I']
|
|
3274
|
+
* ```
|
|
3275
|
+
*/
|
|
3276
|
+
reference(opts?: Omit<ReferenceProfileOptions, 'ts' | 'meters' | 'key' | 'totalBeats'>): ReferenceProfile;
|
|
3277
|
+
/**
|
|
3278
|
+
* The onset placement of the score's melodic line.
|
|
3279
|
+
*
|
|
3280
|
+
* A melody is one line, so a score holding several is read as its top voice,
|
|
3281
|
+
* as {@link Score.motifs} and {@link Score.contour} are.
|
|
3282
|
+
*
|
|
3283
|
+
* @param opts The span's end and the budget; see {@link
|
|
3284
|
+
* RhythmAnalysisOptions}. The meter is the score's own.
|
|
3285
|
+
* @returns The rhythm reading.
|
|
3286
|
+
* @example
|
|
3287
|
+
* ```ts
|
|
3288
|
+
* import { Score } from '@libraz/libcantus';
|
|
3289
|
+
* const score = Score.of([
|
|
3290
|
+
* { pitch: 60, startBeat: 0, durationBeat: 1 },
|
|
3291
|
+
* { pitch: 62, startBeat: 1, durationBeat: 1 },
|
|
3292
|
+
* { pitch: 64, startBeat: 2, durationBeat: 1 },
|
|
3293
|
+
* { pitch: 65, startBeat: 3, durationBeat: 1 },
|
|
3294
|
+
* ]);
|
|
3295
|
+
* score.rhythm().onsetDensity; // 4
|
|
3296
|
+
* ```
|
|
3297
|
+
*/
|
|
3298
|
+
rhythm(opts?: Omit<RhythmAnalysisOptions, 'ts' | 'meters'>): RhythmAnalysis;
|
|
3299
|
+
/**
|
|
3300
|
+
* How the score's motifs derive from one another: which statement grew out
|
|
3301
|
+
* of which, and by what transformation.
|
|
3302
|
+
*
|
|
3303
|
+
* {@link Score.motifs} finds the cells; this reads across their occurrences
|
|
3304
|
+
* and names, for every statement after the first, the earlier one it most
|
|
3305
|
+
* plausibly grew out of. A melody is one line, so a score holding several is
|
|
3306
|
+
* read as its top voice, as {@link Score.motifs} is.
|
|
3307
|
+
*
|
|
3308
|
+
* @param opts Cell-length bounds and the recurrence threshold {@link
|
|
3309
|
+
* Score.motifs} takes, plus the variation threshold and the budget; see
|
|
3310
|
+
* {@link MotifGraphOptions} and {@link ExtractMotifsOptions}.
|
|
3311
|
+
* @returns The derivation forest.
|
|
3312
|
+
* @example
|
|
3313
|
+
* ```ts
|
|
3314
|
+
* import { Score } from '@libraz/libcantus';
|
|
3315
|
+
* const score = Score.of([
|
|
3316
|
+
* { pitch: 60, startBeat: 0, durationBeat: 1 },
|
|
3317
|
+
* { pitch: 62, startBeat: 1, durationBeat: 1 },
|
|
3318
|
+
* { pitch: 64, startBeat: 2, durationBeat: 1 },
|
|
3319
|
+
* { pitch: 60, startBeat: 3, durationBeat: 1 },
|
|
3320
|
+
* { pitch: 62, startBeat: 4, durationBeat: 1 },
|
|
3321
|
+
* { pitch: 64, startBeat: 5, durationBeat: 1 },
|
|
3322
|
+
* ]);
|
|
3323
|
+
* score.motifGraph().edges.length; // 1
|
|
3324
|
+
* ```
|
|
3325
|
+
*/
|
|
3326
|
+
motifGraph(opts?: MotifGraphOptions & ExtractMotifsOptions): MotifGraph;
|
|
3327
|
+
/**
|
|
3328
|
+
* How this score, read as a melody, keeps to a composition plan.
|
|
3329
|
+
*
|
|
3330
|
+
* @param plan The plan the melody was written for.
|
|
3331
|
+
* @param opts The budget; see {@link EvaluateCompositionOptions}.
|
|
3332
|
+
* @returns The violations found and the fit reading; see {@link
|
|
3333
|
+
* evaluateComposition}.
|
|
3334
|
+
* @example
|
|
3335
|
+
* ```ts
|
|
3336
|
+
* import { Composer, Score } from '@libraz/libcantus';
|
|
3337
|
+
* const notes = [60, 62, 64, 65, 67, 65, 64, 62, 60, 62, 64, 65, 67, 65, 64, 60].map(
|
|
3338
|
+
* (pitch, startBeat) => ({ pitch, startBeat, durationBeat: 1 }),
|
|
3339
|
+
* );
|
|
3340
|
+
* const composer = Composer.of({ key: 'C major', seed: 5 });
|
|
3341
|
+
* const plan = composer.plan(Score.of(notes, { key: 'C major' }).reference());
|
|
3342
|
+
* composer.melody(plan).evaluate(plan).violations.some((v) => v.severity === 'error'); // false
|
|
3343
|
+
* ```
|
|
3344
|
+
*/
|
|
3345
|
+
evaluate(plan: CompositionPlan, opts?: EvaluateCompositionOptions): CompositionEvaluation;
|
|
3239
3346
|
/**
|
|
3240
3347
|
* Each note's role in the harmony sounding under it.
|
|
3241
3348
|
*
|
|
@@ -3577,6 +3684,47 @@ declare class Arrangement {
|
|
|
3577
3684
|
* found under it.
|
|
3578
3685
|
*/
|
|
3579
3686
|
timeline(): Timeline;
|
|
3687
|
+
/**
|
|
3688
|
+
* The arrangement's structural fingerprint: form, phrase shape, harmonic
|
|
3689
|
+
* function and rhythm, and how its melody's motifs derive from one another.
|
|
3690
|
+
*
|
|
3691
|
+
* The harmony reads the arrangement's own session analysis directly — the
|
|
3692
|
+
* tracks `settings.harmonyTracks` names, or else every track but the
|
|
3693
|
+
* percussion ones — so the harmony is never inferred a second time. The
|
|
3694
|
+
* melody is the notes of the tracks played with `role: 'melody'`, joined in
|
|
3695
|
+
* the order the tracks were given; an arrangement naming none reads the top
|
|
3696
|
+
* line of the harmony notes instead, as {@link analyzeReference} does
|
|
3697
|
+
* without a `melody` option. Meter, key, harmony and melody are the
|
|
3698
|
+
* arrangement's own and are not on offer here: a caller wanting others calls
|
|
3699
|
+
* {@link analyzeReference} directly, with the same notes {@link
|
|
3700
|
+
* Arrangement.tracks} hands out.
|
|
3701
|
+
*
|
|
3702
|
+
* @param opts The budget; see {@link ReferenceProfileOptions}.
|
|
3703
|
+
* @returns The profile.
|
|
3704
|
+
* @example
|
|
3705
|
+
* ```ts
|
|
3706
|
+
* import { Arrangement } from '@libraz/libcantus';
|
|
3707
|
+
* const triad = (pitches: number[], startBeat: number) =>
|
|
3708
|
+
* pitches.map((pitch) => ({ pitch, startBeat, durationBeat: 4 }));
|
|
3709
|
+
* const arrangement = Arrangement.of(
|
|
3710
|
+
* [
|
|
3711
|
+
* {
|
|
3712
|
+
* name: 'lead',
|
|
3713
|
+
* role: 'melody',
|
|
3714
|
+
* notes: [
|
|
3715
|
+
* ...triad([60, 64, 67], 0),
|
|
3716
|
+
* ...triad([65, 69, 72], 4),
|
|
3717
|
+
* ...triad([67, 71, 74], 8),
|
|
3718
|
+
* ...triad([60, 64, 67], 12),
|
|
3719
|
+
* ],
|
|
3720
|
+
* },
|
|
3721
|
+
* ],
|
|
3722
|
+
* { key: 'C major' },
|
|
3723
|
+
* );
|
|
3724
|
+
* arrangement.reference().harmony.chords.map((chord) => chord.roman); // ['I', 'IV', 'V', 'I']
|
|
3725
|
+
* ```
|
|
3726
|
+
*/
|
|
3727
|
+
reference(opts?: Omit<ReferenceProfileOptions, 'ts' | 'meters' | 'key' | 'melody' | 'timeline' | 'totalBeats'>): ReferenceProfile;
|
|
3580
3728
|
/**
|
|
3581
3729
|
* Whether another arrangement holds the same tracks under the same settings.
|
|
3582
3730
|
*
|
|
@@ -3844,6 +3992,54 @@ declare class Composer {
|
|
|
3844
3992
|
* ```
|
|
3845
3993
|
*/
|
|
3846
3994
|
harmonize(melody: Score, opts?: Omit<HarmonizeOptions, 'melody' | 'key' | 'ts' | 'ctx'>): HarmonizedMelody;
|
|
3995
|
+
/**
|
|
3996
|
+
* A composition plan derived from a reference profile.
|
|
3997
|
+
*
|
|
3998
|
+
* The composer's key is the plan's home key unless `opts.key` names another,
|
|
3999
|
+
* and its seed and algorithm version are the ones the plan records, so the
|
|
4000
|
+
* plan is written under the same recipe as the composer's other parts.
|
|
4001
|
+
*
|
|
4002
|
+
* @param reference The reference profile to derive from.
|
|
4003
|
+
* @param opts Everything {@link deriveCompositionPlan} takes but the context,
|
|
4004
|
+
* which is the composer's.
|
|
4005
|
+
* @returns The plan.
|
|
4006
|
+
* @throws If the composer draws from a caller-held `rng`: a plan records its
|
|
4007
|
+
* seed, and a source cannot be written into it.
|
|
4008
|
+
* @example
|
|
4009
|
+
* ```ts
|
|
4010
|
+
* import { Composer, Score } from '@libraz/libcantus';
|
|
4011
|
+
* const notes = [60, 62, 64, 65, 67, 65, 64, 62, 60, 62, 64, 65, 67, 65, 64, 60].map(
|
|
4012
|
+
* (pitch, startBeat) => ({ pitch, startBeat, durationBeat: 1 }),
|
|
4013
|
+
* );
|
|
4014
|
+
* const reference = Score.of(notes, { key: 'C major' }).reference();
|
|
4015
|
+
* const plan = Composer.of({ key: 'D major', seed: 5 }).plan(reference);
|
|
4016
|
+
* plan.seed; // 5
|
|
4017
|
+
* plan.keys[0].scale.rootPc; // 2
|
|
4018
|
+
* ```
|
|
4019
|
+
*/
|
|
4020
|
+
plan(reference: ReferenceProfile, opts?: Omit<CompositionPlanOptions, 'ctx'>): CompositionPlan;
|
|
4021
|
+
/**
|
|
4022
|
+
* A melody written to a composition plan.
|
|
4023
|
+
*
|
|
4024
|
+
* The plan is the reproduction recipe, so its seed and algorithm version are
|
|
4025
|
+
* the ones the melody is drawn under, not the composer's. The score is read
|
|
4026
|
+
* in the plan's meter and home key, at the composer's tempo.
|
|
4027
|
+
*
|
|
4028
|
+
* @param plan The plan to follow.
|
|
4029
|
+
* @param opts The budget; see {@link MelodyOptions}.
|
|
4030
|
+
* @returns The melody, as a score.
|
|
4031
|
+
* @example
|
|
4032
|
+
* ```ts
|
|
4033
|
+
* import { Composer, Score } from '@libraz/libcantus';
|
|
4034
|
+
* const notes = [60, 62, 64, 65, 67, 65, 64, 62, 60, 62, 64, 65, 67, 65, 64, 60].map(
|
|
4035
|
+
* (pitch, startBeat) => ({ pitch, startBeat, durationBeat: 1 }),
|
|
4036
|
+
* );
|
|
4037
|
+
* const composer = Composer.of({ key: 'C major', seed: 5 });
|
|
4038
|
+
* const plan = composer.plan(Score.of(notes, { key: 'C major' }).reference());
|
|
4039
|
+
* composer.melody(plan).notes.length > 0; // true
|
|
4040
|
+
* ```
|
|
4041
|
+
*/
|
|
4042
|
+
melody(plan: CompositionPlan, opts?: Omit<MelodyOptions, 'ctx'>): Score;
|
|
3847
4043
|
/**
|
|
3848
4044
|
* Whether another composer holds the same settings.
|
|
3849
4045
|
*
|
|
@@ -5672,7 +5868,8 @@ declare class Voicing {
|
|
|
5672
5868
|
* @param pitch The candidate MIDI pitch.
|
|
5673
5869
|
* @param query The candidate's harmonic and voice-leading context.
|
|
5674
5870
|
* @param opts Set `suggestions: false` to skip the search for safe
|
|
5675
|
-
* replacements when the verdict is not safe
|
|
5871
|
+
* replacements when the verdict is not safe, and `partners: true` to learn
|
|
5872
|
+
* which voice of this voicing, by index, raised each pairwise flag.
|
|
5676
5873
|
* @returns The verdict, reason bitmask, and optional resolution guidance.
|
|
5677
5874
|
* @throws If the profile is unknown, a value names no chord or key, or a
|
|
5678
5875
|
* pitch is not a MIDI pitch in 0..127.
|
|
@@ -5749,4 +5946,4 @@ declare class Voicing {
|
|
|
5749
5946
|
toString(): string;
|
|
5750
5947
|
}
|
|
5751
5948
|
|
|
5752
|
-
export { AnalyzeChordOptions, AnalyzedNote, Arrangement, ArrangementAnalysis, type ArrangementData, ArrangementOptions, type ArrangementSettings, type ArrangementSetup, type ArrangementTensionOptions, ArrangementTrack, Articulation, AugmentedSixthKind, AvailableTensionsOptions, AvoidNotesOptions, BarPosition, BassLineOptions, type BassLineSettings, BassSegment, BorrowedChord, BorrowedSource, CadenceHit, CadenceResult, Chord, ChordAnalysis, Chord$1 as ChordData, ChordLike, ChordMatch, ChordQuality, ChordScaleMatch, ChordScaleReportEntry, ChordSegment, ChordSpan, ChordSpec, ChordSymbolOptions, ChordTimeline, ChordTimelineOptions, ChordToRomanOptions, ChordToneRole, Complexity, Composer, type ComposerOptions, Conflict, CounterMelodyOptions, type CounterMelodySettings, DetectCadenceOptions, DetectChordOptions, DetectKeyOptions, type DetectedKeyMatch, DrumsOptions, Duration, DurationData, EvaluateSafetyOptions, ExplainRomanOptions, ExtractMotifsOptions, FormSection, FormSectionOptions, GenerationContext, GenerationContextInput, GrooveTemplate, HarmonicFunction, HarmonizeOptions, type HarmonizedMelody, HumanizeOptions, Hypermeter, HypermeterOptions, IdentifiedVoiceNote, Instrument, InstrumentProfile, InstrumentProfileLike, Interval, IntervalData, IntervalLike, IntervalQualityLabel, Key, type KeyData, KeyLike, KeyMatch, KeyMode, KeyRegion, KeyRelation, KeyScale, KeyTimelineOptions, KeyVariant, MelodicContour, Meter, MeterLike, MeterMap, Motif, MotifCell, MotifContour, MotifData, type MotifGenerateOptions, MotifNote, MotifRelation, MotifTransform, Note, Note$1 as NoteData, NoteEvent, NoteEventIndex, NoteEventIndexOptions, NoteLike, NoteNameOptions, NoteValue, OrnamentOptions, ParseResult, PartWritingOptions, PartWritingViolation, Phrase, PhraseOptions, PlayabilityReport, PositionalRng, Progression, type ProgressionData, ProgressionOptions, ReduceProgressionOptions, ReducedChord, ResolvedKey, Rhythm, type RhythmData, type RhythmDeformOptions, RhythmEvent, RhythmOptions, RomanExplanation, SafetyQuery, SafetyResult, ScaleChoice, ScaleName, ScaleNameInput, ScaleSystem, Score, type ScoreData, type ScoreOptions, Species, SpeciesOptions, SpelledDuration, SpelledInterval, SpelledKeyLike, StringFingering, StructuralCadence, StyledVoicingOptions, SubstituteOptions, Substitution, SubstitutionType, Tempo, type TempoData, TempoMap, TensionPoint, TimeSignature, Timeline, type TimelineData, type TimelineRoman, TrackEdit, TransposingInstrument, Tuning, TuningTable, Tuplet, Vocabulary, VoiceIndependenceOptions, VoiceIndependenceReport, VoiceRange, Voicing, type VoicingData, type VoicingIndependenceOptions, VoicingOptions, type VoicingSafetyQuery };
|
|
5949
|
+
export { AnalyzeChordOptions, AnalyzedNote, Arrangement, ArrangementAnalysis, type ArrangementData, ArrangementOptions, type ArrangementSettings, type ArrangementSetup, type ArrangementTensionOptions, ArrangementTrack, Articulation, AugmentedSixthKind, AvailableTensionsOptions, AvoidNotesOptions, BarPosition, BassLineOptions, type BassLineSettings, BassSegment, BorrowedChord, BorrowedSource, CadenceHit, CadenceResult, Chord, ChordAnalysis, Chord$1 as ChordData, ChordLike, ChordMatch, ChordQuality, ChordScaleMatch, ChordScaleReportEntry, ChordSegment, ChordSpan, ChordSpec, ChordSymbolOptions, ChordTimeline, ChordTimelineOptions, ChordToRomanOptions, ChordToneRole, Complexity, Composer, type ComposerOptions, CompositionEvaluation, CompositionPlan, CompositionPlanOptions, Conflict, CounterMelodyOptions, type CounterMelodySettings, DetectCadenceOptions, DetectChordOptions, DetectKeyOptions, type DetectedKeyMatch, DrumsOptions, Duration, DurationData, EvaluateCompositionOptions, EvaluateSafetyOptions, ExplainRomanOptions, ExtractMotifsOptions, FormSection, FormSectionOptions, GenerationContext, GenerationContextInput, GrooveTemplate, HarmonicFunction, HarmonizeOptions, type HarmonizedMelody, HumanizeOptions, Hypermeter, HypermeterOptions, IdentifiedVoiceNote, Instrument, InstrumentProfile, InstrumentProfileLike, Interval, IntervalData, IntervalLike, IntervalQualityLabel, Key, type KeyData, KeyLike, KeyMatch, KeyMode, KeyRegion, KeyRelation, KeyScale, KeyTimelineOptions, KeyVariant, MelodicContour, MelodyOptions, Meter, MeterLike, MeterMap, Motif, MotifCell, MotifContour, MotifData, type MotifGenerateOptions, MotifGraph, MotifGraphOptions, MotifNote, MotifRelation, MotifTransform, Note, Note$1 as NoteData, NoteEvent, NoteEventIndex, NoteEventIndexOptions, NoteLike, NoteNameOptions, NoteValue, OrnamentOptions, ParseResult, PartWritingOptions, PartWritingViolation, Phrase, PhraseOptions, PlayabilityReport, PositionalRng, Progression, type ProgressionData, ProgressionOptions, ReduceProgressionOptions, ReducedChord, ReferenceProfile, ReferenceProfileOptions, ResolvedKey, Rhythm, RhythmAnalysis, RhythmAnalysisOptions, type RhythmData, type RhythmDeformOptions, RhythmEvent, RhythmOptions, RomanExplanation, SafetyQuery, SafetyResult, ScaleChoice, ScaleName, ScaleNameInput, ScaleSystem, Score, type ScoreData, type ScoreOptions, Species, SpeciesOptions, SpelledDuration, SpelledInterval, SpelledKeyLike, StringFingering, StructuralCadence, StyledVoicingOptions, SubstituteOptions, Substitution, SubstitutionType, Tempo, type TempoData, TempoMap, TensionPoint, TimeSignature, Timeline, type TimelineData, type TimelineRoman, TrackEdit, TransposingInstrument, Tuning, TuningTable, Tuplet, Vocabulary, VoiceIndependenceOptions, VoiceIndependenceReport, VoiceRange, Voicing, type VoicingData, type VoicingIndependenceOptions, VoicingOptions, type VoicingSafetyQuery };
|