Heqet

Heqet logo: a woolly frog snapping up a pair of eighth notes.

Isaac Reilly's senior project in Computer Science at Yale University

Advised by Donya Quick

Abstract: Heqet is a Haskell library which converts music data created by the Euterpea library into code suitable as input to the Lilypond music notation software. Heqet also provides a domain-specific language for entering music directly in Haskell code, which resembles Lilypond notation but diverges somewhat in accordance with how Heqet approaches music, in particular, in that Heqet takes a more abstract view of music, while Lilypond mixes music and its notation (Heqet also offers some features absent in Lilypond, such as notes of arbitrary rational duration and arbitrary pitch). In contrast, Euterpea has an extremely abstract model of music, putting Heqet in the middle. Creating a score is complicated and requires some human intervention in assigning staves, meters, and clefs, etc. To aid this effort, Heqet provides functions for manipulating music data succinctly, automating these tasks as much as possible, and providing the power to easily express complex transformations useful for composing and arranging. Heqet also provides Haskell lenses for viewing and modifying music data, which allows multiple criteria for the desired fragment of music to be composed. It's possible to define custom pitch types which can be mixed with other types of pitch freely, to include arbitrary Lilypond tweaks, and to define your own instruments, complete with playability evaluation. Heqet is designed to automate many features of music notation, such as fitting notes into chords and multiple voices on one staff, automatically detecting meter changes, and automatically assigning clefs (as best suited for each instrument), as well as displaying the instruments on each staff properly.

If you want to use Heqet, clone this repository and build it with cabal. Then check out my tutorial!

I am currently working on a GUI music editor based on the Heqet library which uses threepenny-gui and functional reactive programming. Repository for the Heqet application.