Skip to content

Releases: patrady/chord-js

v2.2.0

12 Aug 12:15
Compare
Choose a tag to compare

Removing Extraneous Notes

If a chord has notes that are outside of the chord, those notes will be disregarded and the chord will still be recognized!

For example, since the A1 is far enough from the rest of the chord, it will be ignored.

Before:

Chord.for("A1 C E G").getName(); // undefined

After:

Chord.for("A1 C E G").getName(); // C

Recognizing Multiple Chords

If multiple chords are given, then only the first one will be recognized

Before:

Chord.for("D2 F#2 A2 C E G").getName(); // undefined

After:

Chord.for("D2 F#2 A2 C E G").getName(); // D

v2.1.0

31 Jul 00:00
Compare
Choose a tag to compare

Lots of new features in this release 🚀

New Chords

Several new chords can be recognized now:

  1. Sixth Chords
  2. Minor Sixth Chords
  3. Major Minor Seventh Chords
  4. Augmented Seventh Chords
  5. Augmented Major Seventh Chords

Double Flats and Double Sharps

Send those obscure double flat or double sharp notes along and they'll now be recognized!

Example:

Chord.for('D# F𝄪 A# C𝄪5')?.getName(); // D#maj7
Chord.for('C Eb Gb B𝄫')?.getName(); // Cdim7

v2.0.0

29 Jul 16:21
Compare
Choose a tag to compare

New Features

Recognize chords that are out of order

Before if the notes of a chord were passed out of order, the chord could not be recognized.
For example, the C chord in the order of C, G, E couldn't be recognized.

Now, the order does not matter for any of types of chords because the notes are sorted by their MIDI value before the chord is identified:

// Before
Chord.for('C G E')?.getName(); //  undefined
Chord.for('C G Eb')?.getName(); // undefined
Chord.for('C G Bb E')?.getName(); // undefined

// After
Chord.for('C G E')?.getName(); // C
Chord.for('C G Eb')?.getName(); // Cm
Chord.for('C G Bb E')?.getName(); // C7

Breaking Changes

Since the notes are sorted by their MIDI value before the chord is identified, it is possible for some inverted chords to be now identified without the inversion. For example,

// Before
new Chord.for('E G C')?.getName(); // C/E

// After
new Chord.for('E G C')?.getName(); // C because the C note is assumed to be C4 instead of C5

It is now considered a best practice to specify the note with its octave when using strings.

// Before
new Chord.for('E G C')?.getName(); // C/E

// After
new Chord.for('E G C5')?.getName(); // C/E

v1.4.0

29 Jul 15:05
Compare
Choose a tag to compare

Recognize a chord from a list of Notes instead of a just a string

import { Note } from '@patrady/chord-js';

const C = Note.fromMidi(60);
const E = Note.fromMidi(64);
const G = Note.fromMidi(67);

Chord.for([C, E, G])?.getName(); // C

v1.3.0

29 Jul 14:20
Compare
Choose a tag to compare

Adds support for recognizing Half Diminished Seventh Chords

Special thanks to @danielparvin for the contribution!

v1.2.0

27 Sep 20:08
Compare
Choose a tag to compare

Add Chord Degrees (tonic, dominant, subdominant, etc.)

v1.1.0

17 Sep 12:46
Compare
Choose a tag to compare
  • Convert a MIDI value to a note
  • Key Signatures

v1.0.0

08 Sep 12:03
Compare
Choose a tag to compare

First Release! 🥳

Adds Support for Major, Minor, Suspended, Suspended Second, Augmented, Diminished, Inverted, Dominant Seventh, Major Seventh, Minor Seventh, and Diminished Seventh chords