Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Introduction to Information Retrieval
Introduction to Information Retrieval
Type checking with open type functions
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Type-safe diff for families of datatypes
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
Combinator Parsing: A Short Tutorial
Language Engineering and Rigorous Software Development
Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation
Dependently typed programming in Agda
AFP'08 Proceedings of the 6th international conference on Advanced functional programming
IDRIS ---: systems programming meets full dependent types
Proceedings of the 5th ACM workshop on Programming languages meets program verification
Explicitly recursive grammar combinators: a better model for shallow parser DSLs
PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
Function-based and circuit-based symbolic music representation, or back to Beethoven
Proceedings of the 2012 Joint International Conference on Human-Centered Computer Environments
A functional approach to automatic melody harmonisation
Proceedings of the first ACM SIGPLAN workshop on Functional art, music, modeling & design
Grammar-based automated music composition in Haskell
Proceedings of the first ACM SIGPLAN workshop on Functional art, music, modeling & design
Hi-index | 0.00 |
Music theory has been essential in composing and performing music for centuries. Within Western tonal music, from the early Baroque on to modern-day jazz and pop music, the function of chords within a chord sequence can be explained by harmony theory. Although Western tonal harmony theory is a thoroughly studied area, formalising this theory is a hard problem. We present a formalisation of the rules of tonal harmony as a Haskell (generalized) algebraic datatype. Given a sequence of chord labels, the harmonic function of a chord in its tonal context is automatically derived. For this, we use several advanced functional programming techniques, such as type-level computations, datatype-generic programming, and error-correcting parsers. As a detailed example, we show how our model can be used to improve content-based retrieval of jazz songs. We explain why Haskell is the perfect match for these tasks, and compare our implementation to an earlier solution in Java. We also point out shortcomings of the language and libraries that limit our work, and discuss future developments which may ameliorate our solution.