I develop a music application and I need to find an "optimal" combination of standard chord/harmonic progressions used in a song. The standard progressions in my database are 2 or 4 chords, and are not "exclusive".
For example if a part of a song uses the chord sequence Fm7-Bb7-Eb7M-Ab7M, it will match the standard progressions Fm7-Bb7 (II-V), Bb7-Eb7M (V-I), but also Fm7-Bb7-Eb7M-Ab7M (II-V-I-IV). Of course a song can have any number of chords, and very often there are
chord sequences which do not correspond to any standard chord progression.
The optimal combination of standard progressions I'm looking for is the one which minimizes the number of song measures not covered by any standard progression.
I struggle to find the right way to tackle this, any help is welcome.
EDIT:
Indeed @user58697, it's much easier to explain with a sequence of letters and a vocabulary of 2 or 4-letter words, e.g:
text=
ABCDDCEFGHXvocabulary=
ABCD, CDDC, EFGH, AB
I want to pick the words so that I minimize the number of letters which are not part of a word:
- text=
{ABCD}DC{EFGH}X: 3 letters not part of a word - text=
{AB}{CDDC}{EFGH}X: best solution
With a long text there are usually several best solutions.