What Is Strudel REPL?

Updated

Strudel REPL is a browser-based music live coding environment that ports the TidalCycles pattern language to JavaScript. You use it when you want to write short lines of code and hear patterns evolve in real time, without installing a desktop app or a full music production suite. It runs in the page itself, so the core workflow is: type a pattern, evaluate it, and listen while it loops.

What "live coding" means here

In a typical DAW, you arrange clips, draw notes, and press play on a fixed timeline. In Strudel, the timeline is generated by code. Each pattern is a function of time, and the scheduler keeps querying that function for the next events. When you change the code and re-evaluate, the sound changes on the next cycle rather than requiring you to stop and restart.

That difference matters for how you work:

  • Iteration is the instrument. You are expected to edit while audio is running.
  • Patterns are compact. A single line can describe rhythm, pitch, and variation.
  • The browser is the runtime. Audio is produced through the Web Audio API, so there is no separate engine to install.

The TidalCycles connection

TidalCycles is a well-known live coding language for pattern-based music, originally embedded in Haskell. Strudel takes that pattern model and expresses it in JavaScript. If you have seen Tidal code, the ideas will look familiar: mini-notation for rhythms, functions that transform patterns, and cycles as the basic unit of time.

The practical consequence is that Strudel is not a JavaScript music library in the usual sense. You are not building an app that plays a song. You are writing patterns that a scheduler interprets continuously. For example, a pattern might describe a kick on every beat, a hi-hat on offbeats, and a bass note that changes every cycle — all as separate expressions that run together.

What you can do with it

Task How Strudel fits
Sketch a rhythm quickly Write a short pattern and hear it loop immediately
Explore generative variation Use pattern transformations to introduce controlled randomness
Learn pattern-based composition Work with cycles, mini-notation, and combinators in a REPL
Share a musical idea Keep the code as the artifact rather than an audio file

The REPL format is central. You evaluate expressions one at a time, see results, and adjust. That makes it closer to a programming environment than to a sequencer, even though the output is music.

When it is a good fit — and when it is not

Strudel is a good fit if you are comfortable reading and writing code, you want fast feedback while composing, and you are interested in pattern languages or algorithmic music. It is also useful if you want to study how TidalCycles concepts translate into JavaScript.

It is a poor fit if you need multitrack audio recording, mixing, or plugin-based production. Strudel generates patterns; it is not a replacement for a DAW when the goal is a finished, mixed track. It is also not aimed at users who want to avoid code entirely.

Getting started

  1. Open the Strudel REPL in your browser.
  2. Enter a simple pattern expression and evaluate it.
  3. Listen to the loop, then edit the expression and evaluate again.
  4. Add layers by writing additional patterns that play at the same time.

The expected result at each step is immediate audio feedback tied to the code you just ran. The common sticking point is expecting a transport control like a DAW's play button; in live coding, evaluation itself is what starts and updates the sound.