Haskore is a collection of Haskell modules designed for expressing musical structures in the high-level, declarative style of functional programming. In Haskore, musical objects consist of primitive notions such as notes and rests, operations to transform musical objects such as transpose and tempo-scaling, and operations to combine musical objects to form more complex ones, such as concurrent and sequential composition. From these simple roots, much richer musical ideas can easily be developed.
Haskore is a means for describing music---in particular Western Music---rather than sound. It is not a vehicle for synthesizing sound produced by musical instruments, for example, although it does capture the way certain (real or imagined) instruments permit control of dynamics and articulation.
Haskore also defines a notion of literal performance through which observationally equivalent musical objects can be determined. From this basis many useful properties can be proved, such as commutative, associative, and distributive properties of various operators. An algebra of music thus surfaces.
In fact a key aspect of Haskore is that objects represent both abstract musical ideas and their concrete implementations. This means that when we prove some property about an object, that property is true about the music in the abstract and about its implementation. Similarly, transformations that preserve musical meaning also preserve the behavior of their implementations. For this reason Haskell is often called an executable specification language; i.e. programs serve the role of mathematical specifications that are directly executable.
Building on the results of the functional programming community's Haskell effort has several important advantages: First, and most obvious, we can avoid the difficulties involved in new programming language design, and at the same time take advantage of the many years of effort that went into the design of Haskell. Second, the resulting system is both extensible (the user is free to add new features in substantive, creative ways) and modifiable (if the user doesn't like our approach to a particular musical idea, she is free to change it).
In the remainder of this paper I assume that the reader is familar with the basics of functional programming and Haskell in particular. If not, I encourage reading at least A Gentle Introduction to Haskell [HF92] before proceeding. I also assume some familiarity with equational reasoning; an excellent introductory text on this is [BW88].