@musodojo/music-theory-data 21.1.0 → 22.0.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/esm/src/data/chords/mod.d.ts +8 -0
- package/esm/src/data/chords/mod.d.ts.map +1 -1
- package/esm/src/data/chords/mod.js +8 -0
- package/esm/src/data/labels/note-label-collections.d.ts +34 -6
- package/esm/src/data/labels/note-label-collections.d.ts.map +1 -1
- package/esm/src/data/labels/note-label-collections.js +57 -6
- package/esm/src/data/labels/note-labels.d.ts +31 -0
- package/esm/src/data/labels/note-labels.d.ts.map +1 -1
- package/esm/src/data/labels/note-labels.js +18 -0
- package/esm/src/data/note-collections/diatonic-modes.d.ts +2 -0
- package/esm/src/data/note-collections/diatonic-modes.d.ts.map +1 -1
- package/esm/src/data/note-collections/diatonic-modes.js +1 -0
- package/esm/src/data/note-collections/harmonic-minor-modes.d.ts +2 -0
- package/esm/src/data/note-collections/harmonic-minor-modes.d.ts.map +1 -1
- package/esm/src/data/note-collections/harmonic-minor-modes.js +1 -0
- package/esm/src/data/note-collections/melodic-minor-modes.d.ts +2 -0
- package/esm/src/data/note-collections/melodic-minor-modes.d.ts.map +1 -1
- package/esm/src/data/note-collections/melodic-minor-modes.js +1 -0
- package/esm/src/data/note-collections/mod.d.ts +5 -0
- package/esm/src/data/note-collections/mod.d.ts.map +1 -1
- package/esm/src/data/note-collections/mod.js +3 -0
- package/esm/src/utils/chords.d.ts +54 -0
- package/esm/src/utils/chords.d.ts.map +1 -1
- package/esm/src/utils/chords.js +53 -0
- package/esm/src/utils/intervals.d.ts +59 -5
- package/esm/src/utils/intervals.d.ts.map +1 -1
- package/esm/src/utils/intervals.js +60 -3
- package/esm/src/utils/midi-note-sequences.d.ts +11 -0
- package/esm/src/utils/midi-note-sequences.d.ts.map +1 -1
- package/esm/src/utils/midi-note-sequences.js +2 -3
- package/esm/src/utils/midi.d.ts +31 -0
- package/esm/src/utils/midi.d.ts.map +1 -1
- package/esm/src/utils/midi.js +36 -4
- package/esm/src/utils/note-collections.d.ts +10 -0
- package/esm/src/utils/note-collections.d.ts.map +1 -1
- package/esm/src/utils/note-collections.js +10 -4
- package/esm/src/utils/note-names.d.ts +45 -2
- package/esm/src/utils/note-names.d.ts.map +1 -1
- package/esm/src/utils/note-names.js +39 -39
- package/package.json +1 -1
- package/script/src/data/chords/mod.d.ts +8 -0
- package/script/src/data/chords/mod.d.ts.map +1 -1
- package/script/src/data/chords/mod.js +8 -0
- package/script/src/data/labels/note-label-collections.d.ts +34 -6
- package/script/src/data/labels/note-label-collections.d.ts.map +1 -1
- package/script/src/data/labels/note-label-collections.js +57 -6
- package/script/src/data/labels/note-labels.d.ts +31 -0
- package/script/src/data/labels/note-labels.d.ts.map +1 -1
- package/script/src/data/labels/note-labels.js +18 -0
- package/script/src/data/note-collections/diatonic-modes.d.ts +2 -0
- package/script/src/data/note-collections/diatonic-modes.d.ts.map +1 -1
- package/script/src/data/note-collections/diatonic-modes.js +1 -0
- package/script/src/data/note-collections/harmonic-minor-modes.d.ts +2 -0
- package/script/src/data/note-collections/harmonic-minor-modes.d.ts.map +1 -1
- package/script/src/data/note-collections/harmonic-minor-modes.js +1 -0
- package/script/src/data/note-collections/melodic-minor-modes.d.ts +2 -0
- package/script/src/data/note-collections/melodic-minor-modes.d.ts.map +1 -1
- package/script/src/data/note-collections/melodic-minor-modes.js +1 -0
- package/script/src/data/note-collections/mod.d.ts +5 -0
- package/script/src/data/note-collections/mod.d.ts.map +1 -1
- package/script/src/data/note-collections/mod.js +3 -0
- package/script/src/utils/chords.d.ts +54 -0
- package/script/src/utils/chords.d.ts.map +1 -1
- package/script/src/utils/chords.js +53 -0
- package/script/src/utils/intervals.d.ts +59 -5
- package/script/src/utils/intervals.d.ts.map +1 -1
- package/script/src/utils/intervals.js +60 -3
- package/script/src/utils/midi-note-sequences.d.ts +11 -0
- package/script/src/utils/midi-note-sequences.d.ts.map +1 -1
- package/script/src/utils/midi-note-sequences.js +2 -3
- package/script/src/utils/midi.d.ts +31 -0
- package/script/src/utils/midi.d.ts.map +1 -1
- package/script/src/utils/midi.js +36 -4
- package/script/src/utils/note-collections.d.ts +10 -0
- package/script/src/utils/note-collections.d.ts.map +1 -1
- package/script/src/utils/note-collections.js +10 -4
- package/script/src/utils/note-names.d.ts +45 -2
- package/script/src/utils/note-names.d.ts.map +1 -1
- package/script/src/utils/note-names.js +39 -39
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { LowerCaseRomanNumeral, SeventhChord, Triad, UpperCaseRomanNumeral } from "../../types/chords";
|
|
2
|
+
/** An ordered array containing the fundamental triad qualities of the diatonic major scale. */
|
|
2
3
|
export declare const diatonicTriads: Triad[];
|
|
4
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the diatonic major scale. */
|
|
3
5
|
export declare const diatonicSeventhChords: SeventhChord[];
|
|
6
|
+
/** An ordered array containing the fundamental triad qualities of the harmonic minor scale. */
|
|
4
7
|
export declare const harmonicMinorTriads: Triad[];
|
|
8
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the harmonic minor scale. */
|
|
5
9
|
export declare const harmonicMinorSeventhChords: SeventhChord[];
|
|
10
|
+
/** An ordered array containing the fundamental triad qualities of the melodic minor scale. */
|
|
6
11
|
export declare const melodicMinorTriads: Triad[];
|
|
12
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the melodic minor scale. */
|
|
7
13
|
export declare const melodicMinorSeventhChords: SeventhChord[];
|
|
14
|
+
/** An array mapping 7 index scale degrees to their corresponding upper-case Roman numerals. */
|
|
8
15
|
export declare const upperCaseRomanNumerals: UpperCaseRomanNumeral[];
|
|
16
|
+
/** An array mapping 7 index scale degrees to their corresponding lower-case Roman numerals. */
|
|
9
17
|
export declare const lowerCaseRomanNumerals: LowerCaseRomanNumeral[];
|
|
10
18
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../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AO,MAAM,sBAAsB,EAAE,qBAAqB,EAQhD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** An ordered array containing the fundamental triad qualities of the diatonic major scale. */
|
|
1
2
|
export const diatonicTriads = [
|
|
2
3
|
"M",
|
|
3
4
|
"m",
|
|
@@ -7,6 +8,7 @@ export const diatonicTriads = [
|
|
|
7
8
|
"m",
|
|
8
9
|
"°",
|
|
9
10
|
];
|
|
11
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the diatonic major scale. */
|
|
10
12
|
export const diatonicSeventhChords = [
|
|
11
13
|
"M7",
|
|
12
14
|
"m7",
|
|
@@ -16,6 +18,7 @@ export const diatonicSeventhChords = [
|
|
|
16
18
|
"m7",
|
|
17
19
|
"ø7",
|
|
18
20
|
];
|
|
21
|
+
/** An ordered array containing the fundamental triad qualities of the harmonic minor scale. */
|
|
19
22
|
export const harmonicMinorTriads = [
|
|
20
23
|
"m",
|
|
21
24
|
"°",
|
|
@@ -25,6 +28,7 @@ export const harmonicMinorTriads = [
|
|
|
25
28
|
"M",
|
|
26
29
|
"°",
|
|
27
30
|
];
|
|
31
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the harmonic minor scale. */
|
|
28
32
|
export const harmonicMinorSeventhChords = [
|
|
29
33
|
"m(M7)",
|
|
30
34
|
"ø7",
|
|
@@ -34,6 +38,7 @@ export const harmonicMinorSeventhChords = [
|
|
|
34
38
|
"M7",
|
|
35
39
|
"°7",
|
|
36
40
|
];
|
|
41
|
+
/** An ordered array containing the fundamental triad qualities of the melodic minor scale. */
|
|
37
42
|
export const melodicMinorTriads = [
|
|
38
43
|
"m",
|
|
39
44
|
"m",
|
|
@@ -43,6 +48,7 @@ export const melodicMinorTriads = [
|
|
|
43
48
|
"°",
|
|
44
49
|
"°",
|
|
45
50
|
];
|
|
51
|
+
/** An ordered array containing the fundamental seventh-chord qualities of the melodic minor scale. */
|
|
46
52
|
export const melodicMinorSeventhChords = [
|
|
47
53
|
"m(M7)",
|
|
48
54
|
"m7",
|
|
@@ -52,6 +58,7 @@ export const melodicMinorSeventhChords = [
|
|
|
52
58
|
"ø7",
|
|
53
59
|
"ø7",
|
|
54
60
|
];
|
|
61
|
+
/** An array mapping 7 index scale degrees to their corresponding upper-case Roman numerals. */
|
|
55
62
|
export const upperCaseRomanNumerals = [
|
|
56
63
|
"I",
|
|
57
64
|
"II",
|
|
@@ -61,6 +68,7 @@ export const upperCaseRomanNumerals = [
|
|
|
61
68
|
"VI",
|
|
62
69
|
"VII",
|
|
63
70
|
];
|
|
71
|
+
/** An array mapping 7 index scale degrees to their corresponding lower-case Roman numerals. */
|
|
64
72
|
export const lowerCaseRomanNumerals = [
|
|
65
73
|
"i",
|
|
66
74
|
"ii",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** A fixed 12-element tuple of strings representing each note in the chromatic scale. */
|
|
1
2
|
export type NoteLabelGroup = readonly [
|
|
2
3
|
string,
|
|
3
4
|
string,
|
|
@@ -12,6 +13,7 @@ export type NoteLabelGroup = readonly [
|
|
|
12
13
|
string,
|
|
13
14
|
string
|
|
14
15
|
];
|
|
16
|
+
/** The data interface governing an entire collection array of 12 note labels. */
|
|
15
17
|
export interface NoteLabelCollection {
|
|
16
18
|
readonly name: string;
|
|
17
19
|
readonly shortName: string;
|
|
@@ -19,18 +21,42 @@ export interface NoteLabelCollection {
|
|
|
19
21
|
readonly labels: NoteLabelGroup;
|
|
20
22
|
}
|
|
21
23
|
declare const _noteLabelCollections: {
|
|
22
|
-
readonly
|
|
23
|
-
readonly name: "Flat
|
|
24
|
-
readonly shortName: "Flat";
|
|
24
|
+
readonly noteNamesFlat: {
|
|
25
|
+
readonly name: "Flat Note Names";
|
|
26
|
+
readonly shortName: "Flat Notes";
|
|
25
27
|
readonly isRelative: false;
|
|
26
28
|
readonly labels: readonly ["C", "D♭", "D", "E♭", "E", "F", "G♭", "G", "A♭", "A", "B♭", "B"];
|
|
27
29
|
};
|
|
28
|
-
readonly
|
|
29
|
-
readonly name: "Sharp
|
|
30
|
-
readonly shortName: "Sharp";
|
|
30
|
+
readonly noteNamesSharp: {
|
|
31
|
+
readonly name: "Sharp Note Names";
|
|
32
|
+
readonly shortName: "Sharp Notes";
|
|
31
33
|
readonly isRelative: false;
|
|
32
34
|
readonly labels: readonly ["C", "C♯", "D", "D♯", "E", "F", "F♯", "G", "G♯", "A", "A♯", "B"];
|
|
33
35
|
};
|
|
36
|
+
readonly intervalsFlat: {
|
|
37
|
+
readonly name: "Flat Note Intervals";
|
|
38
|
+
readonly shortName: "Flat Intervals";
|
|
39
|
+
readonly isRelative: true;
|
|
40
|
+
readonly labels: readonly ["1", "♭2", "2", "♭3", "3", "4", "♭5", "5", "♭6", "6", "♭7", "7"];
|
|
41
|
+
};
|
|
42
|
+
readonly intervalsSharp: {
|
|
43
|
+
readonly name: "Sharp Note Intervals";
|
|
44
|
+
readonly shortName: "Sharp Intervals";
|
|
45
|
+
readonly isRelative: true;
|
|
46
|
+
readonly labels: readonly ["1", "♯1", "2", "♯2", "3", "4", "♯4", "5", "♯5", "6", "♯6", "7"];
|
|
47
|
+
};
|
|
48
|
+
readonly extensionsFlat: {
|
|
49
|
+
readonly name: "Flat Note Extensions";
|
|
50
|
+
readonly shortName: "Flat Extensions";
|
|
51
|
+
readonly isRelative: true;
|
|
52
|
+
readonly labels: readonly ["1", "♭9", "9", "♭3", "3", "11", "♭5", "5", "♭13", "13", "♭7", "7"];
|
|
53
|
+
};
|
|
54
|
+
readonly extensionsSharp: {
|
|
55
|
+
readonly name: "Sharp Note Extensions";
|
|
56
|
+
readonly shortName: "Sharp Extensions";
|
|
57
|
+
readonly isRelative: true;
|
|
58
|
+
readonly labels: readonly ["1", "♯1", "9", "♯9", "3", "11", "♯11", "5", "♯5", "13", "♯13", "7"];
|
|
59
|
+
};
|
|
34
60
|
readonly fixedDoFlat: {
|
|
35
61
|
readonly name: "Solfege Fixed Do Flat Notes";
|
|
36
62
|
readonly shortName: "Fixed Do Flat";
|
|
@@ -56,7 +82,9 @@ declare const _noteLabelCollections: {
|
|
|
56
82
|
readonly labels: readonly ["la", "te", "ti", "do", "di", "re", "re", "mi", "fa", "fi", "sol", "si"];
|
|
57
83
|
};
|
|
58
84
|
};
|
|
85
|
+
/** A union string of valid keys to lookup different note label collections. */
|
|
59
86
|
export type NoteLabelCollectionKey = keyof typeof _noteLabelCollections;
|
|
87
|
+
/** A dictionary holding arrays mapping integer semitones into note/solfege names for varied contexts. */
|
|
60
88
|
export declare const noteLabelCollections: Record<NoteLabelCollectionKey, NoteLabelCollection>;
|
|
61
89
|
export {};
|
|
62
90
|
//# sourceMappingURL=note-label-collections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note-label-collections.d.ts","sourceRoot":"","sources":["../../../../src/src/data/labels/note-label-collections.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS;IACpC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC;AAED,QAAA,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"note-label-collections.d.ts","sourceRoot":"","sources":["../../../../src/src/data/labels/note-label-collections.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,cAAc,GAAG,SAAS;IACpC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC;AAED,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJjB,CAAC;AAEX,+EAA+E;AAC/E,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAExE,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,sBAAsB,EACtB,mBAAmB,CACI,CAAC"}
|
|
@@ -1,16 +1,66 @@
|
|
|
1
1
|
const _noteLabelCollections = {
|
|
2
|
-
|
|
3
|
-
name: "Flat
|
|
4
|
-
shortName: "Flat",
|
|
2
|
+
noteNamesFlat: {
|
|
3
|
+
name: "Flat Note Names",
|
|
4
|
+
shortName: "Flat Notes",
|
|
5
5
|
isRelative: false,
|
|
6
6
|
labels: ["C", "D♭", "D", "E♭", "E", "F", "G♭", "G", "A♭", "A", "B♭", "B"],
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
name: "Sharp
|
|
10
|
-
shortName: "Sharp",
|
|
8
|
+
noteNamesSharp: {
|
|
9
|
+
name: "Sharp Note Names",
|
|
10
|
+
shortName: "Sharp Notes",
|
|
11
11
|
isRelative: false,
|
|
12
12
|
labels: ["C", "C♯", "D", "D♯", "E", "F", "F♯", "G", "G♯", "A", "A♯", "B"],
|
|
13
13
|
},
|
|
14
|
+
intervalsFlat: {
|
|
15
|
+
name: "Flat Note Intervals",
|
|
16
|
+
shortName: "Flat Intervals",
|
|
17
|
+
isRelative: true,
|
|
18
|
+
labels: ["1", "♭2", "2", "♭3", "3", "4", "♭5", "5", "♭6", "6", "♭7", "7"],
|
|
19
|
+
},
|
|
20
|
+
intervalsSharp: {
|
|
21
|
+
name: "Sharp Note Intervals",
|
|
22
|
+
shortName: "Sharp Intervals",
|
|
23
|
+
isRelative: true,
|
|
24
|
+
labels: ["1", "♯1", "2", "♯2", "3", "4", "♯4", "5", "♯5", "6", "♯6", "7"],
|
|
25
|
+
},
|
|
26
|
+
extensionsFlat: {
|
|
27
|
+
name: "Flat Note Extensions",
|
|
28
|
+
shortName: "Flat Extensions",
|
|
29
|
+
isRelative: true,
|
|
30
|
+
labels: [
|
|
31
|
+
"1",
|
|
32
|
+
"♭9",
|
|
33
|
+
"9",
|
|
34
|
+
"♭3",
|
|
35
|
+
"3",
|
|
36
|
+
"11",
|
|
37
|
+
"♭5",
|
|
38
|
+
"5",
|
|
39
|
+
"♭13",
|
|
40
|
+
"13",
|
|
41
|
+
"♭7",
|
|
42
|
+
"7",
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
extensionsSharp: {
|
|
46
|
+
name: "Sharp Note Extensions",
|
|
47
|
+
shortName: "Sharp Extensions",
|
|
48
|
+
isRelative: true,
|
|
49
|
+
labels: [
|
|
50
|
+
"1",
|
|
51
|
+
"♯1",
|
|
52
|
+
"9",
|
|
53
|
+
"♯9",
|
|
54
|
+
"3",
|
|
55
|
+
"11",
|
|
56
|
+
"♯11",
|
|
57
|
+
"5",
|
|
58
|
+
"♯5",
|
|
59
|
+
"13",
|
|
60
|
+
"♯13",
|
|
61
|
+
"7",
|
|
62
|
+
],
|
|
63
|
+
},
|
|
14
64
|
fixedDoFlat: {
|
|
15
65
|
name: "Solfege Fixed Do Flat Notes",
|
|
16
66
|
shortName: "Fixed Do Flat",
|
|
@@ -88,4 +138,5 @@ const _noteLabelCollections = {
|
|
|
88
138
|
],
|
|
89
139
|
},
|
|
90
140
|
};
|
|
141
|
+
/** A dictionary holding arrays mapping integer semitones into note/solfege names for varied contexts. */
|
|
91
142
|
export const noteLabelCollections = _noteLabelCollections;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/** Represents the mathematical zero-indexed pitch class of a root note, where C is 0 and B is 11. */
|
|
1
2
|
export type RootNoteInteger = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
2
3
|
declare const _noteLetters: readonly ["C", "D", "E", "F", "G", "A", "B"];
|
|
4
|
+
/** An alphabetical musical note letter without any accidentals. */
|
|
3
5
|
export type NoteLetter = (typeof _noteLetters)[number];
|
|
6
|
+
/** An ordered array of the seven fundamental note letters (C through B). */
|
|
4
7
|
export declare const noteLetters: readonly NoteLetter[];
|
|
5
8
|
declare const _noteAccidentalToIntegerMap: {
|
|
6
9
|
readonly "\uD834\uDD2B": -2;
|
|
@@ -9,20 +12,33 @@ declare const _noteAccidentalToIntegerMap: {
|
|
|
9
12
|
readonly "\u266F": 1;
|
|
10
13
|
readonly "\uD834\uDD2A": 2;
|
|
11
14
|
};
|
|
15
|
+
/** Valid musical accidental symbols, including double flats and double sharps. */
|
|
12
16
|
export type NoteAccidental = keyof typeof _noteAccidentalToIntegerMap;
|
|
17
|
+
/** A mapping of an accidental symbol to its numeric semitone alteration (-2 to +2). */
|
|
13
18
|
export declare const noteAccidentalToIntegerMap: ReadonlyMap<NoteAccidental, number>;
|
|
14
19
|
declare const _enharmonicNoteNameGroups: readonly [readonly ["C", "C♮", "B♯", "D𝄫"], readonly ["D♭", "C♯", "B𝄪"], readonly ["D", "D♮", "E𝄫", "C𝄪"], readonly ["E♭", "D♯", "F𝄫"], readonly ["E", "E♮", "F♭", "D𝄪"], readonly ["F", "F♮", "E♯", "G𝄫"], readonly ["G♭", "F♯", "E𝄪"], readonly ["G", "G♮", "A𝄫", "F𝄪"], readonly ["A♭", "G♯"], readonly ["A", "A♮", "B𝄫", "G𝄪"], readonly ["B♭", "A♯", "C𝄫"], readonly ["B", "B♮", "C♭", "A𝄪"]];
|
|
20
|
+
/** A fully qualified note name string, consisting of a note letter and optional accidentals. */
|
|
15
21
|
export type NoteName = (typeof _enharmonicNoteNameGroups)[number][number];
|
|
22
|
+
/** A two-dimensional array grouping note names that are enharmonically equivalent (e.g., C♯ and D♭). */
|
|
16
23
|
export declare const enharmonicNoteNameGroups: readonly (readonly NoteName[])[];
|
|
24
|
+
/** A flat list of every possible valid note name. */
|
|
17
25
|
export declare const noteNames: readonly NoteName[];
|
|
26
|
+
/** A Set of every possible valid note name, optimized for quick existence checks. */
|
|
18
27
|
export declare const noteNamesSet: ReadonlySet<NoteName>;
|
|
28
|
+
/** A mapping from a fully qualified note name string to its underlying 0-11 integer representation. */
|
|
19
29
|
export declare const noteNameToIntegerMap: ReadonlyMap<NoteName, RootNoteInteger>;
|
|
20
30
|
declare const _enharmonicRootNoteGroups: readonly [readonly ["C", "B♯"], readonly ["D♭", "C♯"], readonly ["D"], readonly ["E♭", "D♯"], readonly ["E", "F♭"], readonly ["F", "E♯"], readonly ["G♭", "F♯"], readonly ["G"], readonly ["A♭", "G♯"], readonly ["A"], readonly ["B♭", "A♯"], readonly ["B", "C♭"]];
|
|
31
|
+
/** A restricted subset of note names that are practically viable to be used as musical root notes. */
|
|
21
32
|
export type RootNote = (typeof _enharmonicRootNoteGroups)[number][number];
|
|
33
|
+
/** A two-dimensional array grouping viable root notes by their enharmonic equivalence. */
|
|
22
34
|
export declare const enharmonicRootNoteGroups: readonly (readonly RootNote[])[];
|
|
35
|
+
/** A flat list of every viable root note. */
|
|
23
36
|
export declare const rootNotes: readonly RootNote[];
|
|
37
|
+
/** A Set of every viable root note, optimized for quick existence checks. */
|
|
24
38
|
export declare const rootNotesSet: ReadonlySet<RootNote>;
|
|
39
|
+
/** A mapping from a viable root note string to its underlying 0-11 integer representation. */
|
|
25
40
|
export declare const rootNoteToIntegerMap: ReadonlyMap<RootNote, RootNoteInteger>;
|
|
41
|
+
/** A numeric string representing the numerical span of a simple interval (e.g. "3", "7"). */
|
|
26
42
|
export type SimpleIntervalNumber = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8";
|
|
27
43
|
declare const _simpleIntervalToIntegerMap: {
|
|
28
44
|
readonly "\uD834\uDD2B1": -2;
|
|
@@ -74,7 +90,9 @@ declare const _simpleIntervalToIntegerMap: {
|
|
|
74
90
|
readonly "\u266F8": 13;
|
|
75
91
|
readonly "\uD834\uDD2A8": 14;
|
|
76
92
|
};
|
|
93
|
+
/** A fully qualified simple (single octave) interval string, including an optional accidental symbol (e.g., "M3", "b7"). */
|
|
77
94
|
export type SimpleInterval = keyof typeof _simpleIntervalToIntegerMap;
|
|
95
|
+
/** A numeric string representing the numerical span of a compound interval (e.g. "9", "13"). */
|
|
78
96
|
export type CompoundIntervalNumber = "9" | "10" | "11" | "12" | "13" | "14" | "15";
|
|
79
97
|
declare const _compoundIntervalToIntegerMap: {
|
|
80
98
|
readonly "\uD834\uDD2B9": 12;
|
|
@@ -120,7 +138,9 @@ declare const _compoundIntervalToIntegerMap: {
|
|
|
120
138
|
readonly "\u266F15": 25;
|
|
121
139
|
readonly "\uD834\uDD2A15": 26;
|
|
122
140
|
};
|
|
141
|
+
/** A fully qualified compound (multi-octave) interval string (e.g., "b9", "#11"). */
|
|
123
142
|
export type CompoundInterval = keyof typeof _compoundIntervalToIntegerMap;
|
|
143
|
+
/** An interval number ignoring any quality or accidentals, and can be simple or compound. */
|
|
124
144
|
export type IntervalNumber = SimpleIntervalNumber | CompoundIntervalNumber;
|
|
125
145
|
declare const _intervalToIntegerMap: {
|
|
126
146
|
readonly "\uD834\uDD2B9": 12;
|
|
@@ -214,12 +234,19 @@ declare const _intervalToIntegerMap: {
|
|
|
214
234
|
readonly "\u266F8": 13;
|
|
215
235
|
readonly "\uD834\uDD2A8": 14;
|
|
216
236
|
};
|
|
237
|
+
/** A fully qualified simple or compound interval string. */
|
|
217
238
|
export type Interval = keyof typeof _intervalToIntegerMap;
|
|
239
|
+
/** A mapping to convert any Interval string into its integer semitone offset. */
|
|
218
240
|
export declare const intervalToIntegerMap: ReadonlyMap<Interval, number>;
|
|
241
|
+
/** A mapping converting applicable simple intervals into equivalent extended intervals (e.g., "2" -> "9"). */
|
|
219
242
|
export declare const simpleToExtensionIntervalMap: ReadonlyMap<SimpleInterval, CompoundInterval>;
|
|
243
|
+
/** A mapping converting applicable extended intervals back out into simple intervals (e.g., "9" -> "2"). */
|
|
220
244
|
export declare const extensionToSimpleIntervalMap: ReadonlyMap<CompoundInterval, SimpleInterval>;
|
|
245
|
+
/** A rigorous mapping converting *all* simple intervals into compound intervals via adding a pure octave. */
|
|
221
246
|
export declare const simpleToCompoundIntervalMap: ReadonlyMap<SimpleInterval, CompoundInterval>;
|
|
247
|
+
/** A rigorous mapping converting *all* compound intervals into simple intervals via subtracting a pure octave. */
|
|
222
248
|
export declare const compoundToSimpleIntervalMap: ReadonlyMap<CompoundInterval, SimpleInterval>;
|
|
249
|
+
/** The alphabetical descriptor of an interval's harmonic quality (e.g., major 'M', minor 'm', perfect 'P'). */
|
|
223
250
|
export type IntervalQualityType = "dd" | "d" | "m" | "P" | "M" | "A" | "AA";
|
|
224
251
|
declare const _intervalQualityToIntegerMap: {
|
|
225
252
|
readonly dd1: -2;
|
|
@@ -306,9 +333,13 @@ declare const _intervalQualityToIntegerMap: {
|
|
|
306
333
|
readonly A15: 25;
|
|
307
334
|
readonly AA15: 26;
|
|
308
335
|
};
|
|
336
|
+
/** An interval represented explicitly by its harmonic quality prefix rather than accidentals (e.g. 'M3' instead of '♮3'). */
|
|
309
337
|
export type IntervalQuality = keyof typeof _intervalQualityToIntegerMap;
|
|
338
|
+
/** Maps an interval quality explicitly to its numerical integer semitone offset. */
|
|
310
339
|
export declare const intervalQualityToIntegerMap: ReadonlyMap<IntervalQuality, number>;
|
|
340
|
+
/** Maps a generic, potentially accidental-defined interval to its proper harmonic `IntervalQuality`. */
|
|
311
341
|
export declare const intervalToIntervalQualityMap: ReadonlyMap<Interval, IntervalQuality>;
|
|
342
|
+
/** Maps a strict interval quality identifier back into its accidental-defined `Interval` string equivalent. */
|
|
312
343
|
export declare const intervalQualityToIntervalMap: ReadonlyMap<IntervalQuality, Interval>;
|
|
313
344
|
export {};
|
|
314
345
|
//# sourceMappingURL=note-labels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note-labels.d.ts","sourceRoot":"","sources":["../../../../src/src/data/labels/note-labels.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AAE9E,QAAA,MAAM,YAAY,8CAA+C,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,SAAS,UAAU,EAAiB,CAAC;AAE/D,QAAA,MAAM,2BAA2B;;;;;;CAMvB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,cAAc,EAAE,MAAM,CAGxE,CAAC;AAEJ,QAAA,MAAM,yBAAyB,kZAarB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,wBAAwB,EAAE,SAAS,CAAC,SAAS,QAAQ,EAAE,CAAC,EAC1C,CAAC;AAE5B,eAAO,MAAM,SAAS,EAAE,SAAS,QAAQ,EAAoC,CAAC;AAE9E,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAsB,CAAC;AAEtE,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,QAAQ,EAAE,eAAe,CASlE,CAAC;AAEP,QAAA,MAAM,yBAAyB,sQAarB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,yB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gB,EAChB,cAAc,CAMf,CAAC;AA6BF,6GAA6G;AAC7G,eAAO,MAAM,2BAA2B,EAAE,WAAW,CACnD,cAAc,EACd,gBAAgB,CAMjB,CAAC;AA6BF,kHAAkH;AAClH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CACnD,gBAAgB,EAChB,cAAc,CAMf,CAAC;AAEF,+GAA+G;AAC/G,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAE5E,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGxB,CAAC;AAEX,6HAA6H;AAC7H,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,4BAA4B,CAAC;AAExE,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,eAAe,EAAE,MAAM,CAG1E,CAAC;AA6GJ,wGAAwG;AACxG,eAAO,MAAM,4BAA4B,EAAE,WAAW,CACpD,QAAQ,EACR,eAAe,CAMhB,CAAC;AA8FF,+GAA+G;AAC/G,eAAO,MAAM,4BAA4B,EAAE,WAAW,CACpD,eAAe,EACf,QAAQ,CAMT,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const _noteLetters = ["C", "D", "E", "F", "G", "A", "B"];
|
|
2
|
+
/** An ordered array of the seven fundamental note letters (C through B). */
|
|
2
3
|
export const noteLetters = _noteLetters;
|
|
3
4
|
const _noteAccidentalToIntegerMap = {
|
|
4
5
|
"𝄫": -2,
|
|
@@ -7,6 +8,7 @@ const _noteAccidentalToIntegerMap = {
|
|
|
7
8
|
"♯": 1,
|
|
8
9
|
"𝄪": 2,
|
|
9
10
|
};
|
|
11
|
+
/** A mapping of an accidental symbol to its numeric semitone alteration (-2 to +2). */
|
|
10
12
|
export const noteAccidentalToIntegerMap = new Map(Object.entries(_noteAccidentalToIntegerMap));
|
|
11
13
|
const _enharmonicNoteNameGroups = [
|
|
12
14
|
["C", "C♮", "B♯", "D𝄫"],
|
|
@@ -22,9 +24,13 @@ const _enharmonicNoteNameGroups = [
|
|
|
22
24
|
["B♭", "A♯", "C𝄫"],
|
|
23
25
|
["B", "B♮", "C♭", "A𝄪"],
|
|
24
26
|
];
|
|
27
|
+
/** A two-dimensional array grouping note names that are enharmonically equivalent (e.g., C♯ and D♭). */
|
|
25
28
|
export const enharmonicNoteNameGroups = _enharmonicNoteNameGroups;
|
|
29
|
+
/** A flat list of every possible valid note name. */
|
|
26
30
|
export const noteNames = enharmonicNoteNameGroups.flat();
|
|
31
|
+
/** A Set of every possible valid note name, optimized for quick existence checks. */
|
|
27
32
|
export const noteNamesSet = new Set(noteNames);
|
|
33
|
+
/** A mapping from a fully qualified note name string to its underlying 0-11 integer representation. */
|
|
28
34
|
export const noteNameToIntegerMap = (() => {
|
|
29
35
|
const map = new Map();
|
|
30
36
|
_enharmonicNoteNameGroups.forEach((group, index) => {
|
|
@@ -48,9 +54,13 @@ const _enharmonicRootNoteGroups = [
|
|
|
48
54
|
["B♭", "A♯"],
|
|
49
55
|
["B", "C♭"],
|
|
50
56
|
];
|
|
57
|
+
/** A two-dimensional array grouping viable root notes by their enharmonic equivalence. */
|
|
51
58
|
export const enharmonicRootNoteGroups = _enharmonicRootNoteGroups;
|
|
59
|
+
/** A flat list of every viable root note. */
|
|
52
60
|
export const rootNotes = enharmonicRootNoteGroups.flat();
|
|
61
|
+
/** A Set of every viable root note, optimized for quick existence checks. */
|
|
53
62
|
export const rootNotesSet = new Set(rootNotes);
|
|
63
|
+
/** A mapping from a viable root note string to its underlying 0-11 integer representation. */
|
|
54
64
|
export const rootNoteToIntegerMap = (() => {
|
|
55
65
|
const map = new Map();
|
|
56
66
|
enharmonicRootNoteGroups.forEach((group, index) => {
|
|
@@ -158,6 +168,7 @@ const _intervalToIntegerMap = {
|
|
|
158
168
|
..._simpleIntervalToIntegerMap,
|
|
159
169
|
..._compoundIntervalToIntegerMap,
|
|
160
170
|
};
|
|
171
|
+
/** A mapping to convert any Interval string into its integer semitone offset. */
|
|
161
172
|
export const intervalToIntegerMap = new Map(Object.entries(_intervalToIntegerMap));
|
|
162
173
|
const _simpleToExtensionIntervalMap = {
|
|
163
174
|
"2": "9",
|
|
@@ -173,6 +184,7 @@ const _simpleToExtensionIntervalMap = {
|
|
|
173
184
|
"♭6": "♭13",
|
|
174
185
|
"♯6": "♯13",
|
|
175
186
|
};
|
|
187
|
+
/** A mapping converting applicable simple intervals into equivalent extended intervals (e.g., "2" -> "9"). */
|
|
176
188
|
export const simpleToExtensionIntervalMap = new Map(Object.entries(_simpleToExtensionIntervalMap));
|
|
177
189
|
const _extensionToSimpleIntervalMap = {
|
|
178
190
|
"9": "2",
|
|
@@ -188,6 +200,7 @@ const _extensionToSimpleIntervalMap = {
|
|
|
188
200
|
"♭13": "♭6",
|
|
189
201
|
"♯13": "♯6",
|
|
190
202
|
};
|
|
203
|
+
/** A mapping converting applicable extended intervals back out into simple intervals (e.g., "9" -> "2"). */
|
|
191
204
|
export const extensionToSimpleIntervalMap = new Map(Object.entries(_extensionToSimpleIntervalMap));
|
|
192
205
|
const _simpleToCompoundIntervalMap = {
|
|
193
206
|
"2": "9",
|
|
@@ -215,6 +228,7 @@ const _simpleToCompoundIntervalMap = {
|
|
|
215
228
|
"♭7": "♭14",
|
|
216
229
|
"♯7": "♯14",
|
|
217
230
|
};
|
|
231
|
+
/** A rigorous mapping converting *all* simple intervals into compound intervals via adding a pure octave. */
|
|
218
232
|
export const simpleToCompoundIntervalMap = new Map(Object.entries(_simpleToCompoundIntervalMap));
|
|
219
233
|
const _compoundToSimpleIntervalMap = {
|
|
220
234
|
"9": "2",
|
|
@@ -242,6 +256,7 @@ const _compoundToSimpleIntervalMap = {
|
|
|
242
256
|
"♭14": "♭7",
|
|
243
257
|
"♯14": "♯7",
|
|
244
258
|
};
|
|
259
|
+
/** A rigorous mapping converting *all* compound intervals into simple intervals via subtracting a pure octave. */
|
|
245
260
|
export const compoundToSimpleIntervalMap = new Map(Object.entries(_compoundToSimpleIntervalMap));
|
|
246
261
|
const _intervalQualityToIntegerMap = {
|
|
247
262
|
dd1: -2,
|
|
@@ -328,6 +343,7 @@ const _intervalQualityToIntegerMap = {
|
|
|
328
343
|
A15: 25,
|
|
329
344
|
AA15: 26,
|
|
330
345
|
};
|
|
346
|
+
/** Maps an interval quality explicitly to its numerical integer semitone offset. */
|
|
331
347
|
export const intervalQualityToIntegerMap = new Map(Object.entries(_intervalQualityToIntegerMap));
|
|
332
348
|
const _intervalToIntervalQualityMap = {
|
|
333
349
|
"𝄫1": "dd1",
|
|
@@ -421,6 +437,7 @@ const _intervalToIntervalQualityMap = {
|
|
|
421
437
|
"♯15": "A15",
|
|
422
438
|
"𝄪15": "AA15",
|
|
423
439
|
};
|
|
440
|
+
/** Maps a generic, potentially accidental-defined interval to its proper harmonic `IntervalQuality`. */
|
|
424
441
|
export const intervalToIntervalQualityMap = new Map(Object.entries(_intervalToIntervalQualityMap));
|
|
425
442
|
const _intervalQualityToIntervalMap = {
|
|
426
443
|
dd1: "𝄫1",
|
|
@@ -499,4 +516,5 @@ const _intervalQualityToIntervalMap = {
|
|
|
499
516
|
A15: "♯15",
|
|
500
517
|
AA15: "𝄪15",
|
|
501
518
|
};
|
|
519
|
+
/** Maps a strict interval quality identifier back into its accidental-defined `Interval` string equivalent. */
|
|
502
520
|
export const intervalQualityToIntervalMap = new Map(Object.entries(_intervalQualityToIntervalMap));
|
|
@@ -8,7 +8,9 @@ declare const _diatonicModes: {
|
|
|
8
8
|
readonly aeolian: ModalScaleCollection;
|
|
9
9
|
readonly locrian: ModalScaleCollection;
|
|
10
10
|
};
|
|
11
|
+
/** A strictly typed generic string representing the key of any diatonic mode. */
|
|
11
12
|
export type DiatonicModeKey = keyof typeof _diatonicModes;
|
|
13
|
+
/** A dictionary storing all 7 fundamental modes of the diatonic major scale. */
|
|
12
14
|
export declare const diatonicModes: Record<DiatonicModeKey, ModalScaleCollection>;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=diatonic-modes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diatonic-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/diatonic-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA2PzE,QAAA,MAAM,cAAc;;;;;;;;CAQV,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,cAAc,CAAC;AAE1D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,eAAe,EAAE,oBAAoB,CACxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"diatonic-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/diatonic-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA2PzE,QAAA,MAAM,cAAc;;;;;;;;CAQV,CAAC;AAEX,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,cAAc,CAAC;AAE1D,gFAAgF;AAChF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,eAAe,EAAE,oBAAoB,CACxD,CAAC"}
|
|
@@ -8,6 +8,8 @@ export declare const _harmonicMinorModes: {
|
|
|
8
8
|
readonly lydianSharp2: ModalScaleCollection;
|
|
9
9
|
readonly superLocrianDoubleFlat7: ModalScaleCollection;
|
|
10
10
|
};
|
|
11
|
+
/** A strictly typed generic string representing the key of any harmonic minor mode. */
|
|
11
12
|
export type HarmonicMinorModeKey = keyof typeof _harmonicMinorModes;
|
|
13
|
+
/** A dictionary storing all 7 fundamental modes of the harmonic minor scale. */
|
|
12
14
|
export declare const harmonicMinorModes: Record<HarmonicMinorModeKey, ModalScaleCollection>;
|
|
13
15
|
//# sourceMappingURL=harmonic-minor-modes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmonic-minor-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/harmonic-minor-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA4PzE,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAEpE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,oBAAoB,EACpB,oBAAoB,CACC,CAAC"}
|
|
1
|
+
{"version":3,"file":"harmonic-minor-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/harmonic-minor-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA4PzE,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAC;AAEX,uFAAuF;AACvF,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAEpE,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,oBAAoB,EACpB,oBAAoB,CACC,CAAC"}
|
|
@@ -8,6 +8,8 @@ export declare const _melodicMinorModes: {
|
|
|
8
8
|
readonly aeolianFlat5: ModalScaleCollection;
|
|
9
9
|
readonly altered: ModalScaleCollection;
|
|
10
10
|
};
|
|
11
|
+
/** A strictly typed generic string representing the key of any melodic minor mode. */
|
|
11
12
|
export type MelodicMinorModeKey = keyof typeof _melodicMinorModes;
|
|
13
|
+
/** A dictionary storing all 7 fundamental modes of the melodic minor scale. */
|
|
12
14
|
export declare const melodicMinorModes: Record<MelodicMinorModeKey, ModalScaleCollection>;
|
|
13
15
|
//# sourceMappingURL=melodic-minor-modes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"melodic-minor-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/melodic-minor-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA8MzE,eAAO,MAAM,kBAAkB;;;;;;;;CAQrB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,mBAAmB,EACnB,oBAAoB,CACA,CAAC"}
|
|
1
|
+
{"version":3,"file":"melodic-minor-modes.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/melodic-minor-modes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AA8MzE,eAAO,MAAM,kBAAkB;;;;;;;;CAQrB,CAAC;AAEX,sFAAsF;AACtF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,mBAAmB,EACnB,oBAAoB,CACA,CAAC"}
|
|
@@ -8,6 +8,7 @@ export { melodicMinorModes } from "./melodic-minor-modes.js";
|
|
|
8
8
|
export { diminishedVariants } from "./diminished-variants.js";
|
|
9
9
|
export { augmentedVariants } from "./augmented-variants.js";
|
|
10
10
|
export { otherNoteCollections } from "./other-collections.js";
|
|
11
|
+
/** A massive, flattened dictionary of every pre-defined musical scale, mode, chord, and arpeggio inside the library. */
|
|
11
12
|
export declare const noteCollections: {
|
|
12
13
|
readonly rootAndFifth: import("../../mod.js").NoteCollection;
|
|
13
14
|
readonly bluesPentatonic: import("../../mod.js").NoteCollection;
|
|
@@ -65,7 +66,9 @@ export declare const noteCollections: {
|
|
|
65
66
|
readonly aeolian: import("../../mod.js").ModalScaleCollection;
|
|
66
67
|
readonly locrian: import("../../mod.js").ModalScaleCollection;
|
|
67
68
|
};
|
|
69
|
+
/** A strictly typed generic string representing any key corresponding to a NoteCollection loaded in `noteCollections`. */
|
|
68
70
|
export type NoteCollectionKey = keyof typeof noteCollections;
|
|
71
|
+
/** An organized, grouped dictionary splitting note collections into theoretical categories (e.g. Diatonic Modes, Major Variants). */
|
|
69
72
|
export declare const groupedNoteCollections: {
|
|
70
73
|
readonly diatonicModes: Record<"ionian" | "dorian" | "phrygian" | "lydian" | "mixolydian" | "aeolian" | "locrian", import("../../mod.js").ModalScaleCollection>;
|
|
71
74
|
readonly pentatonicVariants: Record<"majorPentatonic" | "suspendedPentatonic" | "bluesMinorPentatonic" | "bluesMajorPentatonic" | "minorPentatonic", import("../../mod.js").ModalScaleCollection>;
|
|
@@ -78,7 +81,9 @@ export declare const groupedNoteCollections: {
|
|
|
78
81
|
readonly augmentedVariants: Record<"augmentedTriad" | "augmented7", import("../../mod.js").ChordCollection>;
|
|
79
82
|
readonly otherNoteCollections: Record<"rootAndFifth" | "bluesPentatonic" | "chromatic" | "wholeTone", import("../../mod.js").NoteCollection>;
|
|
80
83
|
};
|
|
84
|
+
/** A strictly typed generic string representing the key of a top-level note collection category array. */
|
|
81
85
|
export type NoteCollectionGroupKey = keyof typeof groupedNoteCollections;
|
|
86
|
+
/** Human-readable DisplayName and Description metadata representing the mathematical traits of a Collection Group. */
|
|
82
87
|
export declare const noteCollectionGroupsMetadata: Record<NoteCollectionGroupKey, {
|
|
83
88
|
displayName: string;
|
|
84
89
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/data/note-collections/mod.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAg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OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,wHAAwH;AACxH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWlB,CAAC;AAEX,0HAA0H;AAC1H,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE7D,qIAAqI;AACrI,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAWzB,CAAC;AAEX,0GAA0G;AAC1G,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAEzE,sHAAsH;AACtH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAC/C,sBAAsB,EACtB;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAkDO,CAAC"}
|
|
@@ -18,6 +18,7 @@ export { melodicMinorModes } from "./melodic-minor-modes.js";
|
|
|
18
18
|
export { diminishedVariants } from "./diminished-variants.js";
|
|
19
19
|
export { augmentedVariants } from "./augmented-variants.js";
|
|
20
20
|
export { otherNoteCollections } from "./other-collections.js";
|
|
21
|
+
/** A massive, flattened dictionary of every pre-defined musical scale, mode, chord, and arpeggio inside the library. */
|
|
21
22
|
export const noteCollections = {
|
|
22
23
|
...diatonicModes,
|
|
23
24
|
...pentatonicVariants,
|
|
@@ -30,6 +31,7 @@ export const noteCollections = {
|
|
|
30
31
|
...augmentedVariants,
|
|
31
32
|
...otherNoteCollections,
|
|
32
33
|
};
|
|
34
|
+
/** An organized, grouped dictionary splitting note collections into theoretical categories (e.g. Diatonic Modes, Major Variants). */
|
|
33
35
|
export const groupedNoteCollections = {
|
|
34
36
|
diatonicModes,
|
|
35
37
|
pentatonicVariants,
|
|
@@ -42,6 +44,7 @@ export const groupedNoteCollections = {
|
|
|
42
44
|
augmentedVariants,
|
|
43
45
|
otherNoteCollections,
|
|
44
46
|
};
|
|
47
|
+
/** Human-readable DisplayName and Description metadata representing the mathematical traits of a Collection Group. */
|
|
45
48
|
export const noteCollectionGroupsMetadata = {
|
|
46
49
|
diatonicModes: {
|
|
47
50
|
displayName: "Diatonic Modes",
|