saebekassebil / teoria

Javascript taught Music Theory
http://saebekassebil.github.io/teoria
MIT License
1.32k stars 114 forks source link

Diatonic Major Scale Modes #126

Open groos opened 5 years ago

groos commented 5 years ago

var a4 = teoria.note('a4'); var ionian= a4.scale('ionian'); var newMode = ionian.mode(3); console.log(newMode.modeName); // 'phrygian'

// treat negative degrees as a subtraction var negativeMode = ionian.mode(-1); console.log(negativeModel.modeName); // 'locrian'

// wraps var locrian = a4.scale('locrian'); var otherMode = locrian.mode(3); console.log(otherMode.modeName); // 'dorian'