This library reports on a 1st species counterpoint and tells you which rules are violated. Its based on a 1:1 Counterpoint lecture by Jacob Gran
The cantus firmus is by Fancois-Josepf Fetis (1784-1871) The counterpoint is by Jacob Gran
CounterpointReport {
isValidFirstSpeciesR = False,
noDissonantIntervalsR = True,
noLeapsInSameDirectionR = True,
avoidParallelFourthsR = True,
avoidParallelFifthsOrOctavesR = False,
unisonOnlyBeginOrEndR = True,
approachPerfectionR = True,
beginAndEndPerfectlyR = True,
mostlyContraryR = True,
limitIntervalR = True,
lessThan3RepeatedIntervalsR = True,
mostlyStepsCantusFirmusR = True,
mostlyStepsCounterpointR = True,
onlyConsonantLeapsR = True
}
This library uses Euterpea to render the MIDI output, and modular-arithmetic to calculate the intervals.
If you're trying to get this to build locally, you'll probably want to use my patched versions of Euterpea and PortMIDI-Haskell
Hopefully we can get those fixed up.