Generate counterpoint to my cantus

CP3 2-voice counterpoint generator takes your cantus firmus in MIDI file and generates a second voice to get counterpoint in 2 voices. Algorithm works by searching for a combination of notes which has minimum rule violations penalty. This second voice can be generated in any of 5 standard counterpoint species. This generator can create counterpoint only in time signature 4/4.

This algorithm is identical to CP1 2-voice counterpoint generator, except that cantus firmus is not generated, but imported.