check_counterpoint
Validate a two-part first-species counterpoint against strict classic rules. Detects rule violations with beat numbers so you can fix errors in your exercise.
Instructions
Check a two-part first-species counterpoint against the classic rules.
Entirely offline and read-only. Enforces the strict set: begin and end on a
perfect consonance, consonant verticals only, no consecutive perfect fifths,
octaves or unisons, no voice crossing, and one melodic climax in the
counterpoint.
Returns:
Result dictionary with one entry per issue, each naming the rule and the beat
it happens on. An empty list means the exercise passes.
Note:
Only first species is implemented, so passing any other species is refused
rather than checked loosely. The two lines must be the same length, since
note against note pairs them one to one.
These rules are stricter than ordinary part-writing on purpose. For a
chorale or a quartet use check_voice_leading, which applies the
common-practice rules to any number of voices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| species | No | Which species to check. Only 1, note against note, is implemented. Any other value is refused rather than approximated. | |
| counterpoint | Yes | The line written against it, same notation and the same length: first species is note against note, so the two lists pair up one to one. | |
| cantus_firmus | Yes | The given line, as scientific pitch names in order, e.g. ['D4', 'F4', 'E4', 'D4']. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||