Developed in the early 18th century by Johann Joseph Fux, but building on a tradition that was already several centuries old, species counterpoint became one of the two pillars of music composition training in the Northern European tradition (the other being the discipline of thoroughbass). It played a central role in the training of composers such as Mozart, Beethoven, Brahms, and Schoenberg. Since its inception, counterpoint training was an important means for inculcating in musicians some of the most basic cognitive abilities and structures that constitute competence in musical composition and performance. It also therefore proven useful as a means for gaining explicit insight into how competent listeners construe Western music.
In 2017 I began a project to create a tool for analyzing the structure of melodic lines composed according to the rules of species counterpoint as formulated by Peter Westergaard.
In Westergaardian species counterpoint, there are two domains of rule: a group of fairly traditional voice-leading rules, which govern the moment-to-moment contrapuntal interaction of melodies that unfold simultaneously; and generative syntactic rules, which govern the construction of the individual melodic line. Composing Westergaardian counterpoint involves negotiating independent structural conditions in these two domains. Because the choice of each and every note in a species counterpoint exercise alters the overall set of compositional contingencies, the student faces a complex process of adjudicating the consequences of every choice, both retrospectively and prospectively, as well as vertically and horizontally. Learning to follow and negotiate the rules of species counterpoint in this way brings the student toward the goal of being able to understand and articulate the linear-contrapuntal perception of classically tonal music described by Schenker.
The line-writing rules, quite simple in themselves, are capable of generating a very large number of possible melodic lines. The task I undertook was to create a program that could take a composed line and determine whether it conforms to the rules and, if so, provide a detailed analysis of the structure of the line. The program I created is called WesterParse. It consists of about 10,000 lines of Python code and relies extensively on the music21 toolkit developed by Michael Asato Cuthbert and his colleagues. WesterParse also evaluates voice-leading.
Westergaard Species Counterpoint Online (WSCO) is a web-based pedagogical tool that I created in collaboration with the WashU Humanities Digital Workshop in 2018–2020. The tool allows students to compose species counterpoint and test whether their compositions conform to the syntactic rules for melodic structure and contrapuntal combination.
In early 2025 I worked with a team of students and staff to refine the tool. The front-facing portion of WSCO is a website where students can compose Westergaardian counterpoint, listen to what they have composed, have their composition evaluated for conformity with the rules, and annotate their exercise to show how they hear the structure of what they have composed. Behind the scenes there is a program I wrote called WesterParse, which does the work of analyzing input from WSCO. Support for this development work was provided by a generous grant from the Digital Intelligence and Innovation Accelerator at Washington University in St. Louis.
WSCO is a work in progress. I am grateful to the students and staff who have worked on it with me, and to the many students who have used it in class. I am also grateful to the many people who have provided feedback on the tool, including my colleagues at WashU and at other institutions.
WesterParse is a free and open-source tool. It is available for use by anyone who wants to use it. It is also available for anyone who wants to modify it or build on it. The code is available on GitHub at westerparse.
For more information about the project, please contact me at snarrenberg@wustl.edu.