No history yet

Introduction to Strudel

Music in Your Browser

Strudel is a tool that lets you create music by writing code, directly in your web browser. There's nothing to install. It's a playground for making patterns and rhythms with text. This approach is called live coding—you type commands and hear the musical results instantly. It's an interactive way to compose, turning programming into a performance.

Strudel uses a powerful pattern language originally from an environment called Tidal Cycles. This language is excellent for describing complex rhythms and melodies in a very compact way. But with Strudel, all of this power is accessible right from a webpage, making it easy to get started and to share your creations with others.

The Strudel Environment

When you visit the Strudel website, you'll see a screen split into two main parts. The left side is your code editor, where you'll write your musical patterns. The right side is the console, which gives you feedback. This setup is a classic Read-Eval-Print Loop, or REPL.

REPL

noun

Stands for Read-Eval-Print Loop. It's an interactive programming environment that takes a single user input (Read), executes it (Eval), returns the result to the user (Print), and then waits for the next input (Loop).

Think of the REPL as a conversation. You tell Strudel what to do in the editor, it listens and plays the sound, and it might print a message in the console. This immediate feedback is what makes live coding so engaging.

Making Your First Sound

Let's make some noise. In the code editor on the left, type the following line:

s("bd")

Now, execute it. You can do this by holding Ctrl and pressing Enter (or Cmd + Enter on a Mac). You should hear a repeating bass drum sound. Congratulations, you're live coding!

The s stands for "sound," and "bd" is the name of the sample, in this case, a bass drum. The text inside the quotes tells Strudel which sound to play from its library.

Try replacing "bd" with other sounds. The names are usually abbreviations. Here are a few to get you started:

CodeSound
s("sd")Snare Drum
s("hh")Hi-Hat
s("cp")Clap
s("bass")Bass Synth

You can combine sounds to create a sequence. To do this, use square brackets [] inside the quotes. Each sound name is separated by a space.

s("[bd sd] [bd hh sd]")

When you run this code, you'll hear the bass drum and snare play in the first half of the loop, and the bass, hi-hat, and snare play in the second half. You've just written your first algorithmic pattern.

This is just the beginning. The core idea is simple: you write text patterns, and Strudel turns them into music.

Quiz Questions 1/5

What is the primary purpose of Strudel?

Quiz Questions 2/5

The interactive approach of typing commands and hearing the musical results instantly in Strudel is known as what?