@musodojo/music-theory-data 15.4.0 → 16.0.7
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 +81 -11
- package/package.json +2 -2
- package/src/data/labels/note-labels.ts +152 -1
- package/src/data/note-collections/{augmented.ts → augmented-variants.ts} +26 -20
- package/src/data/note-collections/diatonic-modes.ts +23 -16
- package/src/data/note-collections/{diminished.ts → diminished-variants.ts} +21 -11
- package/src/data/note-collections/dominant-variants.ts +26 -5
- package/src/data/note-collections/harmonic-minor-modes.ts +23 -16
- package/src/data/note-collections/major-variants.ts +14 -8
- package/src/data/note-collections/melodic-minor-modes.ts +23 -9
- package/src/data/note-collections/minor-variants.ts +14 -8
- package/src/data/note-collections/mod.ts +10 -10
- package/src/data/note-collections/other-collections.ts +9 -3
- package/src/data/note-collections/pentatonic-variants.ts +19 -21
- package/src/mod.ts +46 -15
- package/src/types/note-collections.d.ts +61 -2
- package/src/utils/{get-chords.ts → chords.ts} +22 -5
- package/src/utils/intervals.ts +31 -6
- package/src/utils/mod.ts +5 -3
- package/src/utils/rotate-array.ts +16 -1
- /package/src/utils/{get-midi-note-sequences.ts → midi-note-sequences.ts} +0 -0
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ChordCollection,
|
|
3
|
+
NoteCollection,
|
|
4
|
+
ScaleCollection,
|
|
5
|
+
} from "../../types/note-collections.d.ts";
|
|
2
6
|
|
|
3
|
-
const dominant7:
|
|
7
|
+
const dominant7: ChordCollection = {
|
|
8
|
+
category: "chord",
|
|
4
9
|
primaryName: "7",
|
|
5
10
|
names: ["7", "dom7", "Dominant 7th", "Dominant Seventh"],
|
|
6
11
|
intervals: ["1", "3", "5", "♭7"],
|
|
@@ -23,7 +28,8 @@ const dominant7: NoteCollection = {
|
|
|
23
28
|
patternShort: ["M3", "m3", "m3"],
|
|
24
29
|
} as const;
|
|
25
30
|
|
|
26
|
-
const dominant9:
|
|
31
|
+
const dominant9: ChordCollection = {
|
|
32
|
+
category: "chord",
|
|
27
33
|
primaryName: "9",
|
|
28
34
|
names: ["9", "dom9", "Dominant 9th", "Dominant Ninth"],
|
|
29
35
|
intervals: ["1", "3", "5", "♭7", "9"],
|
|
@@ -42,7 +48,8 @@ const dominant9: NoteCollection = {
|
|
|
42
48
|
patternShort: ["M3", "m3", "m3", "M3"],
|
|
43
49
|
} as const;
|
|
44
50
|
|
|
45
|
-
const dominant11:
|
|
51
|
+
const dominant11: ChordCollection = {
|
|
52
|
+
category: "chord",
|
|
46
53
|
primaryName: "11",
|
|
47
54
|
names: ["11", "dom11", "Dominant 11th", "Dominant Eleventh"],
|
|
48
55
|
intervals: ["1", "3", "5", "♭7", "9", "11"],
|
|
@@ -69,7 +76,8 @@ const dominant11: NoteCollection = {
|
|
|
69
76
|
patternShort: ["M3", "m3", "m3", "M3", "m3"],
|
|
70
77
|
} as const;
|
|
71
78
|
|
|
72
|
-
const dominant13:
|
|
79
|
+
const dominant13: ChordCollection = {
|
|
80
|
+
category: "chord",
|
|
73
81
|
primaryName: "13",
|
|
74
82
|
names: ["13", "dom13", "Dominant 13th", "Dominant Thirteenth"],
|
|
75
83
|
intervals: ["1", "3", "5", "♭7", "9", "11", "13"],
|
|
@@ -97,11 +105,24 @@ const dominant13: NoteCollection = {
|
|
|
97
105
|
patternShort: ["M3", "m3", "m3", "M3", "m3", "m3"],
|
|
98
106
|
} as const;
|
|
99
107
|
|
|
108
|
+
const dominantPentatonic: ScaleCollection = {
|
|
109
|
+
category: "scale",
|
|
110
|
+
primaryName: "Dominant Pentatonic",
|
|
111
|
+
names: ["Dominant Pentatonic"],
|
|
112
|
+
intervals: ["1", "2", "3", "5", "♭7", "8"],
|
|
113
|
+
integers: [0, 2, 4, 7, 10],
|
|
114
|
+
type: ["dominant", "pentatonic", "scale", "gapped scale"],
|
|
115
|
+
characteristics: ["bluesy", "dominant feel", "mixolydian flavor"],
|
|
116
|
+
pattern: ["whole", "whole", "minor third", "minor third"],
|
|
117
|
+
patternShort: ["W", "W", "m3", "m3"],
|
|
118
|
+
} as const;
|
|
119
|
+
|
|
100
120
|
export const _dominantVariants = {
|
|
101
121
|
dominant7,
|
|
102
122
|
dominant9,
|
|
103
123
|
dominant11,
|
|
104
124
|
dominant13,
|
|
125
|
+
dominantPentatonic,
|
|
105
126
|
} as const;
|
|
106
127
|
|
|
107
128
|
export type DominantVariantKey = keyof typeof _dominantVariants;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScaleCollection } from "../../types/note-collections.d.ts";
|
|
2
2
|
|
|
3
|
-
const harmonicMinor:
|
|
3
|
+
const harmonicMinor: ScaleCollection = {
|
|
4
|
+
category: "scale",
|
|
5
|
+
rotation: 0,
|
|
4
6
|
primaryName: "Harmonic Minor",
|
|
5
7
|
names: [
|
|
6
8
|
"Harmonic Minor",
|
|
@@ -10,7 +12,6 @@ const harmonicMinor: NoteCollection = {
|
|
|
10
12
|
],
|
|
11
13
|
intervals: ["1", "2", "♭3", "4", "5", "♭6", "7", "8"],
|
|
12
14
|
integers: [0, 2, 3, 5, 7, 8, 11],
|
|
13
|
-
rotation: 0,
|
|
14
15
|
type: ["harmonic minor mode", "minor", "scale", "mode", "heptatonic"],
|
|
15
16
|
characteristics: [
|
|
16
17
|
"dark",
|
|
@@ -33,12 +34,13 @@ const harmonicMinor: NoteCollection = {
|
|
|
33
34
|
patternShort: ["W", "H", "W", "W", "H", "A2", "H"],
|
|
34
35
|
} as const;
|
|
35
36
|
|
|
36
|
-
const locrianNatural6:
|
|
37
|
+
const locrianNatural6: ScaleCollection = {
|
|
38
|
+
category: "scale",
|
|
39
|
+
rotation: 1,
|
|
37
40
|
primaryName: "Locrian ♮6",
|
|
38
41
|
names: ["Locrian ♮6", "Locrian Natural Sixth", "Locrian Raised Sixth"],
|
|
39
42
|
intervals: ["1", "♭2", "♭3", "4", "♭5", "6", "♭7", "8"],
|
|
40
43
|
integers: [0, 1, 3, 5, 6, 9, 10],
|
|
41
|
-
rotation: 1,
|
|
42
44
|
type: ["harmonic minor mode", "diminished", "scale", "mode", "heptatonic"],
|
|
43
45
|
characteristics: [
|
|
44
46
|
"dark",
|
|
@@ -59,7 +61,9 @@ const locrianNatural6: NoteCollection = {
|
|
|
59
61
|
patternShort: ["H", "W", "W", "H", "A2", "H", "W"],
|
|
60
62
|
} as const;
|
|
61
63
|
|
|
62
|
-
const ionianSharp5:
|
|
64
|
+
const ionianSharp5: ScaleCollection = {
|
|
65
|
+
category: "scale",
|
|
66
|
+
rotation: 2,
|
|
63
67
|
primaryName: "Ionian ♯5",
|
|
64
68
|
names: [
|
|
65
69
|
"Ionian ♯5",
|
|
@@ -69,7 +73,6 @@ const ionianSharp5: NoteCollection = {
|
|
|
69
73
|
],
|
|
70
74
|
intervals: ["1", "2", "3", "4", "♯5", "6", "7", "8"],
|
|
71
75
|
integers: [0, 2, 4, 5, 8, 9, 11],
|
|
72
|
-
rotation: 2,
|
|
73
76
|
type: [
|
|
74
77
|
"harmonic minor mode",
|
|
75
78
|
"major",
|
|
@@ -97,7 +100,9 @@ const ionianSharp5: NoteCollection = {
|
|
|
97
100
|
patternShort: ["W", "W", "H", "A2", "H", "W", "W"],
|
|
98
101
|
} as const;
|
|
99
102
|
|
|
100
|
-
const dorianSharp4:
|
|
103
|
+
const dorianSharp4: ScaleCollection = {
|
|
104
|
+
category: "scale",
|
|
105
|
+
rotation: 3,
|
|
101
106
|
primaryName: "Dorian ♯4",
|
|
102
107
|
names: [
|
|
103
108
|
"Dorian ♯4",
|
|
@@ -109,7 +114,6 @@ const dorianSharp4: NoteCollection = {
|
|
|
109
114
|
],
|
|
110
115
|
intervals: ["1", "2", "♭3", "♯4", "5", "6", "♭7", "8"],
|
|
111
116
|
integers: [0, 2, 3, 6, 7, 9, 10],
|
|
112
|
-
rotation: 3,
|
|
113
117
|
type: ["harmonic minor mode", "minor", "scale", "heptatonic"],
|
|
114
118
|
characteristics: ["exotic minor", "eastern european folk", "gypsy"],
|
|
115
119
|
pattern: [
|
|
@@ -124,7 +128,9 @@ const dorianSharp4: NoteCollection = {
|
|
|
124
128
|
patternShort: ["W", "H", "A2", "H", "W", "W", "H"],
|
|
125
129
|
} as const;
|
|
126
130
|
|
|
127
|
-
const phrygianDominant:
|
|
131
|
+
const phrygianDominant: ScaleCollection = {
|
|
132
|
+
category: "scale",
|
|
133
|
+
rotation: 4,
|
|
128
134
|
primaryName: "Phrygian Dominant",
|
|
129
135
|
names: [
|
|
130
136
|
"Phrygian Dominant",
|
|
@@ -138,7 +144,6 @@ const phrygianDominant: NoteCollection = {
|
|
|
138
144
|
],
|
|
139
145
|
intervals: ["1", "♭2", "3", "4", "5", "♭6", "♭7", "8"],
|
|
140
146
|
integers: [0, 1, 4, 5, 7, 8, 10],
|
|
141
|
-
rotation: 4,
|
|
142
147
|
type: ["harmonic minor mode", "dominant", "scale", "heptatonic"],
|
|
143
148
|
characteristics: [
|
|
144
149
|
"very exotic",
|
|
@@ -161,7 +166,9 @@ const phrygianDominant: NoteCollection = {
|
|
|
161
166
|
patternShort: ["H", "A2", "H", "W", "H", "W", "W"],
|
|
162
167
|
} as const;
|
|
163
168
|
|
|
164
|
-
const lydianSharp2:
|
|
169
|
+
const lydianSharp2: ScaleCollection = {
|
|
170
|
+
category: "scale",
|
|
171
|
+
rotation: 5,
|
|
165
172
|
primaryName: "Lydian ♯2",
|
|
166
173
|
names: [
|
|
167
174
|
"Lydian ♯2",
|
|
@@ -171,7 +178,6 @@ const lydianSharp2: NoteCollection = {
|
|
|
171
178
|
],
|
|
172
179
|
intervals: ["1", "♯2", "3", "♯4", "5", "6", "7", "8"],
|
|
173
180
|
integers: [0, 3, 4, 6, 7, 9, 11],
|
|
174
|
-
rotation: 5,
|
|
175
181
|
type: ["harmonic minor mode", "major", "scale", "heptatonic"],
|
|
176
182
|
characteristics: ["very bright", "unusual", "double augmented", "exotic"],
|
|
177
183
|
pattern: [
|
|
@@ -186,7 +192,9 @@ const lydianSharp2: NoteCollection = {
|
|
|
186
192
|
patternShort: ["A2", "H", "W", "H", "W", "W", "W"],
|
|
187
193
|
} as const;
|
|
188
194
|
|
|
189
|
-
const superLocrianDoubleFlat7:
|
|
195
|
+
const superLocrianDoubleFlat7: ScaleCollection = {
|
|
196
|
+
category: "scale",
|
|
197
|
+
rotation: 6,
|
|
190
198
|
primaryName: "Super Locrian 𝄫7",
|
|
191
199
|
names: [
|
|
192
200
|
"Super Locrian 𝄫7",
|
|
@@ -196,7 +204,6 @@ const superLocrianDoubleFlat7: NoteCollection = {
|
|
|
196
204
|
],
|
|
197
205
|
intervals: ["1", "♭2", "♭3", "♭4", "♭5", "♭6", "𝄫7", "8"],
|
|
198
206
|
integers: [0, 1, 3, 4, 6, 8, 9],
|
|
199
|
-
rotation: 6,
|
|
200
207
|
type: ["harmonic minor mode", "diminished", "scale", "heptatonic"],
|
|
201
208
|
characteristics: [
|
|
202
209
|
"extremely tense",
|
|
@@ -220,5 +227,5 @@ export const _harmonicMinorModes = {
|
|
|
220
227
|
|
|
221
228
|
export type HarmonicMinorModeKey = keyof typeof _harmonicMinorModes;
|
|
222
229
|
|
|
223
|
-
export const harmonicMinorModes: Record<HarmonicMinorModeKey,
|
|
230
|
+
export const harmonicMinorModes: Record<HarmonicMinorModeKey, ScaleCollection> =
|
|
224
231
|
_harmonicMinorModes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChordCollection } from "../../types/note-collections.d.ts";
|
|
2
2
|
|
|
3
|
-
const major:
|
|
3
|
+
const major: ChordCollection = {
|
|
4
|
+
category: "chord",
|
|
4
5
|
primaryName: "M",
|
|
5
6
|
names: ["M", "maj", "Major", "Major Triad", "Δ"],
|
|
6
7
|
intervals: ["1", "3", "5"],
|
|
@@ -16,7 +17,8 @@ const major: NoteCollection = {
|
|
|
16
17
|
patternShort: ["M3", "m3"],
|
|
17
18
|
} as const;
|
|
18
19
|
|
|
19
|
-
const major6:
|
|
20
|
+
const major6: ChordCollection = {
|
|
21
|
+
category: "chord",
|
|
20
22
|
primaryName: "6",
|
|
21
23
|
names: ["6", "M6", "maj6", "Major 6th", "Major Sixth"],
|
|
22
24
|
intervals: ["1", "3", "5", "6"],
|
|
@@ -35,7 +37,8 @@ const major6: NoteCollection = {
|
|
|
35
37
|
patternShort: ["M3", "m3", "M2"],
|
|
36
38
|
} as const;
|
|
37
39
|
|
|
38
|
-
const major7:
|
|
40
|
+
const major7: ChordCollection = {
|
|
41
|
+
category: "chord",
|
|
39
42
|
primaryName: "M7",
|
|
40
43
|
names: ["M7", "maj7", "Major 7th", "Major Seventh", "Δ7"],
|
|
41
44
|
intervals: ["1", "3", "5", "7"],
|
|
@@ -53,7 +56,8 @@ const major7: NoteCollection = {
|
|
|
53
56
|
patternShort: ["M3", "m3", "M3"],
|
|
54
57
|
} as const;
|
|
55
58
|
|
|
56
|
-
const major9:
|
|
59
|
+
const major9: ChordCollection = {
|
|
60
|
+
category: "chord",
|
|
57
61
|
primaryName: "M9",
|
|
58
62
|
names: ["M9", "maj9", "Major 9th", "Major Ninth", "Δ9"],
|
|
59
63
|
intervals: ["1", "3", "5", "7", "9"],
|
|
@@ -72,7 +76,8 @@ const major9: NoteCollection = {
|
|
|
72
76
|
patternShort: ["M3", "m3", "M3", "m3"],
|
|
73
77
|
} as const;
|
|
74
78
|
|
|
75
|
-
const majorAdd9:
|
|
79
|
+
const majorAdd9: ChordCollection = {
|
|
80
|
+
category: "chord",
|
|
76
81
|
primaryName: "add9",
|
|
77
82
|
names: ["add9", "maj(add9)", "M(add9)", "Major add 9"],
|
|
78
83
|
intervals: ["1", "3", "5", "9"],
|
|
@@ -91,7 +96,8 @@ const majorAdd9: NoteCollection = {
|
|
|
91
96
|
patternShort: ["M3", "m3", "P5"],
|
|
92
97
|
} as const;
|
|
93
98
|
|
|
94
|
-
const major6Add9:
|
|
99
|
+
const major6Add9: ChordCollection = {
|
|
100
|
+
category: "chord",
|
|
95
101
|
primaryName: "6/9",
|
|
96
102
|
names: ["6/9", "M6/9", "maj6/9", "Major 6/9", "6add9", "Major add 6 add 9"],
|
|
97
103
|
intervals: ["1", "3", "5", "6", "9"],
|
|
@@ -125,5 +131,5 @@ export const _majorVariants = {
|
|
|
125
131
|
|
|
126
132
|
export type MajorVariantKey = keyof typeof _majorVariants;
|
|
127
133
|
|
|
128
|
-
export const majorVariants: Record<MajorVariantKey,
|
|
134
|
+
export const majorVariants: Record<MajorVariantKey, ChordCollection> =
|
|
129
135
|
_majorVariants;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScaleCollection } from "../../types/note-collections.d.ts";
|
|
2
2
|
|
|
3
|
-
const melodicMinor:
|
|
3
|
+
const melodicMinor: ScaleCollection = {
|
|
4
|
+
category: "scale",
|
|
5
|
+
rotation: 0,
|
|
4
6
|
primaryName: "Melodic Minor",
|
|
5
7
|
names: [
|
|
6
8
|
"Melodic Minor",
|
|
@@ -31,7 +33,9 @@ const melodicMinor: NoteCollection = {
|
|
|
31
33
|
patternShort: ["W", "H", "W", "W", "W", "W", "H"],
|
|
32
34
|
} as const;
|
|
33
35
|
|
|
34
|
-
const dorianFlat2:
|
|
36
|
+
const dorianFlat2: ScaleCollection = {
|
|
37
|
+
category: "scale",
|
|
38
|
+
rotation: 1,
|
|
35
39
|
primaryName: "Dorian ♭2",
|
|
36
40
|
names: [
|
|
37
41
|
"Dorian ♭2",
|
|
@@ -55,7 +59,9 @@ const dorianFlat2: NoteCollection = {
|
|
|
55
59
|
patternShort: ["H", "W", "W", "W", "W", "H", "W"],
|
|
56
60
|
} as const;
|
|
57
61
|
|
|
58
|
-
const lydianAugmented:
|
|
62
|
+
const lydianAugmented: ScaleCollection = {
|
|
63
|
+
category: "scale",
|
|
64
|
+
rotation: 2,
|
|
59
65
|
primaryName: "Lydian Augmented",
|
|
60
66
|
names: ["Lydian Augmented", "Lydian ♯5", "Lydian Sharp Fifth"],
|
|
61
67
|
intervals: ["1", "2", "3", "♯4", "♯5", "6", "7", "8"],
|
|
@@ -80,7 +86,9 @@ const lydianAugmented: NoteCollection = {
|
|
|
80
86
|
patternShort: ["W", "W", "W", "W", "H", "W", "H"],
|
|
81
87
|
} as const;
|
|
82
88
|
|
|
83
|
-
const lydianDominant:
|
|
89
|
+
const lydianDominant: ScaleCollection = {
|
|
90
|
+
category: "scale",
|
|
91
|
+
rotation: 3,
|
|
84
92
|
primaryName: "Lydian Dominant",
|
|
85
93
|
names: [
|
|
86
94
|
"Lydian Dominant",
|
|
@@ -108,7 +116,9 @@ const lydianDominant: NoteCollection = {
|
|
|
108
116
|
patternShort: ["W", "W", "W", "H", "W", "H", "W"],
|
|
109
117
|
} as const;
|
|
110
118
|
|
|
111
|
-
const mixolydianFlat6:
|
|
119
|
+
const mixolydianFlat6: ScaleCollection = {
|
|
120
|
+
category: "scale",
|
|
121
|
+
rotation: 4,
|
|
112
122
|
primaryName: "Mixolydian ♭6",
|
|
113
123
|
names: [
|
|
114
124
|
"Mixolydian ♭6",
|
|
@@ -133,7 +143,9 @@ const mixolydianFlat6: NoteCollection = {
|
|
|
133
143
|
patternShort: ["W", "W", "H", "W", "H", "W", "W"],
|
|
134
144
|
} as const;
|
|
135
145
|
|
|
136
|
-
const aeolianFlat5:
|
|
146
|
+
const aeolianFlat5: ScaleCollection = {
|
|
147
|
+
category: "scale",
|
|
148
|
+
rotation: 5,
|
|
137
149
|
primaryName: "Aeolian ♭5",
|
|
138
150
|
names: [
|
|
139
151
|
"Aeolian ♭5",
|
|
@@ -158,7 +170,9 @@ const aeolianFlat5: NoteCollection = {
|
|
|
158
170
|
patternShort: ["W", "H", "W", "H", "W", "W", "W"],
|
|
159
171
|
} as const;
|
|
160
172
|
|
|
161
|
-
const altered:
|
|
173
|
+
const altered: ScaleCollection = {
|
|
174
|
+
category: "scale",
|
|
175
|
+
rotation: 6,
|
|
162
176
|
primaryName: "Altered Scale",
|
|
163
177
|
names: [
|
|
164
178
|
"Altered Scale",
|
|
@@ -194,5 +208,5 @@ export const _melodicMinorModes = {
|
|
|
194
208
|
|
|
195
209
|
export type MelodicMinorModeKey = keyof typeof _melodicMinorModes;
|
|
196
210
|
|
|
197
|
-
export const melodicMinorModes: Record<MelodicMinorModeKey,
|
|
211
|
+
export const melodicMinorModes: Record<MelodicMinorModeKey, ScaleCollection> =
|
|
198
212
|
_melodicMinorModes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChordCollection } from "../../types/note-collections.d.ts";
|
|
2
2
|
|
|
3
|
-
const minor:
|
|
3
|
+
const minor: ChordCollection = {
|
|
4
|
+
category: "chord",
|
|
4
5
|
primaryName: "m",
|
|
5
6
|
names: ["m", "min", "Minor", "Minor Triad", "-"],
|
|
6
7
|
intervals: ["1", "♭3", "5"],
|
|
@@ -16,7 +17,8 @@ const minor: NoteCollection = {
|
|
|
16
17
|
patternShort: ["m3", "M3"],
|
|
17
18
|
} as const;
|
|
18
19
|
|
|
19
|
-
const minor6:
|
|
20
|
+
const minor6: ChordCollection = {
|
|
21
|
+
category: "chord",
|
|
20
22
|
primaryName: "m6",
|
|
21
23
|
names: ["m6", "min6", "Minor 6th", "Minor Sixth"],
|
|
22
24
|
intervals: ["1", "♭3", "5", "6"],
|
|
@@ -32,7 +34,8 @@ const minor6: NoteCollection = {
|
|
|
32
34
|
patternShort: ["m3", "M3", "M2"],
|
|
33
35
|
} as const;
|
|
34
36
|
|
|
35
|
-
const minor7:
|
|
37
|
+
const minor7: ChordCollection = {
|
|
38
|
+
category: "chord",
|
|
36
39
|
primaryName: "m7",
|
|
37
40
|
names: ["m7", "min7", "Minor 7th", "Minor Seventh", "-7"],
|
|
38
41
|
intervals: ["1", "♭3", "5", "♭7"],
|
|
@@ -43,7 +46,8 @@ const minor7: NoteCollection = {
|
|
|
43
46
|
patternShort: ["m3", "M3", "m3"],
|
|
44
47
|
} as const;
|
|
45
48
|
|
|
46
|
-
const minor9:
|
|
49
|
+
const minor9: ChordCollection = {
|
|
50
|
+
category: "chord",
|
|
47
51
|
primaryName: "m9",
|
|
48
52
|
names: ["m9", "min9", "Minor 9th", "Minor Ninth", "-9"],
|
|
49
53
|
intervals: ["1", "♭3", "5", "♭7", "9"],
|
|
@@ -54,7 +58,8 @@ const minor9: NoteCollection = {
|
|
|
54
58
|
patternShort: ["m3", "M3", "m3", "M3"],
|
|
55
59
|
} as const;
|
|
56
60
|
|
|
57
|
-
const minorAdd9:
|
|
61
|
+
const minorAdd9: ChordCollection = {
|
|
62
|
+
category: "chord",
|
|
58
63
|
primaryName: "m(add9)",
|
|
59
64
|
names: ["m(add9)", "min(add9)", "Minor add 9"],
|
|
60
65
|
intervals: ["1", "♭3", "5", "9"],
|
|
@@ -70,7 +75,8 @@ const minorAdd9: NoteCollection = {
|
|
|
70
75
|
patternShort: ["m3", "M3", "P5"],
|
|
71
76
|
} as const;
|
|
72
77
|
|
|
73
|
-
const minor6Add9:
|
|
78
|
+
const minor6Add9: ChordCollection = {
|
|
79
|
+
category: "chord",
|
|
74
80
|
primaryName: "m6/9",
|
|
75
81
|
names: ["m6/9", "min6/9", "Minor 6/9"],
|
|
76
82
|
intervals: ["1", "♭3", "5", "6", "9"],
|
|
@@ -97,5 +103,5 @@ export const _minorVariants = {
|
|
|
97
103
|
|
|
98
104
|
export type MinorVariantKey = keyof typeof _minorVariants;
|
|
99
105
|
|
|
100
|
-
export const minorVariants: Record<MinorVariantKey,
|
|
106
|
+
export const minorVariants: Record<MinorVariantKey, ChordCollection> =
|
|
101
107
|
_minorVariants;
|
|
@@ -5,8 +5,8 @@ import { minorVariants } from "./minor-variants.ts";
|
|
|
5
5
|
import { dominantVariants } from "./dominant-variants.ts";
|
|
6
6
|
import { harmonicMinorModes } from "./harmonic-minor-modes.ts";
|
|
7
7
|
import { melodicMinorModes } from "./melodic-minor-modes.ts";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { diminishedVariants } from "./diminished-variants.ts";
|
|
9
|
+
import { augmentedVariants } from "./augmented-variants.ts";
|
|
10
10
|
import { otherNoteCollections } from "./other-collections.ts";
|
|
11
11
|
|
|
12
12
|
export { diatonicModes } from "./diatonic-modes.ts";
|
|
@@ -16,8 +16,8 @@ export { minorVariants } from "./minor-variants.ts";
|
|
|
16
16
|
export { dominantVariants } from "./dominant-variants.ts";
|
|
17
17
|
export { harmonicMinorModes } from "./harmonic-minor-modes.ts";
|
|
18
18
|
export { melodicMinorModes } from "./melodic-minor-modes.ts";
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
19
|
+
export { diminishedVariants } from "./diminished-variants.ts";
|
|
20
|
+
export { augmentedVariants } from "./augmented-variants.ts";
|
|
21
21
|
export { otherNoteCollections } from "./other-collections.ts";
|
|
22
22
|
|
|
23
23
|
export const noteCollections = {
|
|
@@ -28,8 +28,8 @@ export const noteCollections = {
|
|
|
28
28
|
...dominantVariants,
|
|
29
29
|
...harmonicMinorModes,
|
|
30
30
|
...melodicMinorModes,
|
|
31
|
-
...
|
|
32
|
-
...
|
|
31
|
+
...diminishedVariants,
|
|
32
|
+
...augmentedVariants,
|
|
33
33
|
...otherNoteCollections,
|
|
34
34
|
} as const;
|
|
35
35
|
|
|
@@ -43,8 +43,8 @@ export const groupedNoteCollections = {
|
|
|
43
43
|
dominantVariants,
|
|
44
44
|
harmonicMinorModes,
|
|
45
45
|
melodicMinorModes,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
diminishedVariants,
|
|
47
|
+
augmentedVariants,
|
|
48
48
|
otherNoteCollections,
|
|
49
49
|
} as const;
|
|
50
50
|
|
|
@@ -91,11 +91,11 @@ export const noteCollectionGroupsMetadata: Record<
|
|
|
91
91
|
description:
|
|
92
92
|
"Seven-note scales derived from the melodic minor scale, each starting on a different scale degree.",
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
diminishedVariants: {
|
|
95
95
|
displayName: "Diminished",
|
|
96
96
|
description: "Tense and dissonant chords and scales built on minor thirds.",
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
augmentedVariants: {
|
|
99
99
|
displayName: "Augmented",
|
|
100
100
|
description:
|
|
101
101
|
"Unstable and dreamy chords and scales, including classical augmented sixth chords.",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
NoteCollection,
|
|
3
|
+
ScaleCollection,
|
|
4
|
+
} from "../../types/note-collections.d.ts";
|
|
5
|
+
|
|
6
|
+
const chromatic: ScaleCollection = {
|
|
7
|
+
category: "scale",
|
|
3
8
|
primaryName: "Chromatic",
|
|
4
9
|
names: ["Chromatic", "Twelve-Tone Scale"],
|
|
5
10
|
intervals: [
|
|
@@ -42,7 +47,8 @@ const chromatic: NoteCollection = {
|
|
|
42
47
|
patternShort: ["H", "H", "H", "H", "H", "H", "H", "H", "H", "H", "H"],
|
|
43
48
|
} as const;
|
|
44
49
|
|
|
45
|
-
const wholeTone:
|
|
50
|
+
const wholeTone: ScaleCollection = {
|
|
51
|
+
category: "scale",
|
|
46
52
|
primaryName: "Whole Tone Scale",
|
|
47
53
|
names: [
|
|
48
54
|
"Whole Tone Scale",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScaleCollection } from "../../types/note-collections.d.ts";
|
|
2
2
|
|
|
3
|
-
const majorPentatonic:
|
|
3
|
+
const majorPentatonic: ScaleCollection = {
|
|
4
|
+
category: "scale",
|
|
5
|
+
rotation: 0,
|
|
4
6
|
primaryName: "Major Pentatonic",
|
|
5
7
|
names: ["Major Pentatonic"],
|
|
6
8
|
intervals: ["1", "2", "3", "5", "6", "8"],
|
|
@@ -18,7 +20,9 @@ const majorPentatonic: NoteCollection = {
|
|
|
18
20
|
patternShort: ["W", "W", "m3", "W", "m3"],
|
|
19
21
|
} as const;
|
|
20
22
|
|
|
21
|
-
const suspendedPentatonic:
|
|
23
|
+
const suspendedPentatonic: ScaleCollection = {
|
|
24
|
+
category: "scale",
|
|
25
|
+
rotation: 1,
|
|
22
26
|
primaryName: "Suspended Pentatonic",
|
|
23
27
|
names: ["Suspended Pentatonic", "Egyptian Pentatonic"],
|
|
24
28
|
intervals: ["1", "2", "4", "5", "♭7", "8"],
|
|
@@ -29,7 +33,9 @@ const suspendedPentatonic: NoteCollection = {
|
|
|
29
33
|
patternShort: ["W", "m3", "W", "m3"],
|
|
30
34
|
} as const;
|
|
31
35
|
|
|
32
|
-
const bluesMinorPentatonic:
|
|
36
|
+
const bluesMinorPentatonic: ScaleCollection = {
|
|
37
|
+
category: "scale",
|
|
38
|
+
rotation: 2,
|
|
33
39
|
primaryName: "Blues Minor Pentatonic",
|
|
34
40
|
names: ["Blues Minor Pentatonic"],
|
|
35
41
|
intervals: ["1", "♭3", "4", "♭5", "♭7", "8"],
|
|
@@ -40,7 +46,9 @@ const bluesMinorPentatonic: NoteCollection = {
|
|
|
40
46
|
patternShort: ["m3", "W", "H", "m3"],
|
|
41
47
|
} as const;
|
|
42
48
|
|
|
43
|
-
const bluesMajorPentatonic:
|
|
49
|
+
const bluesMajorPentatonic: ScaleCollection = {
|
|
50
|
+
category: "scale",
|
|
51
|
+
rotation: 3,
|
|
44
52
|
primaryName: "Blues Major Pentatonic",
|
|
45
53
|
names: ["Blues Major Pentatonic"],
|
|
46
54
|
intervals: ["1", "2", "♭3", "5", "6", "8"],
|
|
@@ -51,7 +59,9 @@ const bluesMajorPentatonic: NoteCollection = {
|
|
|
51
59
|
patternShort: ["W", "H", "M3", "W"],
|
|
52
60
|
} as const;
|
|
53
61
|
|
|
54
|
-
const minorPentatonic:
|
|
62
|
+
const minorPentatonic: ScaleCollection = {
|
|
63
|
+
category: "scale",
|
|
64
|
+
rotation: 4,
|
|
55
65
|
primaryName: "Minor Pentatonic",
|
|
56
66
|
names: ["Minor Pentatonic"],
|
|
57
67
|
intervals: ["1", "♭3", "4", "5", "♭7", "8"],
|
|
@@ -64,19 +74,8 @@ const minorPentatonic: NoteCollection = {
|
|
|
64
74
|
"found in many cultures",
|
|
65
75
|
"relative of major pentatonic",
|
|
66
76
|
],
|
|
67
|
-
pattern: ["minor third", "whole", "whole", "minor third"],
|
|
68
|
-
patternShort: ["m3", "W", "W", "m3"],
|
|
69
|
-
} as const;
|
|
70
|
-
|
|
71
|
-
const dominantPentatonic: NoteCollection = {
|
|
72
|
-
primaryName: "Dominant Pentatonic",
|
|
73
|
-
names: ["Dominant Pentatonic"],
|
|
74
|
-
intervals: ["1", "2", "3", "5", "♭7", "8"],
|
|
75
|
-
integers: [0, 2, 4, 7, 10],
|
|
76
|
-
type: ["dominant", "pentatonic", "scale", "gapped scale"],
|
|
77
|
-
characteristics: ["bluesy", "dominant feel", "mixolydian flavor"],
|
|
78
|
-
pattern: ["whole", "whole", "minor third", "minor third"],
|
|
79
|
-
patternShort: ["W", "W", "m3", "m3"],
|
|
77
|
+
pattern: ["minor third", "whole", "whole", "minor third", "whole"],
|
|
78
|
+
patternShort: ["m3", "W", "W", "m3", "W"],
|
|
80
79
|
} as const;
|
|
81
80
|
|
|
82
81
|
export const _pentatonicVariants = {
|
|
@@ -85,10 +84,9 @@ export const _pentatonicVariants = {
|
|
|
85
84
|
bluesMinorPentatonic,
|
|
86
85
|
bluesMajorPentatonic,
|
|
87
86
|
minorPentatonic,
|
|
88
|
-
dominantPentatonic,
|
|
89
87
|
} as const;
|
|
90
88
|
|
|
91
89
|
export type PentatonicVariantKey = keyof typeof _pentatonicVariants;
|
|
92
90
|
|
|
93
|
-
export const pentatonicVariants: Record<PentatonicVariantKey,
|
|
91
|
+
export const pentatonicVariants: Record<PentatonicVariantKey, ScaleCollection> =
|
|
94
92
|
_pentatonicVariants;
|
package/src/mod.ts
CHANGED
|
@@ -13,28 +13,59 @@
|
|
|
13
13
|
* import * as music_theory_data from "jsr:@musodojo/music-theory-data";
|
|
14
14
|
*
|
|
15
15
|
* // You can now access all the data and functions.
|
|
16
|
+
*
|
|
16
17
|
* // The details for the Ionian Diatonic Mode (Major Scale).
|
|
17
18
|
* console.log("ionian details: ", music_theory_data.noteCollections.ionian);
|
|
18
19
|
* // ionian details: {
|
|
19
|
-
* //
|
|
20
|
-
* //
|
|
21
|
-
* //
|
|
22
|
-
* //
|
|
23
|
-
* //
|
|
24
|
-
* //
|
|
25
|
-
* //
|
|
26
|
-
* //
|
|
27
|
-
* //
|
|
28
|
-
* //
|
|
29
|
-
* // ],
|
|
30
|
-
* //
|
|
31
|
-
* //
|
|
32
|
-
* //
|
|
33
|
-
* //
|
|
20
|
+
* // category: "scale",
|
|
21
|
+
* // rotation: 0,
|
|
22
|
+
* // primaryName: "Major",
|
|
23
|
+
* // names: [
|
|
24
|
+
* // "Major",
|
|
25
|
+
* // "Ionian",
|
|
26
|
+
* // "Major Scale",
|
|
27
|
+
* // "Ionian Mode",
|
|
28
|
+
* // "Diatonic Major",
|
|
29
|
+
* // ],
|
|
30
|
+
* // intervals: ["1", "2", "3", "4", "5", "6", "7", "8"],
|
|
31
|
+
* // integers: [0, 2, 4, 5, 7, 9, 11],
|
|
32
|
+
* // type: [
|
|
33
|
+
* // "major",
|
|
34
|
+
* // "ionian",
|
|
35
|
+
* // "mode",
|
|
36
|
+
* // "scale",
|
|
37
|
+
* // "church mode",
|
|
38
|
+
* // "diatonic mode",
|
|
39
|
+
* // "heptatonic",
|
|
40
|
+
* // "first diatonic mode",
|
|
41
|
+
* // "do mode",
|
|
42
|
+
* // ],
|
|
43
|
+
* // characteristics: [
|
|
44
|
+
* // "bright",
|
|
45
|
+
* // "happy",
|
|
46
|
+
* // "stable",
|
|
47
|
+
* // "uplifting",
|
|
48
|
+
* // "consonant",
|
|
49
|
+
* // "western",
|
|
50
|
+
* // "foundational",
|
|
51
|
+
* // "simple",
|
|
52
|
+
* // "pop music",
|
|
53
|
+
* // "major tonality",
|
|
54
|
+
* // "commonly used western scale",
|
|
55
|
+
* // ],
|
|
56
|
+
* // pattern: ["whole", "whole", "half", "whole", "whole", "whole", "half"],
|
|
57
|
+
* // patternShort: ["W", "W", "H", "W", "W", "W", "H"],
|
|
34
58
|
* // }
|
|
59
|
+
*
|
|
35
60
|
* // Get the notes of a stored chord, or scale.
|
|
36
61
|
* console.log("A harmonic minor: ", music_theory_data.getNoteNamesFromRootAndCollectionKey("A", "harmonicMinor"))
|
|
37
62
|
* // A harmonic minor: ["A", "B", "C", "D", "E", "F", "G♯", "A"]
|
|
63
|
+
*
|
|
64
|
+
* // Log the array of all available Note Collection Keys
|
|
65
|
+
* console.log(Object.keys(music_theory_data.noteCollections));
|
|
66
|
+
*
|
|
67
|
+
* // Log the array of all available Grouped Note Collections Keys
|
|
68
|
+
* console.log(Object.keys(music_theory_data.groupedNoteCollections));
|
|
38
69
|
* ```
|
|
39
70
|
*/
|
|
40
71
|
export * from "./data/mod.ts";
|