home/ atoms/ temporal-recursion-live-coding

Temporal recursion — a function calling itself with a time delay — is a core live coding time-representation technique (as in Extempore/Impromptu)

Andrew Sorensen’s Extempore (2011) and its predecessor Impromptu (2005) represent time in live coding through temporal recursion: a function that schedules itself to be called again at a specific future moment. This allows declarative representation of musical loops using imperative, step-by-step structures. Similarly, Sonic Pi uses explicit sleep instructions to mark out time, making loops represent musical time directly rather than iterating to solve a problem. The result: what looks like software engineering (loops, conditionals) is actually compositional notation — a Sonic Pi loop is directly a musical loop, not a metaphor for one. This blurs the boundary between software engineering and musical composition.

Examples

In Sonic Pi: loop do; play 60; sleep 0.5; end — the sleep is musical time, not a delay hack. In Extempore, temporal recursion: a function plays a note then calls itself 0.5 beats later, creating an infinite loop that can be redefined while running.

Assessment

Write pseudocode showing temporal recursion for a simple 4-beat pattern. Explain how redefining the function while it’s scheduled to run next enables live coding — what happens between iterations?

“sleep instructions are added as imperative steps, marking out time and rhythm in the resulting music.”
corpus · live-coding-a-user-s-manual-archive-org-copy-borrow-free-all · chunk 63