skip to main content
10.1145/2633638.2633648acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Temporal semantics for a live coding language

Published:03 September 2014Publication History

ABSTRACT

Sonic Pi is a music live coding language that has been designed for educational use as a first programming language. However, it is not straightforward to achieve the necessary simplicity of a first language in a music live coding setting, for reasons largely related to the manipulation of time. The original version of Sonic Pi used a `sleep' function for managing time, blocking computation for a specified time period. However, while this approach was conceptually simple, it resulted in badly timed music, especially when multiple musical threads were executing concurrently. This paper describes an alternative programming approach for timing (implemented in Sonic Pi v2.0) which maintains syntactic compatibility with v1.0, yet provides accurate timing via interaction between real time and a "virtual time''. We provide a formal specification of the temporal behaviour of Sonic Pi, motivated in relation to other recent approaches to the semantics of time in live coding and general computation. We then define a monadic model of the Sonic Pi temporal semantics which is sound with respect to this specification, using Haskell as a metalanguage.

References

  1. Samuel Aaron and Alan F Blackwell, From Sonic Pi to Overtone : Creative Musical Experiences with Domain-Specific and Functional Languages, The First ACM SIGPLAN Workshop on Functional Art, Music, Modeling & Design (Boston, Massachusetts, USA), ACM, 2013, pp. 35--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Mieke Bal, Travelling concepts in the humanities: A rough guide, University of Toronto Press, 2002.Google ScholarGoogle Scholar
  3. Matt Bellingham, Simon Holland, and Paul Mulholland, A cognitive dimensions analysis of interaction design for algorithmic composition software, Proceedings of Psychology of Programming Interest Group Annual Conference 2014 (Benedict du Boulay and Judith Good, eds.), University of Sussex, 2014, pp. 135--140.Google ScholarGoogle Scholar
  4. Alan Blackwell, Alex McLean, James Noble, and Julian Rohrhuber, Collaboration and learning through live coding (Dagstuhl Seminar 13382), Dagstuhl Reports 3 (2014), no. 9, 130--168.Google ScholarGoogle Scholar
  5. E Allen Emerson, Aloysius K Mok, A Prasad Sistla, and Jai Srinivasan, Quantitative temporal reasoning, Computer-Aided Verification, Springer, 1991, pp. 136--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Michael David Fisher, Dov M. Gabbay, and Lluis Vila (eds.), Handbook of Temporal Reasoning in Artificial Intelligence, Elsevier B.V., 2005.Google ScholarGoogle Scholar
  7. George Giorgidze and Henrik Nilsson, Switched-on Yampa -- Declarative Programming of Modular Synthesizers, Practical Aspects of Declarative Languages, Springer, 2008, pp. 282-- 298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Hans Hansson and Bengt Jonsson, A logic for reasoning about time and reliability, Formal aspects of computing 6 (1994), no. 5, 512--535.Google ScholarGoogle Scholar
  9. Henkjan Honing, Issues on the representation of time and structure in music, Contemporary Music Review 9 (1993), no. 1, 221--238.Google ScholarGoogle ScholarCross RefCross Ref
  10. The IEEE and The Open Group, sleep -- the open group base specifications issue 7, 2013, http://pubs.opengroup. org/onlinepubs/9699919799/functions/sleep.html Retrieved 15 May, 2014.Google ScholarGoogle Scholar
  11. M. Kutar, C. Britton, and C.L. Nehaniv, Specifying multiple time granularities in interactive systems, Lecture Notes in Computer Science 1946 (2001), 51--63. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Edward A Lee, Computing needs time, Communications of the ACM 52 (2009), no. 5, 70--79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Alex McLean, The textural x, Proceedings of xCoAx2013: Computation Communication Aesthetics and X (2013), 81--88.Google ScholarGoogle Scholar
  14. Sean McDirmid and Jonathan Edwards, Programming with Managed Time, Tech. report, Microsoft, 2014.Google ScholarGoogle Scholar
  15. Conor McBride and Ross Paterson, Functional pearl: Applicative programming with effects, Journal of functional programming 18 (2008), no. 1, 1--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Henrik Nilsson, Antony Courtney, and John Peterson, Functional reactive programming, continued, Proceedings of the 2002 ACM SIGPLAN workshop on Haskell, ACM, 2002, pp. 51--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Daniel Pilaud, N Halbwachs, and JA Plaice, Lustre: A declarative language for programming synchronous systems, Proceedings of the 14th Annual ACM Symposium on Principles of Programming Languages (14th POPL 1987). ACM, New York, NY, vol. 178, 1987, p. 188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Andrew Sorensen and Henry Gardner, Programming with time: cyber-physical programming with impromptu, ACM Sigplan Notices 45 (2010), no. 10, 822--834. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Murray Shanahan, A circumscriptive calculus of events, Artificial Intelligence 77 (1995), no. 2, 249--284. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Yoav Shoham, Reasoning about change : time and causation from the standpoint of artificial intelligence, The MIT Press series in artificial intelligence, Cambridge, Mass. MIT Press, 1988, Includes index. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. GeWang and Perry R Cook, ChucK: A Concurrent, On-the-fly, Audio Programming Language, International Computer Music Conference, 2003, pp. 1--8.Google ScholarGoogle Scholar
  22. ZhanyongWan and Paul Hudak, Functional reactive programming from first principles, ACM SIGPLAN Notices, vol. 35, ACM, 2000, pp. 242--252. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Temporal semantics for a live coding language

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        FARM '14: Proceedings of the 2nd ACM SIGPLAN international workshop on Functional art, music, modeling & design
        September 2014
        80 pages
        ISBN:9781450330398
        DOI:10.1145/2633638

        Copyright © 2014 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 3 September 2014

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        FARM '14 Paper Acceptance Rate12of15submissions,80%Overall Acceptance Rate19of23submissions,83%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader