Chordlock

What is Chordlock?

Chordlock is an intelligent MIDI chord detection library that provides key-context aware chord analysis. Unlike traditional chord detection systems, Chordlock considers the musical key to provide contextually appropriate chord interpretations.

Key Innovation

The same notes can represent different chords depending on the musical context:

# E-C-E-G-D notes
./chordlock -N 52,60,64,67,74 -k C    # → C/E [I] in C major  
./chordlock -N 52,60,64,67,74 -k Em   # → Em7(add♭6) [i7] in E minor

Quick Example

#include "Chordlock.hpp"

Chordlock detector;
detector.setKeyContext(0, false); // C major

detector.noteOn(60, 80); // C
detector.noteOn(64, 80); // E  
detector.noteOn(67, 80); // G

auto result = detector.detectChord();
// result.chordName = "C"

auto degree = detector.analyzeCurrentNotesToDegree(0, false);
// degree = "I"

Architecture

Chordlock v2.0 provides a clean, organized structure:

Core Features

🔥 World-First Key-Context Analysis

🎼 Advanced Chord Detection

âš¡ High Performance

Get started with the Quick Start Guide or explore the API Reference.