@libraz/libcantus 0.9.4 → 0.9.5
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 +27 -18
- package/README_ja.md +268 -0
- package/dist/analyze/index.cjs +7 -7
- package/dist/analyze/index.d.cts +9 -99
- package/dist/analyze/index.d.ts +9 -99
- package/dist/analyze/index.js +6 -6
- package/dist/{chunk-36N73KZ3.cjs → chunk-2A2QMA74.cjs} +80 -65
- package/dist/chunk-2A2QMA74.cjs.map +1 -0
- package/dist/{chunk-YLEMGEFH.js → chunk-2PTFGVD7.js} +50 -35
- package/dist/chunk-2PTFGVD7.js.map +1 -0
- package/dist/{chunk-ZEJR4TKL.cjs → chunk-357ZDPVU.cjs} +36 -47
- package/dist/chunk-357ZDPVU.cjs.map +1 -0
- package/dist/{chunk-EHVEBWM5.js → chunk-3KX76RLG.js} +136 -37
- package/dist/chunk-3KX76RLG.js.map +1 -0
- package/dist/{chunk-RC6GBMCD.cjs → chunk-4VZ5MZAM.cjs} +155 -111
- package/dist/chunk-4VZ5MZAM.cjs.map +1 -0
- package/dist/{chunk-RK35RIN7.js → chunk-7EONYVI5.js} +115 -28
- package/dist/chunk-7EONYVI5.js.map +1 -0
- package/dist/{chunk-GQSGS2N4.js → chunk-7JEP3MFY.js} +5 -16
- package/dist/chunk-7JEP3MFY.js.map +1 -0
- package/dist/{chunk-7NKDPF74.js → chunk-AID75RN3.js} +203 -104
- package/dist/chunk-AID75RN3.js.map +1 -0
- package/dist/{chunk-FNDWXRRI.cjs → chunk-BSLTLGM3.cjs} +55 -37
- package/dist/chunk-BSLTLGM3.cjs.map +1 -0
- package/dist/{chunk-NP4NA2FB.cjs → chunk-CU6VG2YM.cjs} +39 -36
- package/dist/chunk-CU6VG2YM.cjs.map +1 -0
- package/dist/{chunk-NYYWMV2C.js → chunk-DZMHIGI4.js} +27 -17
- package/dist/chunk-DZMHIGI4.js.map +1 -0
- package/dist/{chunk-I24MV65U.js → chunk-EDOTEABK.js} +18 -15
- package/dist/{chunk-I24MV65U.js.map → chunk-EDOTEABK.js.map} +1 -1
- package/dist/{chunk-NKIBQ6PT.js → chunk-HN2OEUN2.js} +7 -4
- package/dist/chunk-HN2OEUN2.js.map +1 -0
- package/dist/{chunk-D2FAJBYL.js → chunk-KBTTEX7Q.js} +30 -12
- package/dist/chunk-KBTTEX7Q.js.map +1 -0
- package/dist/{chunk-CAN76NCU.cjs → chunk-KQN2ZYND.cjs} +147 -102
- package/dist/chunk-KQN2ZYND.cjs.map +1 -0
- package/dist/{chunk-4HLLZPXT.cjs → chunk-MPTVJIVG.cjs} +350 -251
- package/dist/chunk-MPTVJIVG.cjs.map +1 -0
- package/dist/{chunk-RUMU3UA6.cjs → chunk-MTMZTMWM.cjs} +12 -12
- package/dist/{chunk-RUMU3UA6.cjs.map → chunk-MTMZTMWM.cjs.map} +1 -1
- package/dist/{chunk-KMHOICIY.js → chunk-NNB67XA2.js} +90 -45
- package/dist/chunk-NNB67XA2.js.map +1 -0
- package/dist/{chunk-LW53AHQU.cjs → chunk-OL3IHHSJ.cjs} +228 -141
- package/dist/chunk-OL3IHHSJ.cjs.map +1 -0
- package/dist/{chunk-7MGZ7D62.cjs → chunk-PI3UXRWK.cjs} +43 -13
- package/dist/chunk-PI3UXRWK.cjs.map +1 -0
- package/dist/{chunk-XEBG3G53.js → chunk-R2VVFAIN.js} +42 -12
- package/dist/chunk-R2VVFAIN.js.map +1 -0
- package/dist/{chunk-Q6OP4U43.cjs → chunk-WFDXOLUB.cjs} +50 -40
- package/dist/chunk-WFDXOLUB.cjs.map +1 -0
- package/dist/{chunk-NVE34YGZ.cjs → chunk-WTAN4ACG.cjs} +212 -113
- package/dist/chunk-WTAN4ACG.cjs.map +1 -0
- package/dist/{chunk-FCANXBAT.cjs → chunk-YFJXS3AU.cjs} +8 -5
- package/dist/chunk-YFJXS3AU.cjs.map +1 -0
- package/dist/{chunk-Q2XUP227.js → chunk-YUE6TJ4M.js} +89 -45
- package/dist/chunk-YUE6TJ4M.js.map +1 -0
- package/dist/{chunk-HKGYCQ34.js → chunk-ZGLJM4A4.js} +2 -2
- package/dist/core/index.cjs +15 -5
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +14 -4
- package/dist/core/index.d.ts +14 -4
- package/dist/core/index.js +14 -4
- package/dist/{function-DNugAOrt.d.cts → function-CxixTB02.d.cts} +98 -7
- package/dist/{function-BtiZb9i9.d.ts → function-DTCt675z.d.ts} +98 -7
- package/dist/generate/index.cjs +10 -10
- package/dist/generate/index.d.cts +21 -21
- package/dist/generate/index.d.ts +21 -21
- package/dist/generate/index.js +9 -9
- package/dist/{index-tJhkmQgE.d.cts → index-B2Ulxxpo.d.cts} +3 -2
- package/dist/{index-Be74mcon.d.cts → index-BkYJ0xMq.d.cts} +2 -2
- package/dist/{index-6VR8-kit.d.ts → index-BuaB-ypt.d.ts} +3 -2
- package/dist/{index-70p168VM.d.ts → index-CAN7v-kw.d.ts} +9 -2
- package/dist/{index-C83mZI1P.d.ts → index-COw1Ky9g.d.ts} +1 -1
- package/dist/{index-tSQh-xwY.d.ts → index-Cfx8xgH0.d.ts} +1 -1
- package/dist/{index-C5UBbQ4G.d.ts → index-DRtIhlJj.d.ts} +2 -2
- package/dist/{index-BtXT6UQ0.d.cts → index-alrRninU.d.cts} +9 -2
- package/dist/{index-y_ak9_Hi.d.cts → index-oTQbYYIs.d.cts} +1 -1
- package/dist/{index-OG65ocOr.d.ts → index-tR9jTn26.d.cts} +4 -1
- package/dist/{index-OG65ocOr.d.cts → index-tR9jTn26.d.ts} +4 -1
- package/dist/{index-D6b6na69.d.cts → index-x2vcsduE.d.cts} +1 -1
- package/dist/index.cjs +24 -14
- 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 +23 -13
- package/dist/model/index.cjs +7 -7
- package/dist/model/index.d.cts +48 -16
- package/dist/model/index.d.ts +48 -16
- package/dist/model/index.js +6 -6
- package/dist/{styled-DIRkk9Uz.d.ts → styled-Bl0ZK28h.d.ts} +40 -3
- package/dist/{styled-DJbkJQfj.d.cts → styled-Crv6SA4S.d.cts} +40 -3
- package/dist/theory/index.cjs +6 -6
- package/dist/theory/index.d.cts +9 -9
- package/dist/theory/index.d.ts +9 -9
- package/dist/theory/index.js +5 -5
- package/package.json +12 -9
- package/dist/chunk-36N73KZ3.cjs.map +0 -1
- package/dist/chunk-4HLLZPXT.cjs.map +0 -1
- package/dist/chunk-7MGZ7D62.cjs.map +0 -1
- package/dist/chunk-7NKDPF74.js.map +0 -1
- package/dist/chunk-CAN76NCU.cjs.map +0 -1
- package/dist/chunk-D2FAJBYL.js.map +0 -1
- package/dist/chunk-EHVEBWM5.js.map +0 -1
- package/dist/chunk-FCANXBAT.cjs.map +0 -1
- package/dist/chunk-FNDWXRRI.cjs.map +0 -1
- package/dist/chunk-GQSGS2N4.js.map +0 -1
- package/dist/chunk-KMHOICIY.js.map +0 -1
- package/dist/chunk-LW53AHQU.cjs.map +0 -1
- package/dist/chunk-NKIBQ6PT.js.map +0 -1
- package/dist/chunk-NP4NA2FB.cjs.map +0 -1
- package/dist/chunk-NVE34YGZ.cjs.map +0 -1
- package/dist/chunk-NYYWMV2C.js.map +0 -1
- package/dist/chunk-Q2XUP227.js.map +0 -1
- package/dist/chunk-Q6OP4U43.cjs.map +0 -1
- package/dist/chunk-RC6GBMCD.cjs.map +0 -1
- package/dist/chunk-RK35RIN7.js.map +0 -1
- package/dist/chunk-XEBG3G53.js.map +0 -1
- package/dist/chunk-YLEMGEFH.js.map +0 -1
- package/dist/chunk-ZEJR4TKL.cjs.map +0 -1
- /package/dist/{chunk-HKGYCQ34.js.map → chunk-ZGLJM4A4.js.map} +0 -0
package/dist/model/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as DetectKeyOptions, D as DetectChordOptions, C as ChordMatch } from '../index-
|
|
2
|
-
import { H as HarmonicFunction, a as ChordAnalysis, C as Cadence, B as BorrowedSource } from '../function-
|
|
1
|
+
import { b as KeyVariant, a as DetectKeyOptions, K as KeyMatch, D as DetectChordOptions, C as ChordMatch } from '../index-alrRninU.cjs';
|
|
2
|
+
import { b as ChordToRomanOptions, H as HarmonicFunction, a as ChordAnalysis, C as Cadence, B as BorrowedSource } from '../function-CxixTB02.cjs';
|
|
3
|
+
import { I as IntervalQualityLabel, S as SpelledInterval, N as Note$1 } from '../index-tR9jTn26.cjs';
|
|
3
4
|
import { K as KeyScale } from '../types-BN6_Q9Kl.cjs';
|
|
4
|
-
import { a as ChordQuality, c as ChordSpan, C as Chord$1 } from '../index-
|
|
5
|
-
export { P as PitchSpelling } from '../index-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export { o as ScaleName, V as VoiceRange, s as VoicingStyle } from '../styled-DJbkJQfj.cjs';
|
|
5
|
+
import { a as ChordQuality, c as ChordSpan, C as Chord$1 } from '../index-oTQbYYIs.cjs';
|
|
6
|
+
export { P as PitchSpelling } from '../index-oTQbYYIs.cjs';
|
|
7
|
+
import { p as ScaleNameInput, r as VoicingOptions, n as ScaleChoice, q as StyledVoicingOptions, a as ChordScaleMatch } from '../styled-Crv6SA4S.cjs';
|
|
8
|
+
export { o as ScaleName, V as VoiceRange, s as VoicingStyle } from '../styled-Crv6SA4S.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An immutable spelled interval value: a diatonic number, a quality label, and
|
|
@@ -259,6 +259,10 @@ declare class Note {
|
|
|
259
259
|
toString(): string;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/** A detected key paired with the score and scale form that produced it. */
|
|
263
|
+
type DetectedKeyMatch = Omit<KeyMatch, 'key'> & {
|
|
264
|
+
key: Key;
|
|
265
|
+
};
|
|
262
266
|
/**
|
|
263
267
|
* An immutable key/scale: a `KeyScale` (root pitch class plus mode mask) paired
|
|
264
268
|
* with a spelled tonic that anchors letter-name spelling. Acts as the factory
|
|
@@ -278,8 +282,9 @@ declare class Key {
|
|
|
278
282
|
*
|
|
279
283
|
* @param scale The key/scale; its root is normalized to a pitch class.
|
|
280
284
|
* @param tonic The spelled tonic anchoring letter-name spelling.
|
|
285
|
+
* @param variant Optional detected scale form retained for display.
|
|
281
286
|
*/
|
|
282
|
-
constructor(scale: KeyScale, tonic: Note);
|
|
287
|
+
constructor(scale: KeyScale, tonic: Note, variant?: KeyVariant);
|
|
283
288
|
/**
|
|
284
289
|
* A major key.
|
|
285
290
|
*
|
|
@@ -308,7 +313,7 @@ declare class Key {
|
|
|
308
313
|
* @returns The key.
|
|
309
314
|
* @throws If the name is not a known scale.
|
|
310
315
|
*/
|
|
311
|
-
static named(name:
|
|
316
|
+
static named(name: ScaleNameInput, root: string | number): Key;
|
|
312
317
|
/**
|
|
313
318
|
* Wrap an existing `KeyScale`, synthesizing a spelled tonic when none is
|
|
314
319
|
* given.
|
|
@@ -344,6 +349,14 @@ declare class Key {
|
|
|
344
349
|
* @returns Ranked keys (may be empty).
|
|
345
350
|
*/
|
|
346
351
|
static detect(pitches: readonly number[], opts?: DetectKeyOptions): Key[];
|
|
352
|
+
/**
|
|
353
|
+
* Identify keys while retaining each candidate's score, fit, and scale form.
|
|
354
|
+
*
|
|
355
|
+
* @param pitches MIDI pitches or bare pitch classes.
|
|
356
|
+
* @param opts How to weigh the input; see {@link DetectKeyOptions}.
|
|
357
|
+
* @returns Ranked key matches (may be empty).
|
|
358
|
+
*/
|
|
359
|
+
static detectMatches(pitches: readonly number[], opts?: DetectKeyOptions): DetectedKeyMatch[];
|
|
347
360
|
/**
|
|
348
361
|
* The single best key interpretation of a pitch set.
|
|
349
362
|
*
|
|
@@ -375,6 +388,8 @@ declare class Key {
|
|
|
375
388
|
get rootPc(): number;
|
|
376
389
|
/** Whether the scale has a minor third and no major third. */
|
|
377
390
|
get isMinor(): boolean;
|
|
391
|
+
/** The detected scale form, when this key came from key detection. */
|
|
392
|
+
get variant(): KeyVariant | undefined;
|
|
378
393
|
/**
|
|
379
394
|
* The scale's pitch classes in ascending scale-degree order (degree 0 first).
|
|
380
395
|
*
|
|
@@ -481,8 +496,7 @@ declare class Key {
|
|
|
481
496
|
};
|
|
482
497
|
/**
|
|
483
498
|
* The key's tonic and mode, so a template literal or a log line reads as the
|
|
484
|
-
* key.
|
|
485
|
-
* a scale name.
|
|
499
|
+
* key. Detected harmonic and melodic minor keys retain their scale form.
|
|
486
500
|
*
|
|
487
501
|
* @returns The name, e.g. `'C major'` or `'A minor'`.
|
|
488
502
|
*/
|
|
@@ -600,10 +614,11 @@ declare class Progression {
|
|
|
600
614
|
* The Roman numeral of each chord in a key.
|
|
601
615
|
*
|
|
602
616
|
* @param key Key to analyze in; falls back to the carried context.
|
|
617
|
+
* @param opts Applied-numeral rendering options.
|
|
603
618
|
* @returns One numeral per chord.
|
|
604
619
|
* @throws If no key is given and none is carried.
|
|
605
620
|
*/
|
|
606
|
-
roman(key?: Key): string[];
|
|
621
|
+
roman(key?: Key, opts?: ChordToRomanOptions): string[];
|
|
607
622
|
/**
|
|
608
623
|
* The harmonic function of each chord in a key.
|
|
609
624
|
*
|
|
@@ -619,13 +634,20 @@ declare class Progression {
|
|
|
619
634
|
* progression has fewer than two chords.
|
|
620
635
|
*
|
|
621
636
|
* @param key Key to analyze in; falls back to the carried context.
|
|
637
|
+
* @param opts Applied-numeral rendering options.
|
|
622
638
|
* @returns Per-chord analyses and the closing cadence.
|
|
623
639
|
* @throws If no key is given and none is carried.
|
|
624
640
|
*/
|
|
625
|
-
analyze(key?: Key): {
|
|
641
|
+
analyze(key?: Key, opts?: ChordToRomanOptions): {
|
|
626
642
|
chords: ChordAnalysis[];
|
|
627
643
|
cadence: Cadence;
|
|
628
644
|
};
|
|
645
|
+
/**
|
|
646
|
+
* Choose one compatible scale for every chord, favoring smooth changes.
|
|
647
|
+
*
|
|
648
|
+
* @returns One scale choice per chord in this progression.
|
|
649
|
+
*/
|
|
650
|
+
scales(): ScaleChoice[];
|
|
629
651
|
/**
|
|
630
652
|
* The plain progression data, for JSON serialization.
|
|
631
653
|
*
|
|
@@ -657,6 +679,14 @@ declare class Progression {
|
|
|
657
679
|
* @returns The symbols in order, e.g. `'C Am F G'`.
|
|
658
680
|
*/
|
|
659
681
|
toString(): string;
|
|
682
|
+
/**
|
|
683
|
+
* The plain progression data, for JSON serialization.
|
|
684
|
+
*
|
|
685
|
+
* Private class fields do not serialize, so this preserves both the chord
|
|
686
|
+
* data and any carried key in `JSON.stringify(progression)`.
|
|
687
|
+
*
|
|
688
|
+
* @returns The chord data sequence and the carried key, if any.
|
|
689
|
+
*/
|
|
660
690
|
toJSON(): {
|
|
661
691
|
chords: Chord$1[];
|
|
662
692
|
key: {
|
|
@@ -807,10 +837,11 @@ declare class Chord {
|
|
|
807
837
|
* The chord's Roman numeral in a key.
|
|
808
838
|
*
|
|
809
839
|
* @param key Key to analyze in; falls back to the carried context.
|
|
840
|
+
* @param opts Applied-numeral rendering options.
|
|
810
841
|
* @returns The Roman numeral string.
|
|
811
842
|
* @throws If no key is given and none is carried.
|
|
812
843
|
*/
|
|
813
|
-
roman(key?: Key): string;
|
|
844
|
+
roman(key?: Key, opts?: ChordToRomanOptions): string;
|
|
814
845
|
/**
|
|
815
846
|
* The chord's harmonic function (tonic / subdominant / dominant) in a key.
|
|
816
847
|
*
|
|
@@ -823,10 +854,11 @@ declare class Chord {
|
|
|
823
854
|
* Full functional analysis: function, borrowing, and Roman numeral.
|
|
824
855
|
*
|
|
825
856
|
* @param key Key to analyze in; falls back to the carried context.
|
|
857
|
+
* @param opts Applied-numeral rendering options.
|
|
826
858
|
* @returns The chord analysis.
|
|
827
859
|
* @throws If no key is given and none is carried.
|
|
828
860
|
*/
|
|
829
|
-
analyze(key?: Key): ChordAnalysis;
|
|
861
|
+
analyze(key?: Key, opts?: ChordToRomanOptions): ChordAnalysis;
|
|
830
862
|
/**
|
|
831
863
|
* Whether the chord is borrowed from the parallel mode (modal interchange).
|
|
832
864
|
*
|
|
@@ -986,4 +1018,4 @@ declare class Chord {
|
|
|
986
1018
|
toString(): string;
|
|
987
1019
|
}
|
|
988
1020
|
|
|
989
|
-
export { BorrowedSource, Cadence, Chord, ChordAnalysis, Chord$1 as ChordData, ChordMatch, ChordQuality, ChordScaleMatch, ChordSpan, DetectChordOptions, DetectKeyOptions, HarmonicFunction, Interval, IntervalQualityLabel, Key, KeyScale, Note, Note$1 as NoteData, Progression, ScaleNameInput, SpelledInterval, StyledVoicingOptions, VoicingOptions };
|
|
1021
|
+
export { BorrowedSource, Cadence, Chord, ChordAnalysis, Chord$1 as ChordData, ChordMatch, ChordQuality, ChordScaleMatch, ChordSpan, ChordToRomanOptions, DetectChordOptions, DetectKeyOptions, type DetectedKeyMatch, HarmonicFunction, Interval, IntervalQualityLabel, Key, KeyMatch, KeyScale, KeyVariant, Note, Note$1 as NoteData, Progression, ScaleChoice, ScaleNameInput, SpelledInterval, StyledVoicingOptions, VoicingOptions };
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as DetectKeyOptions, D as DetectChordOptions, C as ChordMatch } from '../index-
|
|
2
|
-
import { H as HarmonicFunction, a as ChordAnalysis, C as Cadence, B as BorrowedSource } from '../function-
|
|
1
|
+
import { b as KeyVariant, a as DetectKeyOptions, K as KeyMatch, D as DetectChordOptions, C as ChordMatch } from '../index-CAN7v-kw.js';
|
|
2
|
+
import { b as ChordToRomanOptions, H as HarmonicFunction, a as ChordAnalysis, C as Cadence, B as BorrowedSource } from '../function-DTCt675z.js';
|
|
3
|
+
import { I as IntervalQualityLabel, S as SpelledInterval, N as Note$1 } from '../index-tR9jTn26.js';
|
|
3
4
|
import { K as KeyScale } from '../types-BN6_Q9Kl.js';
|
|
4
|
-
import { a as ChordQuality, c as ChordSpan, C as Chord$1 } from '../index-
|
|
5
|
-
export { P as PitchSpelling } from '../index-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export { o as ScaleName, V as VoiceRange, s as VoicingStyle } from '../styled-DIRkk9Uz.js';
|
|
5
|
+
import { a as ChordQuality, c as ChordSpan, C as Chord$1 } from '../index-COw1Ky9g.js';
|
|
6
|
+
export { P as PitchSpelling } from '../index-COw1Ky9g.js';
|
|
7
|
+
import { p as ScaleNameInput, r as VoicingOptions, n as ScaleChoice, q as StyledVoicingOptions, a as ChordScaleMatch } from '../styled-Bl0ZK28h.js';
|
|
8
|
+
export { o as ScaleName, V as VoiceRange, s as VoicingStyle } from '../styled-Bl0ZK28h.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An immutable spelled interval value: a diatonic number, a quality label, and
|
|
@@ -259,6 +259,10 @@ declare class Note {
|
|
|
259
259
|
toString(): string;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/** A detected key paired with the score and scale form that produced it. */
|
|
263
|
+
type DetectedKeyMatch = Omit<KeyMatch, 'key'> & {
|
|
264
|
+
key: Key;
|
|
265
|
+
};
|
|
262
266
|
/**
|
|
263
267
|
* An immutable key/scale: a `KeyScale` (root pitch class plus mode mask) paired
|
|
264
268
|
* with a spelled tonic that anchors letter-name spelling. Acts as the factory
|
|
@@ -278,8 +282,9 @@ declare class Key {
|
|
|
278
282
|
*
|
|
279
283
|
* @param scale The key/scale; its root is normalized to a pitch class.
|
|
280
284
|
* @param tonic The spelled tonic anchoring letter-name spelling.
|
|
285
|
+
* @param variant Optional detected scale form retained for display.
|
|
281
286
|
*/
|
|
282
|
-
constructor(scale: KeyScale, tonic: Note);
|
|
287
|
+
constructor(scale: KeyScale, tonic: Note, variant?: KeyVariant);
|
|
283
288
|
/**
|
|
284
289
|
* A major key.
|
|
285
290
|
*
|
|
@@ -308,7 +313,7 @@ declare class Key {
|
|
|
308
313
|
* @returns The key.
|
|
309
314
|
* @throws If the name is not a known scale.
|
|
310
315
|
*/
|
|
311
|
-
static named(name:
|
|
316
|
+
static named(name: ScaleNameInput, root: string | number): Key;
|
|
312
317
|
/**
|
|
313
318
|
* Wrap an existing `KeyScale`, synthesizing a spelled tonic when none is
|
|
314
319
|
* given.
|
|
@@ -344,6 +349,14 @@ declare class Key {
|
|
|
344
349
|
* @returns Ranked keys (may be empty).
|
|
345
350
|
*/
|
|
346
351
|
static detect(pitches: readonly number[], opts?: DetectKeyOptions): Key[];
|
|
352
|
+
/**
|
|
353
|
+
* Identify keys while retaining each candidate's score, fit, and scale form.
|
|
354
|
+
*
|
|
355
|
+
* @param pitches MIDI pitches or bare pitch classes.
|
|
356
|
+
* @param opts How to weigh the input; see {@link DetectKeyOptions}.
|
|
357
|
+
* @returns Ranked key matches (may be empty).
|
|
358
|
+
*/
|
|
359
|
+
static detectMatches(pitches: readonly number[], opts?: DetectKeyOptions): DetectedKeyMatch[];
|
|
347
360
|
/**
|
|
348
361
|
* The single best key interpretation of a pitch set.
|
|
349
362
|
*
|
|
@@ -375,6 +388,8 @@ declare class Key {
|
|
|
375
388
|
get rootPc(): number;
|
|
376
389
|
/** Whether the scale has a minor third and no major third. */
|
|
377
390
|
get isMinor(): boolean;
|
|
391
|
+
/** The detected scale form, when this key came from key detection. */
|
|
392
|
+
get variant(): KeyVariant | undefined;
|
|
378
393
|
/**
|
|
379
394
|
* The scale's pitch classes in ascending scale-degree order (degree 0 first).
|
|
380
395
|
*
|
|
@@ -481,8 +496,7 @@ declare class Key {
|
|
|
481
496
|
};
|
|
482
497
|
/**
|
|
483
498
|
* The key's tonic and mode, so a template literal or a log line reads as the
|
|
484
|
-
* key.
|
|
485
|
-
* a scale name.
|
|
499
|
+
* key. Detected harmonic and melodic minor keys retain their scale form.
|
|
486
500
|
*
|
|
487
501
|
* @returns The name, e.g. `'C major'` or `'A minor'`.
|
|
488
502
|
*/
|
|
@@ -600,10 +614,11 @@ declare class Progression {
|
|
|
600
614
|
* The Roman numeral of each chord in a key.
|
|
601
615
|
*
|
|
602
616
|
* @param key Key to analyze in; falls back to the carried context.
|
|
617
|
+
* @param opts Applied-numeral rendering options.
|
|
603
618
|
* @returns One numeral per chord.
|
|
604
619
|
* @throws If no key is given and none is carried.
|
|
605
620
|
*/
|
|
606
|
-
roman(key?: Key): string[];
|
|
621
|
+
roman(key?: Key, opts?: ChordToRomanOptions): string[];
|
|
607
622
|
/**
|
|
608
623
|
* The harmonic function of each chord in a key.
|
|
609
624
|
*
|
|
@@ -619,13 +634,20 @@ declare class Progression {
|
|
|
619
634
|
* progression has fewer than two chords.
|
|
620
635
|
*
|
|
621
636
|
* @param key Key to analyze in; falls back to the carried context.
|
|
637
|
+
* @param opts Applied-numeral rendering options.
|
|
622
638
|
* @returns Per-chord analyses and the closing cadence.
|
|
623
639
|
* @throws If no key is given and none is carried.
|
|
624
640
|
*/
|
|
625
|
-
analyze(key?: Key): {
|
|
641
|
+
analyze(key?: Key, opts?: ChordToRomanOptions): {
|
|
626
642
|
chords: ChordAnalysis[];
|
|
627
643
|
cadence: Cadence;
|
|
628
644
|
};
|
|
645
|
+
/**
|
|
646
|
+
* Choose one compatible scale for every chord, favoring smooth changes.
|
|
647
|
+
*
|
|
648
|
+
* @returns One scale choice per chord in this progression.
|
|
649
|
+
*/
|
|
650
|
+
scales(): ScaleChoice[];
|
|
629
651
|
/**
|
|
630
652
|
* The plain progression data, for JSON serialization.
|
|
631
653
|
*
|
|
@@ -657,6 +679,14 @@ declare class Progression {
|
|
|
657
679
|
* @returns The symbols in order, e.g. `'C Am F G'`.
|
|
658
680
|
*/
|
|
659
681
|
toString(): string;
|
|
682
|
+
/**
|
|
683
|
+
* The plain progression data, for JSON serialization.
|
|
684
|
+
*
|
|
685
|
+
* Private class fields do not serialize, so this preserves both the chord
|
|
686
|
+
* data and any carried key in `JSON.stringify(progression)`.
|
|
687
|
+
*
|
|
688
|
+
* @returns The chord data sequence and the carried key, if any.
|
|
689
|
+
*/
|
|
660
690
|
toJSON(): {
|
|
661
691
|
chords: Chord$1[];
|
|
662
692
|
key: {
|
|
@@ -807,10 +837,11 @@ declare class Chord {
|
|
|
807
837
|
* The chord's Roman numeral in a key.
|
|
808
838
|
*
|
|
809
839
|
* @param key Key to analyze in; falls back to the carried context.
|
|
840
|
+
* @param opts Applied-numeral rendering options.
|
|
810
841
|
* @returns The Roman numeral string.
|
|
811
842
|
* @throws If no key is given and none is carried.
|
|
812
843
|
*/
|
|
813
|
-
roman(key?: Key): string;
|
|
844
|
+
roman(key?: Key, opts?: ChordToRomanOptions): string;
|
|
814
845
|
/**
|
|
815
846
|
* The chord's harmonic function (tonic / subdominant / dominant) in a key.
|
|
816
847
|
*
|
|
@@ -823,10 +854,11 @@ declare class Chord {
|
|
|
823
854
|
* Full functional analysis: function, borrowing, and Roman numeral.
|
|
824
855
|
*
|
|
825
856
|
* @param key Key to analyze in; falls back to the carried context.
|
|
857
|
+
* @param opts Applied-numeral rendering options.
|
|
826
858
|
* @returns The chord analysis.
|
|
827
859
|
* @throws If no key is given and none is carried.
|
|
828
860
|
*/
|
|
829
|
-
analyze(key?: Key): ChordAnalysis;
|
|
861
|
+
analyze(key?: Key, opts?: ChordToRomanOptions): ChordAnalysis;
|
|
830
862
|
/**
|
|
831
863
|
* Whether the chord is borrowed from the parallel mode (modal interchange).
|
|
832
864
|
*
|
|
@@ -986,4 +1018,4 @@ declare class Chord {
|
|
|
986
1018
|
toString(): string;
|
|
987
1019
|
}
|
|
988
1020
|
|
|
989
|
-
export { BorrowedSource, Cadence, Chord, ChordAnalysis, Chord$1 as ChordData, ChordMatch, ChordQuality, ChordScaleMatch, ChordSpan, DetectChordOptions, DetectKeyOptions, HarmonicFunction, Interval, IntervalQualityLabel, Key, KeyScale, Note, Note$1 as NoteData, Progression, ScaleNameInput, SpelledInterval, StyledVoicingOptions, VoicingOptions };
|
|
1021
|
+
export { BorrowedSource, Cadence, Chord, ChordAnalysis, Chord$1 as ChordData, ChordMatch, ChordQuality, ChordScaleMatch, ChordSpan, ChordToRomanOptions, DetectChordOptions, DetectKeyOptions, type DetectedKeyMatch, HarmonicFunction, Interval, IntervalQualityLabel, Key, KeyMatch, KeyScale, KeyVariant, Note, Note$1 as NoteData, Progression, ScaleChoice, ScaleNameInput, SpelledInterval, StyledVoicingOptions, VoicingOptions };
|
package/dist/model/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
Key,
|
|
5
5
|
Note,
|
|
6
6
|
Progression
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-3KX76RLG.js";
|
|
8
|
+
import "../chunk-7JEP3MFY.js";
|
|
9
|
+
import "../chunk-NNB67XA2.js";
|
|
10
|
+
import "../chunk-7EONYVI5.js";
|
|
11
|
+
import "../chunk-KBTTEX7Q.js";
|
|
12
|
+
import "../chunk-R2VVFAIN.js";
|
|
13
13
|
export {
|
|
14
14
|
Chord,
|
|
15
15
|
Interval,
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { C as Chord } from './index-
|
|
1
|
+
import { C as Chord } from './index-COw1Ky9g.js';
|
|
2
2
|
import { K as KeyScale } from './types-BN6_Q9Kl.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Build a 12-bit mode mask from a list of semitone offsets above the root.
|
|
6
|
+
*
|
|
7
|
+
* Bit 0 (the root) is always set, enforcing the `KeyScale` invariant that the
|
|
8
|
+
* root is a scale tone even when the offset list omits 0.
|
|
9
|
+
*
|
|
10
|
+
* @category Scales
|
|
11
|
+
*/
|
|
4
12
|
declare function maskFromOffsets(offsets: readonly number[]): number;
|
|
5
13
|
/**
|
|
6
14
|
* Mode mask for the major (Ionian) scale: offsets {0, 2, 4, 5, 7, 9, 11}.
|
|
@@ -239,8 +247,8 @@ type ChordScaleMatch = {
|
|
|
239
247
|
* conventional chord-scale relationship. Every entry of {@link NAMED_SCALES}
|
|
240
248
|
* whose pitch-class set is a superset of the chord's is returned once per
|
|
241
249
|
* distinct pitch-class set (aliased masks such as major/ionian report only the
|
|
242
|
-
* modal name), ranked by fewest extra scale tones beyond the chord
|
|
243
|
-
*
|
|
250
|
+
* modal name), ranked by fewest extra scale tones beyond the chord and then by
|
|
251
|
+
* conventional
|
|
244
252
|
* preference. For bare triads and smaller chords, heptatonic scales rank before
|
|
245
253
|
* pentatonics and other sizes: a pentatonic adds no modal color over a triad,
|
|
246
254
|
* so the seven-note modes are the more useful answer. The chromatic scale is
|
|
@@ -391,6 +399,15 @@ type VoicingOptions = {
|
|
|
391
399
|
* @defaultValue 12
|
|
392
400
|
*/
|
|
393
401
|
maxSpacing?: number;
|
|
402
|
+
/**
|
|
403
|
+
* Maximum candidate voicings evaluated for one chord.
|
|
404
|
+
*
|
|
405
|
+
* Raise this for large voicings when exact optimum matters more than bounded
|
|
406
|
+
* search time.
|
|
407
|
+
*
|
|
408
|
+
* @defaultValue 4000
|
|
409
|
+
*/
|
|
410
|
+
maxCandidates?: number;
|
|
394
411
|
/**
|
|
395
412
|
* Maximum number of chords {@link voiceProgression} will voice. The search
|
|
396
413
|
* per chord is bounded internally, so the cost of a progression is linear in
|
|
@@ -407,6 +424,12 @@ type VoicingOptions = {
|
|
|
407
424
|
* voice-leading distance alone.
|
|
408
425
|
*/
|
|
409
426
|
key?: KeyScale;
|
|
427
|
+
/**
|
|
428
|
+
* The chord that produced the current voicing passed to {@link nextVoicing}.
|
|
429
|
+
* When supplied, chordal-seventh resolution is scored exactly as it is by
|
|
430
|
+
* {@link voiceProgression}.
|
|
431
|
+
*/
|
|
432
|
+
previousChord?: Chord;
|
|
410
433
|
};
|
|
411
434
|
/**
|
|
412
435
|
* Realize a single chord as one MIDI pitch per voice, ascending (index 0 =
|
|
@@ -429,6 +452,20 @@ type VoicingOptions = {
|
|
|
429
452
|
* @category Voicing & Counterpoint
|
|
430
453
|
*/
|
|
431
454
|
declare function voiceChord(chord: Chord, opts?: VoicingOptions): number[];
|
|
455
|
+
/**
|
|
456
|
+
* Voice a chord progression with smooth, bounded SATB-style leading.
|
|
457
|
+
*
|
|
458
|
+
* Each chord is chosen from a deterministic candidate set, minimizing motion
|
|
459
|
+
* while penalizing counterpoint violations. A supplied key additionally
|
|
460
|
+
* resolves leading tones and chordal sevenths.
|
|
461
|
+
*
|
|
462
|
+
* @param chords The chords to voice in order.
|
|
463
|
+
* @param opts Voicing options; defaults to four voices in {@link SATB_RANGES}.
|
|
464
|
+
* @returns One ascending MIDI voicing per chord.
|
|
465
|
+
* @throws {@link NoSolutionError} with the failing chord index when a chord
|
|
466
|
+
* cannot fit the requested ranges.
|
|
467
|
+
* @category Voicing & Counterpoint
|
|
468
|
+
*/
|
|
432
469
|
declare function voiceProgression(chords: readonly Chord[], opts?: VoicingOptions): number[][];
|
|
433
470
|
|
|
434
471
|
/**
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { C as Chord } from './index-
|
|
1
|
+
import { C as Chord } from './index-oTQbYYIs.cjs';
|
|
2
2
|
import { K as KeyScale } from './types-BN6_Q9Kl.cjs';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Build a 12-bit mode mask from a list of semitone offsets above the root.
|
|
6
|
+
*
|
|
7
|
+
* Bit 0 (the root) is always set, enforcing the `KeyScale` invariant that the
|
|
8
|
+
* root is a scale tone even when the offset list omits 0.
|
|
9
|
+
*
|
|
10
|
+
* @category Scales
|
|
11
|
+
*/
|
|
4
12
|
declare function maskFromOffsets(offsets: readonly number[]): number;
|
|
5
13
|
/**
|
|
6
14
|
* Mode mask for the major (Ionian) scale: offsets {0, 2, 4, 5, 7, 9, 11}.
|
|
@@ -239,8 +247,8 @@ type ChordScaleMatch = {
|
|
|
239
247
|
* conventional chord-scale relationship. Every entry of {@link NAMED_SCALES}
|
|
240
248
|
* whose pitch-class set is a superset of the chord's is returned once per
|
|
241
249
|
* distinct pitch-class set (aliased masks such as major/ionian report only the
|
|
242
|
-
* modal name), ranked by fewest extra scale tones beyond the chord
|
|
243
|
-
*
|
|
250
|
+
* modal name), ranked by fewest extra scale tones beyond the chord and then by
|
|
251
|
+
* conventional
|
|
244
252
|
* preference. For bare triads and smaller chords, heptatonic scales rank before
|
|
245
253
|
* pentatonics and other sizes: a pentatonic adds no modal color over a triad,
|
|
246
254
|
* so the seven-note modes are the more useful answer. The chromatic scale is
|
|
@@ -391,6 +399,15 @@ type VoicingOptions = {
|
|
|
391
399
|
* @defaultValue 12
|
|
392
400
|
*/
|
|
393
401
|
maxSpacing?: number;
|
|
402
|
+
/**
|
|
403
|
+
* Maximum candidate voicings evaluated for one chord.
|
|
404
|
+
*
|
|
405
|
+
* Raise this for large voicings when exact optimum matters more than bounded
|
|
406
|
+
* search time.
|
|
407
|
+
*
|
|
408
|
+
* @defaultValue 4000
|
|
409
|
+
*/
|
|
410
|
+
maxCandidates?: number;
|
|
394
411
|
/**
|
|
395
412
|
* Maximum number of chords {@link voiceProgression} will voice. The search
|
|
396
413
|
* per chord is bounded internally, so the cost of a progression is linear in
|
|
@@ -407,6 +424,12 @@ type VoicingOptions = {
|
|
|
407
424
|
* voice-leading distance alone.
|
|
408
425
|
*/
|
|
409
426
|
key?: KeyScale;
|
|
427
|
+
/**
|
|
428
|
+
* The chord that produced the current voicing passed to {@link nextVoicing}.
|
|
429
|
+
* When supplied, chordal-seventh resolution is scored exactly as it is by
|
|
430
|
+
* {@link voiceProgression}.
|
|
431
|
+
*/
|
|
432
|
+
previousChord?: Chord;
|
|
410
433
|
};
|
|
411
434
|
/**
|
|
412
435
|
* Realize a single chord as one MIDI pitch per voice, ascending (index 0 =
|
|
@@ -429,6 +452,20 @@ type VoicingOptions = {
|
|
|
429
452
|
* @category Voicing & Counterpoint
|
|
430
453
|
*/
|
|
431
454
|
declare function voiceChord(chord: Chord, opts?: VoicingOptions): number[];
|
|
455
|
+
/**
|
|
456
|
+
* Voice a chord progression with smooth, bounded SATB-style leading.
|
|
457
|
+
*
|
|
458
|
+
* Each chord is chosen from a deterministic candidate set, minimizing motion
|
|
459
|
+
* while penalizing counterpoint violations. A supplied key additionally
|
|
460
|
+
* resolves leading tones and chordal sevenths.
|
|
461
|
+
*
|
|
462
|
+
* @param chords The chords to voice in order.
|
|
463
|
+
* @param opts Voicing options; defaults to four voices in {@link SATB_RANGES}.
|
|
464
|
+
* @returns One ascending MIDI voicing per chord.
|
|
465
|
+
* @throws {@link NoSolutionError} with the failing chord index when a chord
|
|
466
|
+
* cannot fit the requested ranges.
|
|
467
|
+
* @category Voicing & Counterpoint
|
|
468
|
+
*/
|
|
432
469
|
declare function voiceProgression(chords: readonly Chord[], opts?: VoicingOptions): number[][];
|
|
433
470
|
|
|
434
471
|
/**
|
package/dist/theory/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-T64C7ZD7.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYFJXS3AUcjs = require('../chunk-YFJXS3AU.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkWFDXOLUBcjs = require('../chunk-WFDXOLUB.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -31,7 +31,7 @@ var _chunkQ6OP4U43cjs = require('../chunk-Q6OP4U43.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkOL3IHHSJcjs = require('../chunk-OL3IHHSJ.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -86,8 +86,8 @@ var _chunkLW53AHQUcjs = require('../chunk-LW53AHQU.cjs');
|
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
var
|
|
90
|
-
require('../chunk-
|
|
89
|
+
var _chunkBSLTLGM3cjs = require('../chunk-BSLTLGM3.cjs');
|
|
90
|
+
require('../chunk-PI3UXRWK.cjs');
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
@@ -169,5 +169,5 @@ require('../chunk-7MGZ7D62.cjs');
|
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
exports.ALTERED_MASK =
|
|
172
|
+
exports.ALTERED_MASK = _chunkBSLTLGM3cjs.ALTERED_MASK; exports.BLUES_MASK = _chunkBSLTLGM3cjs.BLUES_MASK; exports.CHROMATIC_MASK = _chunkBSLTLGM3cjs.CHROMATIC_MASK; exports.DORIAN_MASK = _chunkBSLTLGM3cjs.DORIAN_MASK; exports.HARMONIC_MINOR_MASK = _chunkBSLTLGM3cjs.HARMONIC_MINOR_MASK; exports.LOCRIAN_MASK = _chunkBSLTLGM3cjs.LOCRIAN_MASK; exports.LOCRIAN_NATURAL2_MASK = _chunkBSLTLGM3cjs.LOCRIAN_NATURAL2_MASK; exports.LYDIAN_DOMINANT_MASK = _chunkBSLTLGM3cjs.LYDIAN_DOMINANT_MASK; exports.LYDIAN_MASK = _chunkBSLTLGM3cjs.LYDIAN_MASK; exports.MAJOR_MASK = _chunkBSLTLGM3cjs.MAJOR_MASK; exports.MAJOR_PENTATONIC_MASK = _chunkBSLTLGM3cjs.MAJOR_PENTATONIC_MASK; exports.MELODIC_MINOR_MASK = _chunkBSLTLGM3cjs.MELODIC_MINOR_MASK; exports.MINOR_PENTATONIC_MASK = _chunkBSLTLGM3cjs.MINOR_PENTATONIC_MASK; exports.MIXOLYDIAN_B13_MASK = _chunkBSLTLGM3cjs.MIXOLYDIAN_B13_MASK; exports.MIXOLYDIAN_MASK = _chunkBSLTLGM3cjs.MIXOLYDIAN_MASK; exports.NAMED_SCALES = _chunkBSLTLGM3cjs.NAMED_SCALES; exports.NATURAL_MINOR_MASK = _chunkBSLTLGM3cjs.NATURAL_MINOR_MASK; exports.NoteSafety = _chunkWFDXOLUBcjs.NoteSafety; exports.OCTATONIC_HALF_WHOLE_MASK = _chunkBSLTLGM3cjs.OCTATONIC_HALF_WHOLE_MASK; exports.OCTATONIC_WHOLE_HALF_MASK = _chunkBSLTLGM3cjs.OCTATONIC_WHOLE_HALF_MASK; exports.PHRYGIAN_DOMINANT_MASK = _chunkBSLTLGM3cjs.PHRYGIAN_DOMINANT_MASK; exports.PHRYGIAN_MASK = _chunkBSLTLGM3cjs.PHRYGIAN_MASK; exports.ReasonFlag = _chunkWFDXOLUBcjs.ReasonFlag; exports.SATB_RANGES = _chunkOL3IHHSJcjs.SATB_RANGES; exports.WHOLE_TONE_MASK = _chunkBSLTLGM3cjs.WHOLE_TONE_MASK; exports.availableTensions = _chunkOL3IHHSJcjs.availableTensions; exports.avoidNotes = _chunkOL3IHHSJcjs.avoidNotes; exports.chordFromDegree = _chunkBSLTLGM3cjs.chordFromDegree; exports.chordPitchClasses = _chunkBSLTLGM3cjs.chordPitchClasses; exports.chordQualities = _chunkBSLTLGM3cjs.chordQualities; exports.chordScaleReport = _chunkOL3IHHSJcjs.chordScaleReport; exports.chordScales = _chunkOL3IHHSJcjs.chordScales; exports.chordToneRole = _chunkBSLTLGM3cjs.chordToneRole; exports.createsHiddenParallelPerfect = _chunkBSLTLGM3cjs.createsHiddenParallelPerfect; exports.createsParallelOctave = _chunkBSLTLGM3cjs.createsParallelOctave; exports.createsParallelPerfect = _chunkBSLTLGM3cjs.createsParallelPerfect; exports.createsParallelUnison = _chunkBSLTLGM3cjs.createsParallelUnison; exports.createsVerticalDissonance = _chunkBSLTLGM3cjs.createsVerticalDissonance; exports.createsVoiceCrossing = _chunkBSLTLGM3cjs.createsVoiceCrossing; exports.createsVoiceOverlap = _chunkBSLTLGM3cjs.createsVoiceOverlap; exports.diatonicPitchClasses = _chunkBSLTLGM3cjs.diatonicPitchClasses; exports.diatonicSeventh = _chunkBSLTLGM3cjs.diatonicSeventh; exports.diatonicTriad = _chunkBSLTLGM3cjs.diatonicTriad; exports.enumerateSafePitches = _chunkWFDXOLUBcjs.enumerateSafePitches; exports.evaluateSafety = _chunkWFDXOLUBcjs.evaluateSafety; exports.exceedsSpacing = _chunkBSLTLGM3cjs.exceedsSpacing; exports.formatChordSymbol = _chunkOL3IHHSJcjs.formatChordSymbol; exports.intervalAboveRoot = _chunkBSLTLGM3cjs.intervalAboveRoot; exports.isChordMember = _chunkBSLTLGM3cjs.isChordMember; exports.isForbiddenMelodicLeap = _chunkBSLTLGM3cjs.isForbiddenMelodicLeap; exports.isLeadingToneResolution = _chunkBSLTLGM3cjs.isLeadingToneResolution; exports.isScaleTone = _chunkBSLTLGM3cjs.isScaleTone; exports.majorKey = _chunkBSLTLGM3cjs.majorKey; exports.makeChord = _chunkBSLTLGM3cjs.makeChord; exports.maskFromOffsets = _chunkBSLTLGM3cjs.maskFromOffsets; exports.minorKey = _chunkBSLTLGM3cjs.minorKey; exports.namedScaleMask = _chunkBSLTLGM3cjs.namedScaleMask; exports.nearestScaleTone = _chunkBSLTLGM3cjs.nearestScaleTone; exports.nextVoicing = _chunkOL3IHHSJcjs.nextVoicing; exports.noteNames = _chunkOL3IHHSJcjs.noteNames; exports.parseChordSymbol = _chunkOL3IHHSJcjs.parseChordSymbol; exports.pitchToScaleDegree = _chunkBSLTLGM3cjs.pitchToScaleDegree; exports.requireScaleMask = _chunkBSLTLGM3cjs.requireScaleMask; exports.roleOf = _chunkYFJXS3AUcjs.roleOf; exports.scaleByName = _chunkBSLTLGM3cjs.scaleByName; exports.scaleMatchesChord = _chunkOL3IHHSJcjs.scaleMatchesChord; exports.scaleTonesInDegreeOrder = _chunkBSLTLGM3cjs.scaleTonesInDegreeOrder; exports.scalesForChanges = _chunkOL3IHHSJcjs.scalesForChanges; exports.spellChord = _chunkOL3IHHSJcjs.spellChord; exports.spellChordFromRoot = _chunkOL3IHHSJcjs.spellChordFromRoot; exports.spellPitch = _chunkOL3IHHSJcjs.spellPitch; exports.spellPitchClass = _chunkOL3IHHSJcjs.spellPitchClass; exports.spellPitchClasses = _chunkOL3IHHSJcjs.spellPitchClasses; exports.spellScale = _chunkOL3IHHSJcjs.spellScale; exports.transposeChord = _chunkBSLTLGM3cjs.transposeChord; exports.transposeChordSymbol = _chunkOL3IHHSJcjs.transposeChordSymbol; exports.voiceChord = _chunkOL3IHHSJcjs.voiceChord; exports.voiceChordStyled = _chunkOL3IHHSJcjs.voiceChordStyled; exports.voiceLeadingCost = _chunkOL3IHHSJcjs.voiceLeadingCost; exports.voiceProgression = _chunkOL3IHHSJcjs.voiceProgression;
|
|
173
173
|
//# sourceMappingURL=index.cjs.map
|
package/dist/theory/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { N as Note } from '../index-
|
|
1
|
+
import { N as Note } from '../index-tR9jTn26.cjs';
|
|
2
2
|
import { K as KeyScale } from '../types-BN6_Q9Kl.cjs';
|
|
3
|
-
import { C as Chord } from '../index-
|
|
4
|
-
export { a as ChordQuality, b as ChordSegment, c as ChordSpan, d as ChordToneRole, P as PitchSpelling, e as chordFromDegree, f as chordPitchClasses, g as chordQualities, h as chordToneRole, i as diatonicSeventh, j as diatonicTriad, k as intervalAboveRoot, l as isChordMember, m as makeChord, t as transposeChord } from '../index-
|
|
5
|
-
import { p as ScaleNameInput, r as VoicingOptions } from '../styled-
|
|
6
|
-
export { A as ALTERED_MASK, B as BLUES_MASK, C as CHROMATIC_MASK, a as ChordScaleMatch, b as ChordScaleReportEntry, D as DORIAN_MASK, H as HARMONIC_MINOR_MASK, L as LOCRIAN_MASK, c as LOCRIAN_NATURAL2_MASK, d as LYDIAN_DOMINANT_MASK, e as LYDIAN_MASK, M as MAJOR_MASK, f as MAJOR_PENTATONIC_MASK, g as MELODIC_MINOR_MASK, h as MINOR_PENTATONIC_MASK, i as MIXOLYDIAN_B13_MASK, j as MIXOLYDIAN_MASK, N as NAMED_SCALES, k as NATURAL_MINOR_MASK, O as OCTATONIC_HALF_WHOLE_MASK, l as OCTATONIC_WHOLE_HALF_MASK, P as PHRYGIAN_DOMINANT_MASK, m as PHRYGIAN_MASK, S as SATB_RANGES, n as ScaleChoice, o as ScaleName, q as StyledVoicingOptions, V as VoiceRange, s as VoicingStyle, W as WHOLE_TONE_MASK, t as availableTensions, u as avoidNotes, v as chordScaleReport, w as chordScales, x as maskFromOffsets, y as namedScaleMask, z as requireScaleMask, E as scaleMatchesChord, F as scalesForChanges, G as voiceChord, I as voiceChordStyled, J as voiceProgression } from '../styled-
|
|
7
|
-
export { H as HarmonyRole, L as LockLevel, V as VoicedRole, r as roleOf } from '../index-
|
|
8
|
-
export { E as EvaluateSafetyOptions, N as NoteSafety, R as ReasonFlag, S as SafetyProfile, a as SafetyQuery, b as SafetyResult, V as VoiceSnapshot, e as enumerateSafePitches, c as evaluateSafety } from '../index-
|
|
3
|
+
import { C as Chord } from '../index-oTQbYYIs.cjs';
|
|
4
|
+
export { a as ChordQuality, b as ChordSegment, c as ChordSpan, d as ChordToneRole, P as PitchSpelling, e as chordFromDegree, f as chordPitchClasses, g as chordQualities, h as chordToneRole, i as diatonicSeventh, j as diatonicTriad, k as intervalAboveRoot, l as isChordMember, m as makeChord, t as transposeChord } from '../index-oTQbYYIs.cjs';
|
|
5
|
+
import { p as ScaleNameInput, r as VoicingOptions } from '../styled-Crv6SA4S.cjs';
|
|
6
|
+
export { A as ALTERED_MASK, B as BLUES_MASK, C as CHROMATIC_MASK, a as ChordScaleMatch, b as ChordScaleReportEntry, D as DORIAN_MASK, H as HARMONIC_MINOR_MASK, L as LOCRIAN_MASK, c as LOCRIAN_NATURAL2_MASK, d as LYDIAN_DOMINANT_MASK, e as LYDIAN_MASK, M as MAJOR_MASK, f as MAJOR_PENTATONIC_MASK, g as MELODIC_MINOR_MASK, h as MINOR_PENTATONIC_MASK, i as MIXOLYDIAN_B13_MASK, j as MIXOLYDIAN_MASK, N as NAMED_SCALES, k as NATURAL_MINOR_MASK, O as OCTATONIC_HALF_WHOLE_MASK, l as OCTATONIC_WHOLE_HALF_MASK, P as PHRYGIAN_DOMINANT_MASK, m as PHRYGIAN_MASK, S as SATB_RANGES, n as ScaleChoice, o as ScaleName, q as StyledVoicingOptions, V as VoiceRange, s as VoicingStyle, W as WHOLE_TONE_MASK, t as availableTensions, u as avoidNotes, v as chordScaleReport, w as chordScales, x as maskFromOffsets, y as namedScaleMask, z as requireScaleMask, E as scaleMatchesChord, F as scalesForChanges, G as voiceChord, I as voiceChordStyled, J as voiceProgression } from '../styled-Crv6SA4S.cjs';
|
|
7
|
+
export { H as HarmonyRole, L as LockLevel, V as VoicedRole, r as roleOf } from '../index-x2vcsduE.cjs';
|
|
8
|
+
export { E as EvaluateSafetyOptions, N as NoteSafety, R as ReasonFlag, S as SafetyProfile, a as SafetyQuery, b as SafetyResult, V as VoiceSnapshot, e as enumerateSafePitches, c as evaluateSafety } from '../index-B2Ulxxpo.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Test whether a pitch belongs to the scale.
|
|
@@ -319,8 +319,8 @@ declare function spellPitchClasses(pcs: number[], tonic: Note, key: KeyScale): N
|
|
|
319
319
|
/**
|
|
320
320
|
* Spell chord tones from an already chosen root spelling.
|
|
321
321
|
*
|
|
322
|
-
* This is
|
|
323
|
-
*
|
|
322
|
+
* This is public for callers that already know the desired root spelling;
|
|
323
|
+
* {@link spellChord} instead derives that spelling from the chord and key.
|
|
324
324
|
*/
|
|
325
325
|
declare function spellChordFromRoot(chord: Chord, root: Note): Note[];
|
|
326
326
|
/**
|
package/dist/theory/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { N as Note } from '../index-
|
|
1
|
+
import { N as Note } from '../index-tR9jTn26.js';
|
|
2
2
|
import { K as KeyScale } from '../types-BN6_Q9Kl.js';
|
|
3
|
-
import { C as Chord } from '../index-
|
|
4
|
-
export { a as ChordQuality, b as ChordSegment, c as ChordSpan, d as ChordToneRole, P as PitchSpelling, e as chordFromDegree, f as chordPitchClasses, g as chordQualities, h as chordToneRole, i as diatonicSeventh, j as diatonicTriad, k as intervalAboveRoot, l as isChordMember, m as makeChord, t as transposeChord } from '../index-
|
|
5
|
-
import { p as ScaleNameInput, r as VoicingOptions } from '../styled-
|
|
6
|
-
export { A as ALTERED_MASK, B as BLUES_MASK, C as CHROMATIC_MASK, a as ChordScaleMatch, b as ChordScaleReportEntry, D as DORIAN_MASK, H as HARMONIC_MINOR_MASK, L as LOCRIAN_MASK, c as LOCRIAN_NATURAL2_MASK, d as LYDIAN_DOMINANT_MASK, e as LYDIAN_MASK, M as MAJOR_MASK, f as MAJOR_PENTATONIC_MASK, g as MELODIC_MINOR_MASK, h as MINOR_PENTATONIC_MASK, i as MIXOLYDIAN_B13_MASK, j as MIXOLYDIAN_MASK, N as NAMED_SCALES, k as NATURAL_MINOR_MASK, O as OCTATONIC_HALF_WHOLE_MASK, l as OCTATONIC_WHOLE_HALF_MASK, P as PHRYGIAN_DOMINANT_MASK, m as PHRYGIAN_MASK, S as SATB_RANGES, n as ScaleChoice, o as ScaleName, q as StyledVoicingOptions, V as VoiceRange, s as VoicingStyle, W as WHOLE_TONE_MASK, t as availableTensions, u as avoidNotes, v as chordScaleReport, w as chordScales, x as maskFromOffsets, y as namedScaleMask, z as requireScaleMask, E as scaleMatchesChord, F as scalesForChanges, G as voiceChord, I as voiceChordStyled, J as voiceProgression } from '../styled-
|
|
7
|
-
export { H as HarmonyRole, L as LockLevel, V as VoicedRole, r as roleOf } from '../index-
|
|
8
|
-
export { E as EvaluateSafetyOptions, N as NoteSafety, R as ReasonFlag, S as SafetyProfile, a as SafetyQuery, b as SafetyResult, V as VoiceSnapshot, e as enumerateSafePitches, c as evaluateSafety } from '../index-
|
|
3
|
+
import { C as Chord } from '../index-COw1Ky9g.js';
|
|
4
|
+
export { a as ChordQuality, b as ChordSegment, c as ChordSpan, d as ChordToneRole, P as PitchSpelling, e as chordFromDegree, f as chordPitchClasses, g as chordQualities, h as chordToneRole, i as diatonicSeventh, j as diatonicTriad, k as intervalAboveRoot, l as isChordMember, m as makeChord, t as transposeChord } from '../index-COw1Ky9g.js';
|
|
5
|
+
import { p as ScaleNameInput, r as VoicingOptions } from '../styled-Bl0ZK28h.js';
|
|
6
|
+
export { A as ALTERED_MASK, B as BLUES_MASK, C as CHROMATIC_MASK, a as ChordScaleMatch, b as ChordScaleReportEntry, D as DORIAN_MASK, H as HARMONIC_MINOR_MASK, L as LOCRIAN_MASK, c as LOCRIAN_NATURAL2_MASK, d as LYDIAN_DOMINANT_MASK, e as LYDIAN_MASK, M as MAJOR_MASK, f as MAJOR_PENTATONIC_MASK, g as MELODIC_MINOR_MASK, h as MINOR_PENTATONIC_MASK, i as MIXOLYDIAN_B13_MASK, j as MIXOLYDIAN_MASK, N as NAMED_SCALES, k as NATURAL_MINOR_MASK, O as OCTATONIC_HALF_WHOLE_MASK, l as OCTATONIC_WHOLE_HALF_MASK, P as PHRYGIAN_DOMINANT_MASK, m as PHRYGIAN_MASK, S as SATB_RANGES, n as ScaleChoice, o as ScaleName, q as StyledVoicingOptions, V as VoiceRange, s as VoicingStyle, W as WHOLE_TONE_MASK, t as availableTensions, u as avoidNotes, v as chordScaleReport, w as chordScales, x as maskFromOffsets, y as namedScaleMask, z as requireScaleMask, E as scaleMatchesChord, F as scalesForChanges, G as voiceChord, I as voiceChordStyled, J as voiceProgression } from '../styled-Bl0ZK28h.js';
|
|
7
|
+
export { H as HarmonyRole, L as LockLevel, V as VoicedRole, r as roleOf } from '../index-Cfx8xgH0.js';
|
|
8
|
+
export { E as EvaluateSafetyOptions, N as NoteSafety, R as ReasonFlag, S as SafetyProfile, a as SafetyQuery, b as SafetyResult, V as VoiceSnapshot, e as enumerateSafePitches, c as evaluateSafety } from '../index-BuaB-ypt.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Test whether a pitch belongs to the scale.
|
|
@@ -319,8 +319,8 @@ declare function spellPitchClasses(pcs: number[], tonic: Note, key: KeyScale): N
|
|
|
319
319
|
/**
|
|
320
320
|
* Spell chord tones from an already chosen root spelling.
|
|
321
321
|
*
|
|
322
|
-
* This is
|
|
323
|
-
*
|
|
322
|
+
* This is public for callers that already know the desired root spelling;
|
|
323
|
+
* {@link spellChord} instead derives that spelling from the chord and key.
|
|
324
324
|
*/
|
|
325
325
|
declare function spellChordFromRoot(chord: Chord, root: Note): Note[];
|
|
326
326
|
/**
|