-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
22 lines (16 loc) · 862 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var Tritone = require('./src/tritone.js');
var tritone = new Tritone();
var prettyPrint = (label, anArray) => {
console.log('------------------------------');
console.log(label);
anArray.forEach((element) => {
console.log(JSON.stringify(element));
})
}
prettyPrint('B Major Notes', tritone.scaleNotes('b', 'ionian'));
prettyPrint('B Major Chords', tritone.diatonicChords('b', 'major'));
prettyPrint('G Mixolydian Chords:', tritone.diatonicChords('g', 'mixolydian'));
console.log('c major chords: ' + JSON.stringify(tritone.diatonicChords('c', 'major')));
console.log('g mixolydian notes: ' + JSON.stringify(tritone.scaleNotes('g', 'mixolydian')));
console.log('g mixolydian chords: ' + JSON.stringify(tritone.diatonicChords('g', 'mixolydian')));
console.log('g mixolydian: ' + JSON.stringify(tritone.scaleNotes('g', 'mixolydian')));