ChordSymbol

ChordSymbol is the definitive chord symbol parser and renderer for Javascript/NodeJS.

While most chord parsing libraries expect you to write chord symbols in a specific way, ChordSymbol can handle whatever chord syntax you throw at him, or almost. Currently, the unit test suite contains more than 37 000 distinct chords symbols!

ChordSymbol will transform a string representing a chord (Cm7, for example) into a suite of intervals (1, b3, 5, b7) and individual notes (C, Eb, G, Bb). It will also normalize the chord symbol, such as it doesn't matter if the original input was Cm7, CMINOR7,C7min, or C7mi: ChordSymbol will consistently render it asCmi7. And if you prefer a different kind of normalization,ChordSymbol allows you to configure the rendering to your taste.

Demo

Parser

Please enter a chord symbol or select one of the following presets:
Well done! This looks like a valid chord
Parser configuration:
Notation systems:
Alt intervals:
user selection of intervals affected by the "alt" modifier (all by default). If you would like "alt" to consistently yield a specific set of intervals, you can specify those here.
Ab7(b9,#9)
Intervals135b7b9#9
NotesAbCEbGbAB
Semitones047101315
JSON representation of the parsed chord
{
  "input": {
    "symbol": "Ab7(b9,#9)",
    "rootNote": "Ab",
    "descriptor": "7(b9,#9)",
    "parsableDescriptor": "7 b9 #9 ",
    "modifiers": [
      "seventh",
      "b9",
      "#9"
    ],
    "notationSystem": "english"
  },
  "normalized": {
    "intervals": [
      "1",
      "3",
      "5",
      "b7",
      "b9",
      "#9"
    ],
    "semitones": [
      0,
      4,
      7,
      10,
      13,
      15
    ],
    "intents": {
      "major": true,
      "eleventh": false,
      "alt": false
    },
    "rootNote": "Ab",
    "quality": "dominant7",
    "isSuspended": false,
    "extensions": [],
    "alterations": [
      "b9",
      "#9"
    ],
    "adds": [],
    "omits": [],
    "notes": [
      "Ab",
      "C",
      "Eb",
      "Gb",
      "A",
      "B"
    ]
  },
  "formatted": {
    "rootNote": "Ab",
    "descriptor": "7",
    "chordChanges": [
      "b9",
      "#9"
    ]
  },
  "parserConfiguration": {
    "notationSystems": [
      "english",
      "german",
      "latin"
    ],
    "altIntervals": [
      "b5",
      "#5",
      "b9",
      "#9",
      "#11",
      "b13"
    ]
  }
}

Renderer

Renderer configuration:
Use short namings:
"Academic" rendering based on the rules defined in the books Contemporary Music Theory Series (by Mark Harrison) and Standardized Chord Symbol Notation (by Carl Brandt and Clinton Roemer)
Simplify:
No simplification
Transpose value: 0
Render to:
Auto will render the chord using the notation system detected during the parsing
Ab7(b9,#9)
Intervals135b7b9#9
NotesAbCEbGbAB
Semitones047101315
JSON representation of the rendered chord ("Raw" printer)
{
  "input": {
    "symbol": "Ab7(b9,#9)",
    "rootNote": "Ab",
    "descriptor": "7(b9,#9)",
    "parsableDescriptor": "7 b9 #9 ",
    "modifiers": [
      "seventh",
      "b9",
      "#9"
    ],
    "notationSystem": "english"
  },
  "normalized": {
    "intervals": [
      "1",
      "3",
      "5",
      "b7",
      "b9",
      "#9"
    ],
    "semitones": [
      0,
      4,
      7,
      10,
      13,
      15
    ],
    "intents": {
      "major": true,
      "eleventh": false,
      "alt": false
    },
    "rootNote": "Ab",
    "quality": "dominant7",
    "isSuspended": false,
    "extensions": [],
    "alterations": [
      "b9",
      "#9"
    ],
    "adds": [],
    "omits": [],
    "notes": [
      "Ab",
      "C",
      "Eb",
      "Gb",
      "A",
      "B"
    ]
  },
  "formatted": {
    "rootNote": "Ab",
    "descriptor": "7",
    "chordChanges": [
      "b9",
      "#9"
    ]
  },
  "parserConfiguration": {
    "altIntervals": [
      "b5",
      "#5",
      "b9",
      "#9",
      "#11",
      "b13"
    ]
  }
}

MusicXml renderer

Uses the chord-symbol-musicxml filter.
<harmony>
  <root>
    <root-step>A</root-step>
    <root-alter>-1</root-alter>
  </root>
  <kind text="7">dominant</kind>
  <degree>
    <degree-value>9</degree-value>
    <degree-alter>-1</degree-alter>
    <degree-type>alter</degree-type>
  </degree>
  <degree>
    <degree-value>9</degree-value>
    <degree-alter>1</degree-alter>
    <degree-type>alter</degree-type>
  </degree>
</harmony>

Integrations examples

Please find below examples of how ChordSymbol can be used with other libraries. If you want your library to be featured here, feel free to submit a PR.

Custom Piano Keys

ChordSymbol's output data is used as an input to Custom piano keys.

View on Github

Canvas Renderer

bb-chord-symbol uses ChordSymbol to parse the symbol given.

View on NPM or on Github

© Christophe Noël (2019-2021) - MIT License
chord-symbol v2.1.0 - chord-symbol-musicxml v0.1.1