Software Open Access
Opycleid is a Python library for transformational music analysis (TMT), a field of musicology which studies transformations between musical objects (notes, chords, durations, etc.) from a mathematical point of view. This field was initiated by David Lewin in the 1980s, relying mainly on mathematical group theory, and later developed and extended using elements of category theory. The API for Opycleid was designed in order to take a very general approach to TMT by considering category actions in Rel, i.e. faithful functors from a small category to the 2-category Rel of finite sets and relations between them. At the same time, Opycleid provides ready-to-use classes for the common groups and monoids encountered in TMT (such as the T/I group or the PRL group usually found in neo-Riemannian theory), allowing the analysis of chords with just a few Python lines of code.