harte-chord-notation

> Deprecated


License
MIT
Install
npm install harte-chord-notation@0.0.5

Documentation

WIP

A purescript implementation of the harte chord notation

Usage

$ npm install harte-chord-notation
const { decodeHarteChord } = require('harte-chord-notation')

// given a valid harte chord string, return a json representation
let chord = decodeHarteChord('C#:min7(#9)/3') // C# minor 7, #9, 1st inversion
/**
 'C#:min7(#9)/3' = 
 { root: { natural: 'C', modifier: '#' },
  degrees:
   [ { modifier: 'b', interval: 3 },
     { interval: 5 },
     { modifier: 'b', interval: 7 },
     { modifier: '#', interval: 9 } ],
  base: { interval: 3 } }
  */

// if body is omitted, default is 'major'
// therefore 'Bb/5' == 'Bb:maj/5' == 'Bb:(3, 5)/5'
chord = decodeHarteChord('Bb/5')
/**
  'Bb/5' = 
  { root: { natural: 'B', modifier: 'b' },
    degrees: [ { interval: 3 }, { interval: 5 } ],
    base: { interval: 5 } }
 */


// if base is omitted, default is 1
// therefore 'Ax:maj7' == 'Ax:maj7/1'
chord = decodeHarteChord('Ax:maj7')
/**
  'Ax:maj7' = 
  { root: { natural: 'A', modifier: 'x' },
    degrees: [ { interval: 3 }, { interval: 5 }, { interval: 7 } ],
    base: { interval: 1 } }
 */

// if only root is given, assume it is major chord root position
// 'C' == 'C:maj' == 'C:(3, 5)/1'
chord = decodeHarteChord('C') 
/**
  'C' =
  { root: { natural: 'C' },
    degrees: [ { interval: 3 }, { interval: 5 } ],
    base: { interval: 1 } }
 */

Development

$ psc-package install

run test

$ pulp test

Acknowledgments

Symbolic Representation Of Musical Chords: A Proposed Syntax For Text Annotations http://ismir2005.ismir.net/proceedings/1080.pdf