Sonic Pi

Last updated

Sonic Pi
Developer(s) Sam Aaron and others
Initial release2012
Stable release
4.3.0 / 30 September 2022;60 days ago (2022-09-30)
Written in Ruby, Erlang, Elixir, Clojure, C++, and Qt
Operating system Linux, macOS, Windows, Raspberry Pi OS
Type Live coding environment
License MIT License

Sonic Pi is a live coding environment based on Ruby, originally designed to support both computing and music lessons in schools, developed by Sam Aaron in the University of Cambridge Computer Laboratory [1] in collaboration with Raspberry Pi Foundation. [2] [3]



Sam Aaron, creator of Sonic Pi, demonstrating the program Sam Aaron at YOW! Night 2018 Perth, December 2018 02.jpg
Sam Aaron, creator of Sonic Pi, demonstrating the program

Thanks to its use of the SuperCollider synthesis engine and accurate timing model, [4] it is also used for live coding and other forms of algorithmic music performance and production, including at algoraves. Its research and development has been supported by Nesta, via the Sonic PI: Live & Coding project. [5]

See also

Further reading

Related Research Articles

<span class="mw-page-title-main">Squeak</span>

Squeak is an object-oriented, class-based, and reflective programming language. It was derived from Smalltalk-80 by a group that included some of Smalltalk-80's original developers, initially at Apple Computer, then at Walt Disney Imagineering, where it was intended for use in internal Disney projects. The group would later go on to be supported by HP labs, SAP, and most recently, Y Combinator.

In compiler optimization, register allocation is the process of assigning local automatic variables and expression results to a limited number of processor registers.

<span class="mw-page-title-main">Live coding</span> Integration of programming as part of running program

Live coding, sometimes referred to as on-the-fly programming, just in time programming and conversational programming, makes programming an integral part of the running program.

SIGPLAN is the Association for Computing Machinery's Special Interest Group on programming languages.

<span class="mw-page-title-main">Matthias Felleisen</span> German-American computer science professor and author

Matthias Felleisen is a German-American computer science professor and author. He grew up in Germany and immigrated to the US when he was 21 years old. He received his PhD from Indiana University under the direction of Daniel P. Friedman.

In computer science, pointer analysis, or points-to analysis, is a static code analysis technique that establishes which pointers, or heap references, can point to which variables, or storage locations. It is often a component of more complex analyses such as escape analysis. A closely related technique is shape analysis.

Thread Level Speculation (TLS), also known as Speculative Multithreading, or Speculative Parallelization, is a technique to speculatively execute a section of computer code that is anticipated to be executed later in parallel with the normal execution on a separate independent thread. Such a speculative thread may need to make assumptions about the values of input variables. If these prove to be invalid, then the portions of the speculative thread that rely on these input variables will need to be discarded and squashed. If the assumptions are correct the program can complete in a shorter time provided the thread was able to be scheduled efficiently.

The Geometry of Interaction (GoI) was introduced by Jean-Yves Girard shortly after his work on linear logic. In linear logic, proofs can be seen as various kinds of networks as opposed to the flat tree structures of sequent calculus. To distinguish the real proof nets from all the possible networks, Girard devised a criterion involving trips in the network. Trips can in fact be seen as some kind of operator acting on the proof. Drawing from this observation, Girard described directly this operator from the proof and has given a formula, the so-called execution formula, encoding the process of cut elimination at the level of operators.

<span class="mw-page-title-main">Incremental computing</span> Software feature

Incremental computing, also known as incremental computation, is a software feature which, whenever a piece of data changes, attempts to save time by only recomputing those outputs which depend on the changed data. When incremental computing is successful, it can be significantly faster than computing new outputs naively. For example, a spreadsheet software package might use incremental computation in its recalculation feature, to update only those cells containing formulas which depend on the changed cells.

In type theory, a refinement type is a type endowed with a predicate which is assumed to hold for any element of the refined type. Refinement types can express preconditions when used as function arguments or postconditions when used as return types: for instance, the type of a function which accepts natural numbers and returns natural numbers greater than 5 may be written as . Refinement types are thus related to behavioral subtyping.

