Open Source
Packages
Tools and libraries I've built and maintain.
@patrady/chord-js
View on npmA TypeScript library for chord recognition and music theory. Pass in a set of notes and get back the chord name, or explore chord structures programmatically.
Interactive Demo
Press 3 different keys to get started
Quick Start
npm install @patrady/chord-jsimport { Chord, Note } from '@patrady/chord-js';
// Create notes from MIDI values
const notes = [60, 64, 67].map(midi => Note.fromMidi(midi));
// Detect the chord
const chord = Chord.for(notes);
console.log(chord?.getName()); // "C"