Funky Grooves: Declarative Programming of Full-Fledged Musical Applications
There are many systems and languages for music that essentially are declarative, often following the synchronous dataflow paradigm. As these tools, however, are mainly aimed at artists, their application focus tends to be narrow and their usefulness as general purpose tools for developing musical applications limited, at least if one desires to stay declarative. This paper demonstrates that Functional Reactive Programming (FRP) in combination with Reactive Values and Relations (RVR) is one way of addressing this gap. The former, in the synchronous dataflow tradition, aligns with the temporal and declarative nature of music, while the latter allows declarative interfacing with external components as needed for full-fledged musical applications. The paper is a case study around the development of an interactive cellular automaton for composing groove-based music.
KeywordsFunctional reactive programming Reactive values and relations Synchronous dataflow Hybrid systems Music
The authors would like to thank Ivan Perez and Henning Thielemann for support and advice with the reactive libraries and the Haskell JACK bindings respectively, Michel Mauny for co-supervising the second author’s summer internship with the Functional Programming Laboratory in Nottingham, and François Pessaux and anonymous reviewers for helpful feedback.
- 1.Baudart, G., Mandel, L., Pouzet, M.: Programming mixed music in ReactiveML. In: 1st Workshop on Functional Art, Music, Modeling and Design (FARM), Boston, USA, pp. 11–22. ACM, September 2013Google Scholar
- 3.Boulez, P.: Penser la musique aujourd’hui. Gallimard, Paris (1964)Google Scholar
- 4.Burton, M.: The reacTogon: a chain reactive performance arpeggiator (2007). https://www.youtube.com/watch?v=AklKy2NDpqs
- 5.Caspi, P., Pilaud, D., Halbwachs, N., Plaice, J.A.: LUSTRE: a declarative language for programming synchronous systems. In: 14th Symposium on Principles of Programming Languages (POPL). ACM, New York (1987)Google Scholar
- 6.Cont, A.: Antescofo: anticipatory synchronization and control of interactive parameters in computer music. In: International Computer Music Conference (ICMC), Belfast, Ireland, pp. 33–40, August 2008Google Scholar
- 7.Cont, A., Anticipation, M.M.: From the time of music to music of time. Ph.D. thesis. University of California San Diego (UCSD) and University of Pierre et Marie Curie (Paris VI) (2008)Google Scholar
- 8.Elliott, C., Hudak, P.: Functional reactive animation. In: 2nd International Conference on Functional Programming (ICFP), pp. 163–173, June 1997Google Scholar
- 10.Hudak, P., Quick, D., Santolucito, M., Winograd-Cort, D.: Real-time interactive music in Haskell. In: 3rd International Workshop on Functional Art, Music, Modelling and Design (FARM), Vancouver, BC, Canada, pp. 15–16. ACM, September 2015Google Scholar
- 12.Nilsson, H., Chupin, G.: The Arpeggigon: Declarative programming of a full-fledged musical application. Technical report, November 2016. http://eprints.nottingham.ac.uk/38657
- 13.Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell Workshop, Pittsburgh, PA, USA, pp. 51–64. ACM, October 2002Google Scholar
- 14.Paterson, R.: A new notation for arrows. In: International Conference on Functional Programming (ICFP), Firenze, Italy, pp. 229–240, September 2001Google Scholar
- 15.Perez, I., Nilsson, H.: Bridging the GUI gap with reactive values and relations. In: 8th ACM SIGPLAN Symposium on Haskell, Vancouver, Canada, pp. 47–58. ACM (2015)Google Scholar