MCPcopy
hub / github.com/scribbletune/scribbletune / getChordDegrees

Function getChordDegrees

src/progression.ts:12–28  ·  view source on GitHub ↗
(mode: string)

Source from the content-addressed store, hash-verified

10 * @return {Array} e.g.['I', 'ii', 'iii', 'IV', 'V', 'vi', 'vii°']
11 */
12export const getChordDegrees = (mode: string): string[] => {
13 const theRomans: NVP<string[]> = {
14 ionian: ['I', 'ii', 'iii', 'IV', 'V', 'vi', 'vii°'],
15 dorian: ['i', 'ii', 'III', 'IV', 'v', 'vi°', 'VII'],
16 phrygian: ['i', 'II', 'III', 'iv', 'v°', 'VI', 'vii'],
17 lydian: ['I', 'II', 'iii', 'iv°', 'V', 'vi', 'vii'],
18 mixolydian: ['I', 'ii', 'iii°', 'IV', 'v', 'vi', 'VII'],
19 aeolian: ['i', 'ii°', 'III', 'iv', 'v', 'VI', 'VII'],
20 locrian: ['i°', 'II', 'iii', 'iv', 'V', 'VI', 'vii'],
21 'melodic minor': ['i', 'ii', 'III+', 'IV', 'V', 'vi°', 'vii°'],
22 'harmonic minor': ['i', 'ii°', 'III+', 'iv', 'V', 'VI', 'vii°'],
23 };
24 theRomans.major = theRomans.ionian;
25 theRomans.minor = theRomans.aeolian;
26
27 return theRomans[mode] || [];
28};
29
30const idxByDegree: NVP<number> = {
31 i: 0,

Callers 2

romanByDigitFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected