ABSTRACT
We present Music Tools, an Agda library for analyzing and synthesizing music. The library uses dependent types to simplify encoding of music rules, thus improving existing approaches based on simply typed languages. As an application of the library, we demonstrate an implementation of first-species counterpoint, where we use dependent types to constrain the motion of two parallel voices.
- James Cheney and Ralf Hinze. 2002. A lightweight implementation of generics and dynamics. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell. ACM, 90–104. Google ScholarDigital Library
- Pierre-Evariste Dagand. 2017. The essence of ornaments. Journal of Functional Programming 27 (2017), e9.Google ScholarCross Ref
- W. Bas De Haas, José Pedro Magalhães, Remco C. Veltkamp, and Frans Wiering. 2011. HarmTrace: Improving Harmonic Similarity Estimation Using Functional Harmony Analysis. In Proceedings of the 12th International Society for Music Information Retrieval Conference (ISMIR ’11). 67–72.Google Scholar
- W. Bas De Haas, José Pedro Magalhães, Frans Wiering, and Remco C. Veltkamp. 2013. HarmTrace: Automatic Functional Harmonic Analysis. Computer Music Journal 37:4 (2013), 37–53.Google ScholarCross Ref
- Richard A Eisenberg and Stephanie Weirich. 2013. Dependently typed programming with singletons. ACM SIGPLAN Notices 47, 12 (2013), 117–130. Google ScholarDigital Library
- Johann Joseph Fux. 1965. The Study of Counterpoint. W. W. Norton & Company.Google Scholar
- Cheng-Zhi Anna Huang, Tim Cooijmans, Adam Roberts, Aaron Courville, and Douglas Eck. 2017. Counterpoint by Convolution. In Proceedings of ISMIR 2017. https://ismir2017.smcnus.org/wp-content/uploads/2017/10/ 187_Paper.pdfGoogle Scholar
- Paul Hudak and Donya Quick. 2018. The Haskell School of Music: From Signals to Symphonies. Cambridge University Press. Google ScholarDigital Library
- Hendrik Vincent Koops, José Pedro Magalhães, and W. Bas De Haas. 2013. A Functional Approach to Automatic Melody Harmonisation. In Proceedings of the First ACM SIGPLAN Workshop on Functional Art, Music, Modeling & Design (FARM ’13). ACM, 47–58. Google ScholarDigital Library
- José Pedro Magalhães and W. Bas de Haas. 2011. Functional modelling of musical harmony: an experience report. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP ’11). ACM, New York, NY, USA, 156–162. Google ScholarDigital Library
- José Pedro Magalhães and Hendrik Vincent Koops. 2014. Functional Generation of Harmony and Melody. In Proceedings of the Second ACM SIGPLAN Workshop on Functional Art, Music, Modeling & Design (FARM ’14). ACM. Google ScholarDigital Library
- Stefan Monnier and David Haguenauer. 2010. Singleton types here, singleton types there, singleton types everywhere. In Proceedings of the 4th ACM SIGPLAN workshop on Programming languages meets program verification. ACM, 1–8. Google ScholarDigital Library
- Ulf Norell. 2007. Towards a practical programming language based on dependent type theory. Ph.D. Dissertation. Chalmers University of Technology.Google Scholar
- Walter Piston and Mark DeVoto. 1987. Harmony. W. W. Norton & Company.Google Scholar
- Dmitrij Szamozvancev and Michael B Gale. 2017. Well-typed music does not sound wrong (experience report). In ACM SIGPLAN Notices, Vol. 52. ACM, 99–104. Google ScholarDigital Library
- Nicolas Tabareau, Éric Tanter, and Matthieu Sozeau. 2018. Equivalences for Free: Univalent Parametricity for Effective Transport. Proc. ACM Program. Lang. 2, ICFP, Article 92 (July 2018), 29 pages. Google ScholarDigital Library
Index Terms
- Demo: counterpoint by construction
Recommendations
Weighted Refinement Types for Counterpoint Composition
FARM 2023: Proceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and DesignRefinement types are useful for describing specifications of programs. When applied to music theory, however, refinement types are too restrictive in that they do not allow breaking of rules. To relax this restriction, we propose weighted ...
Decidability of conversion for type theory in type theory
Type theory should be able to handle its own meta-theory, both to justify its foundational claims and to obtain a verified implementation. At the core of a type checker for intensional type theory lies an algorithm to check equality of types, or in other ...
A machine learning approach to two-voice counterpoint composition
Algorithmic composition of musical pieces is one of the most popular areas of computer aided music research. Various attempts have been made successfully in the area of music composition. Artificial intelligence methods have been extensively applied in ...
Comments