Sonic interaction design is the study and exploitation of sound as one of the principal channels conveying information, meaning, and aesthetic/emotional qualities in interactive contexts. Sonic interaction design is at the intersection of interaction design and sound and music computing. If interaction design is about designing objects people interact with, and such interactions are facilitated by computational means, in sonic interaction design, sound is mediating interaction either as a display of processes or as an input medium.

In computer science, region-based memory management is a type of memory management in which each allocated object is assigned to a region. A region, also called a zone, arena, area, or memory context, is a collection of allocated objects that can be efficiently reallocated or deallocated all at once. Like stack allocation, regions facilitate allocation and deallocation of memory with low overhead; but they are more flexible, allowing objects to live longer than the stack frame in which they were allocated. In typical implementations, all objects in a region are allocated in a single contiguous range of memory addresses, similarly to how stack frames are typically allocated.

Gradual typing is a type system in which some variables and expressions may be given types and the correctness of the typing is checked at compile time and some expressions may be left untyped and eventual type errors are reported at runtime. Gradual typing allows software developers to choose either type paradigm as appropriate, from within a single language. In many cases gradual typing is added to an existing dynamic language, creating a derived language allowing but not requiring static typing to be used. In some cases a language uses gradual typing from the start.

<span class="mw-page-title-main">TidalCycles</span> Live coding environment

TidalCycles is a live coding environment designed for musical improvisation and composition. In particular, it is a domain-specific language embedded in Haskell, focused on the generation and manipulation of audible or visual patterns. It was originally designed for heavily percussive, polyrhythmic grid-based music, but now uses a flexible, functional reactive representation for patterns, using rational time. Tidal may therefore be applied to a wide range of musical styles, although its cyclic approach to time means that it affords use in repetitive styles such as Algorave.

<span class="mw-page-title-main">Ixi lang</span> Live coding environment

Ixi lang is a programming language for live coding musical expression. It is taught at diverse levels of musical education and used in Algorave performances. Like many other live coding languages, such TidalCycles, ixi lang is a domain-specific language that embraces simplicity and constraints in design.

Liquid Haskell is a program verifier for Haskell which allows developers to specify correctness properties by using refinement types. Properties are verified using an SMTLIB2-compliant SMT solver, such as the Z3 Theorem Prover.

Runtime predictive analysis is a runtime verification technique in computer science for detecting property violations in program executions inferred from an observed execution. An important class of predictive analysis methods has been developed for detecting concurrency errors in concurrent programs, where a runtime monitor is used to predict errors which did not happen in the observed run, but can happen in an alternative execution of the same program. The predictive capability comes from the fact that the analysis is performed on an abstract model extracted online from the observed execution, which admits a class of executions beyond the observed one.

Multitier programming is a programming paradigm for distributed software, which typically follows a multitier architecture, physically separating different functional aspects of the software into different tiers. Multitier programming allows functionalities that span multiple of such tiers to be developed in a single compilation unit using a single programming language. Without multitier programming, tiers are developed using different languages, e.g., JavaScript for the Web client, PHP for the Web server and SQL for the database. Multitier programming is often integrated into general-purpose languages by extending them with support for distribution.

In computer science, choreographic programming is a programming paradigm where programs are compositions of interactions among multiple concurrent participants.


  1. Blackwell, Alan; McLean, Alex; Noble, James; Rohrhuber, Julian (2014). "DROPS - Collaboration and learning through live coding (Dagstuhl Seminar 13382)". doi:10.4230/DagRep.3.9.130 . Retrieved 2 May 2015.
  2. Cellan-Jones, Rory (7 October 2013). "Baked in Britain, the millionth Raspberry Pi". BBC News. Retrieved 2 May 2015.
  3. "Making music with Raspberry Pi - CBBC Newsround". Retrieved 2 May 2015.
  4. Aaron, Samuel; Orchard, Dominic; Blackwell, Alan F. (2014). "Temporal semantics for a live coding language" (PDF). Proceedings of the 2nd ACM SIGPLAN international workshop on Functional art, music, modeling & design - FARM '14. FARM '14. ACM. pp. 37–47. doi:10.1145/2633638.2633648. ISBN   978-1-4503-3039-8.
  5. "Sonic Pi - The Live Coding Music Synth for Everyone". SONIC PI. Retrieved 5 October 2019.