@musodojo/music-theory-data 14.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/LICENSE +122 -0
- package/README.md +15 -0
- package/package.json +16 -0
- package/src/data/chords/mod.ts +86 -0
- package/src/data/colors/mod.ts +109 -0
- package/src/data/labels/mod.ts +2 -0
- package/src/data/labels/note-label-collections.ts +124 -0
- package/src/data/labels/note-labels.ts +451 -0
- package/src/data/mod.ts +4 -0
- package/src/data/note-collections/diatonic-modes.ts +267 -0
- package/src/data/note-collections/dominant-variants.ts +110 -0
- package/src/data/note-collections/harmonic-minor-modes.ts +224 -0
- package/src/data/note-collections/major-variants.ts +129 -0
- package/src/data/note-collections/melodic-minor-modes.ts +198 -0
- package/src/data/note-collections/mod.ts +74 -0
- package/src/data/note-collections/other-collections.ts +76 -0
- package/src/data/note-collections/todo.txt +265 -0
- package/src/mod.ts +24 -0
- package/src/types/chords.d.ts +48 -0
- package/src/types/midi.d.ts +133 -0
- package/src/types/mod.d.ts +3 -0
- package/src/types/note-collections.d.ts +13 -0
- package/src/utils/get-chords.ts +166 -0
- package/src/utils/get-midi-note-sequences.ts +168 -0
- package/src/utils/intervals.ts +74 -0
- package/src/utils/midi.ts +50 -0
- package/src/utils/mod.ts +5 -0
- package/src/utils/note-collections.ts +170 -0
- package/src/utils/note-names.ts +188 -0
- package/src/utils/rotate-array.ts +15 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
export type NoteInteger = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
2
|
+
|
|
3
|
+
const _noteLetters = [
|
|
4
|
+
"C",
|
|
5
|
+
"D",
|
|
6
|
+
"E",
|
|
7
|
+
"F",
|
|
8
|
+
"G",
|
|
9
|
+
"A",
|
|
10
|
+
"B",
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
export type NoteLetter = typeof _noteLetters[number];
|
|
14
|
+
|
|
15
|
+
export const noteLetters: readonly NoteLetter[] = _noteLetters;
|
|
16
|
+
|
|
17
|
+
const _noteAccidentalToIntegerMap = {
|
|
18
|
+
"𝄫": -2,
|
|
19
|
+
"♭": -1,
|
|
20
|
+
"♮": 0,
|
|
21
|
+
"♯": 1,
|
|
22
|
+
"𝄪": 2,
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
25
|
+
export type NoteAccidental = keyof typeof _noteAccidentalToIntegerMap;
|
|
26
|
+
|
|
27
|
+
export const noteAccidentalToIntegerMap: ReadonlyMap<NoteAccidental, number> =
|
|
28
|
+
new Map(
|
|
29
|
+
Object.entries(_noteAccidentalToIntegerMap) as [NoteAccidental, number][],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const _enharmonicNoteNameGroups = [
|
|
33
|
+
["C", "C♮", "B♯", "D𝄫"],
|
|
34
|
+
["D♭", "C♯", "B𝄪"],
|
|
35
|
+
["D", "D♮", "E𝄫", "C𝄪"],
|
|
36
|
+
["E♭", "D♯", "F𝄫"],
|
|
37
|
+
["E", "E♮", "F♭", "D𝄪"],
|
|
38
|
+
["F", "F♮", "E♯", "G𝄫"],
|
|
39
|
+
["G♭", "F♯", "E𝄪"],
|
|
40
|
+
["G", "G♮", "A𝄫", "F𝄪"],
|
|
41
|
+
["A♭", "G♯"],
|
|
42
|
+
["A", "A♮", "B𝄫", "G𝄪"],
|
|
43
|
+
["B♭", "A♯", "C𝄫"],
|
|
44
|
+
["B", "B♮", "C♭", "A𝄪"],
|
|
45
|
+
] as const;
|
|
46
|
+
|
|
47
|
+
export type NoteName = typeof _enharmonicNoteNameGroups[number][number];
|
|
48
|
+
|
|
49
|
+
export const enharmonicNoteNameGroups: readonly (readonly NoteName[])[] =
|
|
50
|
+
_enharmonicNoteNameGroups;
|
|
51
|
+
|
|
52
|
+
export const noteNames: readonly NoteName[] = enharmonicNoteNameGroups.flat();
|
|
53
|
+
|
|
54
|
+
export const noteNamesSet: ReadonlySet<NoteName> = new Set(noteNames);
|
|
55
|
+
|
|
56
|
+
export const noteNameToIntegerMap: ReadonlyMap<NoteName, NoteInteger> = (() => {
|
|
57
|
+
const map = new Map<NoteName, NoteInteger>();
|
|
58
|
+
_enharmonicNoteNameGroups.forEach((group, index) => {
|
|
59
|
+
group.forEach((note) => {
|
|
60
|
+
map.set(note, index as NoteInteger);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return map;
|
|
64
|
+
})();
|
|
65
|
+
|
|
66
|
+
const _enharmonicRootNoteGroups = [
|
|
67
|
+
["C", "B♯"],
|
|
68
|
+
["D♭", "C♯"],
|
|
69
|
+
["D"],
|
|
70
|
+
["E♭", "D♯"],
|
|
71
|
+
["E", "F♭"],
|
|
72
|
+
["F", "E♯"],
|
|
73
|
+
["G♭", "F♯"],
|
|
74
|
+
["G"],
|
|
75
|
+
["A♭", "G♯"],
|
|
76
|
+
["A"],
|
|
77
|
+
["B♭", "A♯"],
|
|
78
|
+
["B", "C♭"],
|
|
79
|
+
] as const;
|
|
80
|
+
|
|
81
|
+
export type RootNote = typeof _enharmonicRootNoteGroups[number][number];
|
|
82
|
+
|
|
83
|
+
export const enharmonicRootNoteGroups: readonly (readonly RootNote[])[] =
|
|
84
|
+
_enharmonicRootNoteGroups;
|
|
85
|
+
|
|
86
|
+
export const rootNotes: readonly RootNote[] = enharmonicRootNoteGroups.flat();
|
|
87
|
+
|
|
88
|
+
export const rootNotesSet: ReadonlySet<RootNote> = new Set(rootNotes);
|
|
89
|
+
|
|
90
|
+
export const rootNoteToIntegerMap: ReadonlyMap<RootNote, NoteInteger> = (() => {
|
|
91
|
+
const map = new Map<RootNote, NoteInteger>();
|
|
92
|
+
enharmonicRootNoteGroups.forEach((group, index) => {
|
|
93
|
+
group.forEach((note) => {
|
|
94
|
+
map.set(note, index as NoteInteger);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
return map;
|
|
98
|
+
})();
|
|
99
|
+
|
|
100
|
+
export type SimpleIntervalNumber =
|
|
101
|
+
| "1"
|
|
102
|
+
| "2"
|
|
103
|
+
| "3"
|
|
104
|
+
| "4"
|
|
105
|
+
| "5"
|
|
106
|
+
| "6"
|
|
107
|
+
| "7"
|
|
108
|
+
| "8";
|
|
109
|
+
|
|
110
|
+
const _simpleIntervalToIntegerMap = {
|
|
111
|
+
"𝄫1": -2,
|
|
112
|
+
"♭1": -1,
|
|
113
|
+
"♮1": 0,
|
|
114
|
+
"1": 0,
|
|
115
|
+
"♯1": 1,
|
|
116
|
+
"𝄪1": 2,
|
|
117
|
+
|
|
118
|
+
"𝄫2": 0,
|
|
119
|
+
"♭2": 1,
|
|
120
|
+
"♮2": 2,
|
|
121
|
+
"2": 2,
|
|
122
|
+
"♯2": 3,
|
|
123
|
+
"𝄪2": 4,
|
|
124
|
+
|
|
125
|
+
"𝄫3": 2,
|
|
126
|
+
"♭3": 3,
|
|
127
|
+
"♮3": 4,
|
|
128
|
+
"3": 4,
|
|
129
|
+
"♯3": 5,
|
|
130
|
+
"𝄪3": 6,
|
|
131
|
+
|
|
132
|
+
"𝄫4": 3,
|
|
133
|
+
"♭4": 4,
|
|
134
|
+
"♮4": 5,
|
|
135
|
+
"4": 5,
|
|
136
|
+
"♯4": 6,
|
|
137
|
+
"𝄪4": 7,
|
|
138
|
+
|
|
139
|
+
"𝄫5": 5,
|
|
140
|
+
"♭5": 6,
|
|
141
|
+
"♮5": 7,
|
|
142
|
+
"5": 7,
|
|
143
|
+
"♯5": 8,
|
|
144
|
+
"𝄪5": 9,
|
|
145
|
+
|
|
146
|
+
"𝄫6": 7,
|
|
147
|
+
"♭6": 8,
|
|
148
|
+
"♮6": 9,
|
|
149
|
+
"6": 9,
|
|
150
|
+
"♯6": 10,
|
|
151
|
+
"𝄪6": 11,
|
|
152
|
+
|
|
153
|
+
"𝄫7": 9,
|
|
154
|
+
"♭7": 10,
|
|
155
|
+
"♮7": 11,
|
|
156
|
+
"7": 11,
|
|
157
|
+
"♯7": 12,
|
|
158
|
+
"𝄪7": 13,
|
|
159
|
+
|
|
160
|
+
"𝄫8": 10,
|
|
161
|
+
"♭8": 11,
|
|
162
|
+
"♮8": 12,
|
|
163
|
+
"8": 12,
|
|
164
|
+
"♯8": 13,
|
|
165
|
+
"𝄪8": 14,
|
|
166
|
+
} as const;
|
|
167
|
+
|
|
168
|
+
export type SimpleInterval = keyof typeof _simpleIntervalToIntegerMap;
|
|
169
|
+
|
|
170
|
+
export type CompoundIntervalNumber =
|
|
171
|
+
| "9"
|
|
172
|
+
| "10"
|
|
173
|
+
| "11"
|
|
174
|
+
| "12"
|
|
175
|
+
| "13"
|
|
176
|
+
| "14"
|
|
177
|
+
| "15";
|
|
178
|
+
|
|
179
|
+
const _compoundIntervalToIntegerMap = {
|
|
180
|
+
"𝄫9": 12,
|
|
181
|
+
"♭9": 13,
|
|
182
|
+
"♮9": 14,
|
|
183
|
+
"9": 14,
|
|
184
|
+
"♯9": 15,
|
|
185
|
+
"𝄪9": 16,
|
|
186
|
+
|
|
187
|
+
"𝄫10": 14,
|
|
188
|
+
"♭10": 15,
|
|
189
|
+
"♮10": 16,
|
|
190
|
+
"10": 16,
|
|
191
|
+
"♯10": 17,
|
|
192
|
+
"𝄪10": 18,
|
|
193
|
+
|
|
194
|
+
"𝄫11": 15,
|
|
195
|
+
"♭11": 16,
|
|
196
|
+
"♮11": 17,
|
|
197
|
+
"11": 17,
|
|
198
|
+
"♯11": 18,
|
|
199
|
+
"𝄪11": 19,
|
|
200
|
+
|
|
201
|
+
"𝄫12": 17,
|
|
202
|
+
"♭12": 18,
|
|
203
|
+
"♮12": 19,
|
|
204
|
+
"12": 19,
|
|
205
|
+
"♯12": 20,
|
|
206
|
+
"𝄪12": 21,
|
|
207
|
+
|
|
208
|
+
"𝄫13": 19,
|
|
209
|
+
"♭13": 20,
|
|
210
|
+
"♮13": 21,
|
|
211
|
+
"13": 21,
|
|
212
|
+
"♯13": 22,
|
|
213
|
+
"𝄪13": 23,
|
|
214
|
+
|
|
215
|
+
"𝄫14": 21,
|
|
216
|
+
"♭14": 22,
|
|
217
|
+
"♮14": 23,
|
|
218
|
+
"14": 23,
|
|
219
|
+
"♯14": 24,
|
|
220
|
+
"𝄪14": 25,
|
|
221
|
+
|
|
222
|
+
"𝄫15": 22,
|
|
223
|
+
"♭15": 23,
|
|
224
|
+
"♮15": 24,
|
|
225
|
+
"15": 24,
|
|
226
|
+
"♯15": 25,
|
|
227
|
+
"𝄪15": 26,
|
|
228
|
+
} as const;
|
|
229
|
+
|
|
230
|
+
export type CompoundInterval = keyof typeof _compoundIntervalToIntegerMap;
|
|
231
|
+
|
|
232
|
+
export type IntervalNumber = SimpleIntervalNumber | CompoundIntervalNumber;
|
|
233
|
+
|
|
234
|
+
const _intervalToIntegerMap = {
|
|
235
|
+
..._simpleIntervalToIntegerMap,
|
|
236
|
+
..._compoundIntervalToIntegerMap,
|
|
237
|
+
} as const;
|
|
238
|
+
|
|
239
|
+
export type Interval = keyof typeof _intervalToIntegerMap;
|
|
240
|
+
|
|
241
|
+
export const intervalToIntegerMap: ReadonlyMap<Interval, number> = new Map(
|
|
242
|
+
Object.entries(_intervalToIntegerMap) as [Interval, number][],
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
const _simpleToExtensionIntervalMap = {
|
|
246
|
+
"2": "9",
|
|
247
|
+
"♮2": "♮9",
|
|
248
|
+
"♭2": "♭9",
|
|
249
|
+
"♯2": "♯9",
|
|
250
|
+
"4": "11",
|
|
251
|
+
"♮4": "♮11",
|
|
252
|
+
"♭4": "♭11",
|
|
253
|
+
"♯4": "♯11",
|
|
254
|
+
"6": "13",
|
|
255
|
+
"♮6": "♮13",
|
|
256
|
+
"♭6": "♭13",
|
|
257
|
+
"♯6": "♯13",
|
|
258
|
+
} as const;
|
|
259
|
+
|
|
260
|
+
export const simpleToExtensionIntervalMap: ReadonlyMap<
|
|
261
|
+
SimpleInterval,
|
|
262
|
+
CompoundInterval
|
|
263
|
+
> = new Map(
|
|
264
|
+
Object.entries(_simpleToExtensionIntervalMap) as [
|
|
265
|
+
SimpleInterval,
|
|
266
|
+
CompoundInterval,
|
|
267
|
+
][],
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
const _extensionToSimpleIntervalMap = {
|
|
271
|
+
"9": "2",
|
|
272
|
+
"♮9": "♮2",
|
|
273
|
+
"♭9": "♭2",
|
|
274
|
+
"♯9": "♯2",
|
|
275
|
+
"11": "4",
|
|
276
|
+
"♮11": "♮4",
|
|
277
|
+
"♭11": "♭4",
|
|
278
|
+
"♯11": "♯4",
|
|
279
|
+
"13": "6",
|
|
280
|
+
"♮13": "♮6",
|
|
281
|
+
"♭13": "♭6",
|
|
282
|
+
"♯13": "♯6",
|
|
283
|
+
} as const;
|
|
284
|
+
|
|
285
|
+
export const extensionToSimpleIntervalMap: ReadonlyMap<
|
|
286
|
+
CompoundInterval,
|
|
287
|
+
SimpleInterval
|
|
288
|
+
> = new Map(
|
|
289
|
+
Object.entries(_extensionToSimpleIntervalMap) as [
|
|
290
|
+
CompoundInterval,
|
|
291
|
+
SimpleInterval,
|
|
292
|
+
][],
|
|
293
|
+
);
|
|
294
|
+
|
|
295
|
+
const _simpleToCompoundIntervalMap = {
|
|
296
|
+
"2": "9",
|
|
297
|
+
"♮2": "♮9",
|
|
298
|
+
"♭2": "♭9",
|
|
299
|
+
"♯2": "♯9",
|
|
300
|
+
"3": "10",
|
|
301
|
+
"♮3": "♮10",
|
|
302
|
+
"♭3": "♭10",
|
|
303
|
+
"♯3": "♯10",
|
|
304
|
+
"4": "11",
|
|
305
|
+
"♮4": "♮11",
|
|
306
|
+
"♭4": "♭11",
|
|
307
|
+
"♯4": "♯11",
|
|
308
|
+
"5": "12",
|
|
309
|
+
"♮5": "♮12",
|
|
310
|
+
"♭5": "♭12",
|
|
311
|
+
"♯5": "♯12",
|
|
312
|
+
"6": "13",
|
|
313
|
+
"♮6": "♮13",
|
|
314
|
+
"♭6": "♭13",
|
|
315
|
+
"♯6": "♯13",
|
|
316
|
+
"7": "14",
|
|
317
|
+
"♮7": "♮14",
|
|
318
|
+
"♭7": "♭14",
|
|
319
|
+
"♯7": "♯14",
|
|
320
|
+
} as const;
|
|
321
|
+
|
|
322
|
+
export const simpleToCompoundIntervalMap: ReadonlyMap<
|
|
323
|
+
SimpleInterval,
|
|
324
|
+
CompoundInterval
|
|
325
|
+
> = new Map(
|
|
326
|
+
Object.entries(_simpleToCompoundIntervalMap) as [
|
|
327
|
+
SimpleInterval,
|
|
328
|
+
CompoundInterval,
|
|
329
|
+
][],
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
const _compoundToSimpleIntervalMap = {
|
|
333
|
+
"9": "2",
|
|
334
|
+
"♮9": "♮2",
|
|
335
|
+
"♭9": "♭2",
|
|
336
|
+
"♯9": "♯2",
|
|
337
|
+
"10": "3",
|
|
338
|
+
"♮10": "♮3",
|
|
339
|
+
"♭10": "♭3",
|
|
340
|
+
"♯10": "♯3",
|
|
341
|
+
"11": "4",
|
|
342
|
+
"♮11": "♮4",
|
|
343
|
+
"♭11": "♭4",
|
|
344
|
+
"♯11": "♯4",
|
|
345
|
+
"12": "5",
|
|
346
|
+
"♮12": "♮5",
|
|
347
|
+
"♭12": "♭5",
|
|
348
|
+
"♯12": "♯5",
|
|
349
|
+
"13": "6",
|
|
350
|
+
"♮13": "♮6",
|
|
351
|
+
"♭13": "♭6",
|
|
352
|
+
"♯13": "♯6",
|
|
353
|
+
"14": "7",
|
|
354
|
+
"♮14": "♮7",
|
|
355
|
+
"♭14": "♭7",
|
|
356
|
+
"♯14": "♯7",
|
|
357
|
+
} as const;
|
|
358
|
+
|
|
359
|
+
export const compoundToSimpleIntervalMap: ReadonlyMap<
|
|
360
|
+
CompoundInterval,
|
|
361
|
+
SimpleInterval
|
|
362
|
+
> = new Map(
|
|
363
|
+
Object.entries(_compoundToSimpleIntervalMap) as [
|
|
364
|
+
CompoundInterval,
|
|
365
|
+
SimpleInterval,
|
|
366
|
+
][],
|
|
367
|
+
);
|
|
368
|
+
|
|
369
|
+
export type IntervalQualityType = "d" | "m" | "P" | "M" | "A";
|
|
370
|
+
|
|
371
|
+
const _intervalQualityToIntegerMap = {
|
|
372
|
+
"d1": -1,
|
|
373
|
+
"P1": 0,
|
|
374
|
+
"A1": 1,
|
|
375
|
+
|
|
376
|
+
"d2": 0,
|
|
377
|
+
"m2": 1,
|
|
378
|
+
"M2": 2,
|
|
379
|
+
"A2": 3,
|
|
380
|
+
|
|
381
|
+
"d3": 2,
|
|
382
|
+
"m3": 3,
|
|
383
|
+
"M3": 4,
|
|
384
|
+
"A3": 5,
|
|
385
|
+
|
|
386
|
+
"d4": 4,
|
|
387
|
+
"P4": 5,
|
|
388
|
+
"A4": 6,
|
|
389
|
+
|
|
390
|
+
"d5": 6,
|
|
391
|
+
"P5": 7,
|
|
392
|
+
"A5": 8,
|
|
393
|
+
|
|
394
|
+
"d6": 7,
|
|
395
|
+
"m6": 8,
|
|
396
|
+
"M6": 9,
|
|
397
|
+
"A6": 10,
|
|
398
|
+
|
|
399
|
+
"d7": 9,
|
|
400
|
+
"m7": 10,
|
|
401
|
+
"M7": 11,
|
|
402
|
+
"A7": 12,
|
|
403
|
+
|
|
404
|
+
"d8": 11,
|
|
405
|
+
"P8": 12,
|
|
406
|
+
"A8": 13,
|
|
407
|
+
|
|
408
|
+
"d9": 12,
|
|
409
|
+
"m9": 13,
|
|
410
|
+
"M9": 14,
|
|
411
|
+
"A9": 15,
|
|
412
|
+
|
|
413
|
+
"d10": 14,
|
|
414
|
+
"m10": 15,
|
|
415
|
+
"M10": 16,
|
|
416
|
+
"A10": 17,
|
|
417
|
+
|
|
418
|
+
"d11": 16,
|
|
419
|
+
"P11": 17,
|
|
420
|
+
"A11": 19,
|
|
421
|
+
|
|
422
|
+
"d12": 18,
|
|
423
|
+
"P12": 19,
|
|
424
|
+
"A12": 20,
|
|
425
|
+
|
|
426
|
+
"d13": 19,
|
|
427
|
+
"m13": 20,
|
|
428
|
+
"M13": 21,
|
|
429
|
+
"A13": 22,
|
|
430
|
+
|
|
431
|
+
"d14": 21,
|
|
432
|
+
"m14": 22,
|
|
433
|
+
"M14": 23,
|
|
434
|
+
"A14": 24,
|
|
435
|
+
|
|
436
|
+
"d15": 23,
|
|
437
|
+
"P15": 24,
|
|
438
|
+
"A15": 25,
|
|
439
|
+
} as const;
|
|
440
|
+
|
|
441
|
+
export type IntervalQuality = keyof typeof _intervalQualityToIntegerMap;
|
|
442
|
+
|
|
443
|
+
export const intervalQualityToIntegerMap: ReadonlyMap<
|
|
444
|
+
IntervalQuality,
|
|
445
|
+
number
|
|
446
|
+
> = new Map(
|
|
447
|
+
Object.entries(_intervalQualityToIntegerMap) as [
|
|
448
|
+
IntervalQuality,
|
|
449
|
+
number,
|
|
450
|
+
][],
|
|
451
|
+
);
|
package/src/data/mod.ts
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import type { NoteCollection } from "../../types/note-collections.d.ts";
|
|
2
|
+
|
|
3
|
+
const ionian: NoteCollection = {
|
|
4
|
+
primaryName: "Major",
|
|
5
|
+
names: [
|
|
6
|
+
"Major",
|
|
7
|
+
"Ionian",
|
|
8
|
+
"Major Scale",
|
|
9
|
+
"Ionian Mode",
|
|
10
|
+
"Diatonic Major",
|
|
11
|
+
],
|
|
12
|
+
intervals: ["1", "2", "3", "4", "5", "6", "7", "8"],
|
|
13
|
+
integers: [0, 2, 4, 5, 7, 9, 11],
|
|
14
|
+
rotation: 0,
|
|
15
|
+
type: [
|
|
16
|
+
"major",
|
|
17
|
+
"ionian",
|
|
18
|
+
"mode",
|
|
19
|
+
"scale",
|
|
20
|
+
"church mode",
|
|
21
|
+
"diatonic mode",
|
|
22
|
+
"heptatonic",
|
|
23
|
+
"first diatonic mode",
|
|
24
|
+
"do mode",
|
|
25
|
+
],
|
|
26
|
+
characteristics: [
|
|
27
|
+
"bright",
|
|
28
|
+
"happy",
|
|
29
|
+
"stable",
|
|
30
|
+
"uplifting",
|
|
31
|
+
"consonant",
|
|
32
|
+
"western",
|
|
33
|
+
"foundational",
|
|
34
|
+
"simple",
|
|
35
|
+
"pop music",
|
|
36
|
+
"major tonality",
|
|
37
|
+
"commonly used western scale",
|
|
38
|
+
],
|
|
39
|
+
pattern: ["whole", "whole", "half", "whole", "whole", "whole", "half"],
|
|
40
|
+
patternShort: ["W", "W", "H", "W", "W", "W", "H"],
|
|
41
|
+
} as const;
|
|
42
|
+
|
|
43
|
+
const dorian: NoteCollection = {
|
|
44
|
+
primaryName: "Dorian",
|
|
45
|
+
names: [
|
|
46
|
+
"Dorian",
|
|
47
|
+
"Minor ♮6",
|
|
48
|
+
"Dorian Mode",
|
|
49
|
+
],
|
|
50
|
+
intervals: ["1", "2", "♭3", "4", "5", "6", "♭7", "8"],
|
|
51
|
+
integers: [0, 2, 3, 5, 7, 9, 10],
|
|
52
|
+
rotation: 1,
|
|
53
|
+
type: [
|
|
54
|
+
"minor",
|
|
55
|
+
"dorian",
|
|
56
|
+
"mode",
|
|
57
|
+
"scale",
|
|
58
|
+
"church mode",
|
|
59
|
+
"diatonic mode",
|
|
60
|
+
"heptatonic",
|
|
61
|
+
"second diatonic mode",
|
|
62
|
+
"re mode",
|
|
63
|
+
],
|
|
64
|
+
characteristics: [
|
|
65
|
+
"soulful",
|
|
66
|
+
"funky",
|
|
67
|
+
"jazzy",
|
|
68
|
+
"hopeful",
|
|
69
|
+
"celtic",
|
|
70
|
+
"folk",
|
|
71
|
+
"minor tonality",
|
|
72
|
+
"versatile",
|
|
73
|
+
"used in folk, jazz, and rock",
|
|
74
|
+
"medieval",
|
|
75
|
+
"minor feel with a hopeful twist",
|
|
76
|
+
],
|
|
77
|
+
pattern: ["whole", "half", "whole", "whole", "whole", "half", "whole"],
|
|
78
|
+
patternShort: ["W", "H", "W", "W", "W", "H", "W"],
|
|
79
|
+
} as const;
|
|
80
|
+
|
|
81
|
+
const phrygian: NoteCollection = {
|
|
82
|
+
primaryName: "Phrygian",
|
|
83
|
+
names: [
|
|
84
|
+
"Phrygian",
|
|
85
|
+
"Minor ♭2",
|
|
86
|
+
"Phrygian Mode",
|
|
87
|
+
],
|
|
88
|
+
intervals: ["1", "♭2", "♭3", "4", "5", "♭6", "♭7", "8"],
|
|
89
|
+
integers: [0, 1, 3, 5, 7, 8, 10],
|
|
90
|
+
rotation: 2,
|
|
91
|
+
type: [
|
|
92
|
+
"minor",
|
|
93
|
+
"phrygian",
|
|
94
|
+
"mode",
|
|
95
|
+
"scale",
|
|
96
|
+
"church mode",
|
|
97
|
+
"diatonic mode",
|
|
98
|
+
"heptatonic",
|
|
99
|
+
"third diatonic mode",
|
|
100
|
+
"mi mode",
|
|
101
|
+
],
|
|
102
|
+
characteristics: [
|
|
103
|
+
"exotic",
|
|
104
|
+
"spanish",
|
|
105
|
+
"flamenco",
|
|
106
|
+
"tense",
|
|
107
|
+
"dark",
|
|
108
|
+
"dramatic",
|
|
109
|
+
"minor tonality",
|
|
110
|
+
"darker emotional tones",
|
|
111
|
+
"often used in metal and flamenco",
|
|
112
|
+
],
|
|
113
|
+
pattern: ["half", "whole", "whole", "whole", "half", "whole", "whole"],
|
|
114
|
+
patternShort: ["H", "W", "W", "W", "H", "W", "W"],
|
|
115
|
+
} as const;
|
|
116
|
+
|
|
117
|
+
const lydian: NoteCollection = {
|
|
118
|
+
primaryName: "Lydian",
|
|
119
|
+
names: ["Lydian", "Major ♯4", "Lydian Mode"],
|
|
120
|
+
intervals: ["1", "2", "3", "♯4", "5", "6", "7", "8"],
|
|
121
|
+
integers: [0, 2, 4, 6, 7, 9, 11],
|
|
122
|
+
rotation: 3,
|
|
123
|
+
type: [
|
|
124
|
+
"major",
|
|
125
|
+
"lydian",
|
|
126
|
+
"mode",
|
|
127
|
+
"scale",
|
|
128
|
+
"church mode",
|
|
129
|
+
"diatonic mode",
|
|
130
|
+
"heptatonic",
|
|
131
|
+
"fourth diatonic mode",
|
|
132
|
+
"fa mode",
|
|
133
|
+
],
|
|
134
|
+
characteristics: [
|
|
135
|
+
"dreamy",
|
|
136
|
+
"floating",
|
|
137
|
+
"ethereal",
|
|
138
|
+
"cinematic",
|
|
139
|
+
"bright",
|
|
140
|
+
"bright major tonality",
|
|
141
|
+
"used in film scores and jazz",
|
|
142
|
+
],
|
|
143
|
+
pattern: ["whole", "whole", "whole", "half", "whole", "whole", "half"],
|
|
144
|
+
patternShort: ["W", "W", "W", "H", "W", "W", "H"],
|
|
145
|
+
} as const;
|
|
146
|
+
|
|
147
|
+
const mixolydian: NoteCollection = {
|
|
148
|
+
primaryName: "Mixolydian",
|
|
149
|
+
names: [
|
|
150
|
+
"Mixolydian",
|
|
151
|
+
"Major ♭7",
|
|
152
|
+
"Dominant Scale",
|
|
153
|
+
"Mixolydian Mode",
|
|
154
|
+
],
|
|
155
|
+
intervals: ["1", "2", "3", "4", "5", "6", "♭7", "8"],
|
|
156
|
+
integers: [0, 2, 4, 5, 7, 9, 10],
|
|
157
|
+
rotation: 4,
|
|
158
|
+
type: [
|
|
159
|
+
"major",
|
|
160
|
+
"dominant",
|
|
161
|
+
"mixolydian",
|
|
162
|
+
"mode",
|
|
163
|
+
"scale",
|
|
164
|
+
"church mode",
|
|
165
|
+
"diatonic mode",
|
|
166
|
+
"heptatonic",
|
|
167
|
+
"fifth diatonic mode",
|
|
168
|
+
"sol mode",
|
|
169
|
+
],
|
|
170
|
+
characteristics: [
|
|
171
|
+
"bluesy",
|
|
172
|
+
"dominant",
|
|
173
|
+
"funky",
|
|
174
|
+
"rock",
|
|
175
|
+
"energetic",
|
|
176
|
+
"major tonality",
|
|
177
|
+
"strong blues and rock feel",
|
|
178
|
+
],
|
|
179
|
+
pattern: ["whole", "whole", "half", "whole", "whole", "half", "whole"],
|
|
180
|
+
patternShort: ["W", "W", "H", "W", "W", "H", "W"],
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
const aeolian: NoteCollection = {
|
|
184
|
+
primaryName: "Minor",
|
|
185
|
+
names: [
|
|
186
|
+
"Minor",
|
|
187
|
+
"Aeolian",
|
|
188
|
+
"Natural Minor Scale",
|
|
189
|
+
"Aeolian Mode",
|
|
190
|
+
"Descending Melodic Minor Scale",
|
|
191
|
+
],
|
|
192
|
+
intervals: ["1", "2", "♭3", "4", "5", "♭6", "♭7", "8"],
|
|
193
|
+
integers: [0, 2, 3, 5, 7, 8, 10],
|
|
194
|
+
rotation: 5,
|
|
195
|
+
type: [
|
|
196
|
+
"minor",
|
|
197
|
+
"aeolian",
|
|
198
|
+
"natural",
|
|
199
|
+
"mode",
|
|
200
|
+
"scale",
|
|
201
|
+
"church mode",
|
|
202
|
+
"diatonic mode",
|
|
203
|
+
"heptatonic",
|
|
204
|
+
"sixth diatonic mode",
|
|
205
|
+
"la mode",
|
|
206
|
+
],
|
|
207
|
+
characteristics: [
|
|
208
|
+
"melancholic",
|
|
209
|
+
"sad",
|
|
210
|
+
"somber",
|
|
211
|
+
"introspective",
|
|
212
|
+
"dark",
|
|
213
|
+
"minor tonality",
|
|
214
|
+
"the relative minor of the major scale",
|
|
215
|
+
],
|
|
216
|
+
pattern: ["whole", "half", "whole", "whole", "half", "whole", "whole"],
|
|
217
|
+
patternShort: ["W", "H", "W", "W", "H", "W", "W"],
|
|
218
|
+
} as const;
|
|
219
|
+
|
|
220
|
+
const locrian: NoteCollection = {
|
|
221
|
+
primaryName: "Locrian",
|
|
222
|
+
names: [
|
|
223
|
+
"Locrian",
|
|
224
|
+
"Minor ♭2 ♭5",
|
|
225
|
+
"Locrian Mode",
|
|
226
|
+
],
|
|
227
|
+
intervals: ["1", "♭2", "♭3", "4", "♭5", "♭6", "♭7", "8"],
|
|
228
|
+
integers: [0, 1, 3, 5, 6, 8, 10],
|
|
229
|
+
rotation: 6,
|
|
230
|
+
type: [
|
|
231
|
+
"diminished",
|
|
232
|
+
"locrian",
|
|
233
|
+
"mode",
|
|
234
|
+
"scale",
|
|
235
|
+
"church mode",
|
|
236
|
+
"diatonic mode",
|
|
237
|
+
"heptatonic",
|
|
238
|
+
"seventh diatonic mode",
|
|
239
|
+
"ti mode",
|
|
240
|
+
],
|
|
241
|
+
characteristics: [
|
|
242
|
+
"unsettling",
|
|
243
|
+
"tense",
|
|
244
|
+
"dark",
|
|
245
|
+
"unstable",
|
|
246
|
+
"dissonant",
|
|
247
|
+
"highly dissonant",
|
|
248
|
+
"rarely used as a tonal center",
|
|
249
|
+
],
|
|
250
|
+
pattern: ["half", "whole", "whole", "half", "whole", "whole", "whole"],
|
|
251
|
+
patternShort: ["H", "W", "W", "H", "W", "W", "W"],
|
|
252
|
+
} as const;
|
|
253
|
+
|
|
254
|
+
const _diatonicModes = {
|
|
255
|
+
ionian,
|
|
256
|
+
dorian,
|
|
257
|
+
phrygian,
|
|
258
|
+
lydian,
|
|
259
|
+
mixolydian,
|
|
260
|
+
aeolian,
|
|
261
|
+
locrian,
|
|
262
|
+
} as const;
|
|
263
|
+
|
|
264
|
+
export type DiatonicModeKey = keyof typeof _diatonicModes;
|
|
265
|
+
|
|
266
|
+
export const diatonicModes: Record<DiatonicModeKey, NoteCollection> =
|
|
267
|
+
_diatonicModes;
|