MistyRTAW/MistyRTAW — pull request #1 by shimpe (2012-03-01 22:14:19+00:00)
Title: chord recognition

Here's an implementation of a chord recognizer. It's a fairly straightforward translation to C++
of a subset of a chord recognition library I once wrote in python.

In its current form it can recognize and label many hundreds of chords already.

Probably some things should be cleaned up and made more complete.

The following classes were added:
MidiNoteConverter, Interval, Chord, ChordDescriptor, ChordRecognizer, ChordMapper

The new classes come with some unit tests embedded in comments.
(these can be synthesized to working code using my
YouNeedTests tool: https://gitorious.org/youneedtests )

The general approach is to convert a list of note names to a list of interval distances,
from that recognize a chord type. I also added a chordmapper which substitutes
the exotic chords recognized by the recognizer into something more

The user of these classes will typically use a ChordRecognizer to recognize a chord from a list of notes,
then send it through the ChordMapper to dumb down the (exotic) chord to something more
down-to-earth that can e.g. be used as input for midi fragment selection.

Let me know what you think.