Skip to content

Instantly share code, notes, and snippets.

@simple17
Created July 21, 2021 12:26
Show Gist options
  • Save simple17/f49579096a3955f38caa9aab6adaa0d1 to your computer and use it in GitHub Desktop.
Save simple17/f49579096a3955f38caa9aab6adaa0d1 to your computer and use it in GitHub Desktop.
[Generate chords] #js
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