Nashville 🎸
A simple way to convert Nashville Number System (NNS) to chords based on the key.
Install
npm install nashville --save
In your code:
// import with es2015 // load with require()var Nashville =
Usage
Creating a new Nashville instance
const song = 'G major' songkey // => 'G major'songkeyRoot // => 'G'songkeyType // => 'major'songkeyScale // => [ 'G', 'A', 'B', 'C', 'D', 'E', 'F#', 'G' ]
Get a chord from a NNS degree
const song = 'G major' song // => 'D'song // => 'D/F#'song // => 'Dmin'song // => 'Ddim'
Get a chords from a NNS degree sequence
const song = 'G major' song // => [ 'G', 'C', 'D', 'G' ]song // => [ 'G', 'D/F#', 'C', 'Am', 'G', 'F#dim' ]
Change key
const song = 'G major' song // => [ 'G', 'C', 'D', 'G' ] song // updates key, keyRoot, keyType, and keyScalesong // => [ 'Eb', 'Ab', 'Bbm', 'Eb' ]
Degrees:
Degrees can can single numbers (5), or slash chords (5/7
)
Major, minor, and diminished chords are set by the key, but can be overridden with:
4-
force a fourth minor chord2o
force a diminished second chord
Accidentals
1.3.0 comes with support for accidentals. Use b, bb, #, ##
to include non-diatonic chords.
const song = 'G major'song //=> Dsong //=> C#song //=> Csong //=> D#song //=> E
Sevenths, extensions & additions
1.3.0 comes with support for extensions & additions. To prevent confusion between roots and extensions, wrap the extension parentheses.
const song = 'G major'// Seventhssong //=> Dsong //=> Dmaj7song //=> D7song //=> Dm7// Extensionssong
Key Types
- scales:
major
andminor
- modes:
ionian
,dorian
,phrygian
,lydian
,mixolydian
,aeolian
, andlocrian
To-do list
- Capo
- Degree from chord
- Workout triads from scale