Analytical and Compositional Applications of a Network-Based Scale Model in music21

Like many artifacts of music notation and theory, musical scales are easy to represent in software for simple cases, but rapidly become very difficult for more complex cases (e.g., melodic minor scale, Indian ragas, or microtonal scales). The BoundIntervalNetwork and Scale objects of the open-source music21 toolkit provide new and powerful tools for abstracting and manipulating scales as used in actual compositions. Using a novel application of a constrained node-and-edge graph model, with intervals on edges and probability weightings on nodes, music21 interval networks aid analysts in searching and annotating otherwise difficult-to-find moments in musical pieces (regardless of representational encoding) and can help composers in writing new pieces that conform to complex, asymmetrical, nonoctave-bound, and even non-deterministic scalar models. This paper introduces the low-level BoundIntervalNetwork and high-level Scale objects, and, through numerous examples both in Python code and musical notation, demonstrates their usage and potential.