2014 · 13 citations · 15 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesReal-time SystemsConcurrent ProgrammingMusic ProgrammingReal-time Systems ProgrammingTemporal LogicTiming ModelingTiming SemanticsLive CodingLive Coding SystemsMonadic SemanticsMusic Programming EnvironmentsMusic Programming LanguagesMusical TimingReal-time ProcessingReal-time Semantics
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.
15
LUSTRE: a declarative language for real-time programming
P. Caspi, D. Pilaud, Nicolas Halbwachs et al. · 1987 · 557 citations · Full text
LUSTRE: A declarative language for programming synchronous systems*
Paul Caspi, D. Pilaud, Nicolas Halbwachs et al. · 1987 · 463 citations
Applicative programming with effects
Conor McBride, Ross Paterson · Journal of Functional Programming · 2007 · 402 citations · Full text
Functional reactive programming from first principles
Zhanyong Wan, Paul Hudak · 2000 · 211 citations · Full text
Functional reactive programming, continued
Henrik Nilsson, Antony Courtney, John Peterson · 2002 · 209 citations