Free online tools to generate, calculate,
convert, format, encode, and play.
 

Live Coding Music

Write simple code patterns to generate music algorithmically, in real time. Edit the code and press Update to hear changes instantly, or load a built-in example for beats, melodies, and effects. Powered by Strudel; everything runs in your browser.

Loading engine…

How It Works

Live coding music means describing music as code patterns instead of recording it note by note. You write a short expression, the engine turns it into a repeating cycle of events, and you can rewrite the code while it plays; the sound updates on the next cycle. This tool uses Strudel, a JavaScript port of the TidalCycles live coding language.

The core idea is mini-notation: a string like "bd hh sd hh" is split evenly across one cycle, so it plays four evenly spaced sounds. From there you layer and transform patterns:

Controls
  • Play: evaluate the current code and start the audio clock
  • Update: re-evaluate the code while it keeps playing (or press Ctrl+Enter)
  • Stop: silence everything (or press Ctrl+.)
Pattern Cheat Sheet
sound("bd sd")play named samples (bd = kick, sd = snare, hh = hi-hat)
note("c e g")play pitches by note name
n("0 2 4").scale("C:major")play scale degrees mapped to a scale
"bd*4"repeat: four kicks in the slot
"bd ~ sd ~"~ is a rest (silence)
"[bd sd]"group events into one slot
"<c e g>"alternate: one per cycle
"bd(3,8)"Euclidean rhythm: 3 hits spread over 8 steps
stack(a, b)play patterns a and b at the same time
.fast(2) / .slow(2)speed up or slow down
.lpf(800)low-pass filter (effect)
.room(0.5) / .delay(0.4)reverb / echo (effects)
setcps(0.5)set tempo in cycles per second

Tip: the first Play may take a moment while sample sounds are downloaded. Audio starts only after you interact with the page.


Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with