Created
July 21, 2021 12:26
-
-
Save simple17/f49579096a3955f38caa9aab6adaa0d1 to your computer and use it in GitHub Desktop.
[Generate chords] #js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'Ab', 'Bb', 'Cb', 'Db', 'Eb', 'Fb', 'Gb']; | |
const chords = ['', '7', 'm', 'm7', 'maj7', 'dim', 'm7-5']; | |
chords.map(ch => notes.map(n => n+ch)).flat().sort(() => Math.random() - 0.5).join(' ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment