Start this hobby
Your first practical checklist
Buy or borrow
A laptop or Raspberry Pi. Sonic Pi is free and runs on Windows, macOS, Linux and Raspberry Pi; Strudel runs in a web browser with no install
First 30 minutes
Install Sonic Pi, work through the first few sections of its built-in tutorial and play a four-note melody with play and sleep.
First week goal
Build a three-minute piece with at least three loops, starting and stopping them by hand while it plays, and record it.
Avoid this mistake
Leaving out the sleep in a live loop makes Sonic Pi freeze or error, so put the sleep in first.
Is this for me?
A quick fit check
Good signs
- You enjoy making music from patterns and repetition, for instance building a drum beat out of loops, and like experimenting with how patterns combine.
- You like typing and editing text, and the idea of performing by changing code appeals to you more than playing an instrument.
- You are happy with unpredictable results, because live coding often produces happy accidents that you decide whether to keep.
Think twice if
- A mistake in your code can stop the music suddenly, which is part of the fun but can be frustrating when you are trying to record.
- You need to learn some coding concepts such as loops, lists and randomness, and that may feel slow if you only want to make tunes.
- The music tends towards repetitive electronic styles, so if you want to write songs with lyrics or play traditional instruments, other tools may suit you better.
Make live coding music easier
Install Sonic Pi or open Strudel in a browser, and work through the built-in tutorial for the first hour. Copy and tweak the example code until you can write a drum loop from memory.
First session
What to do in the first 30 minutes
Open Sonic Pi, run the sample code, and then write play 60, sleep 1 and play 64 to hear two notes in sequence.
Write a live_loop :drums do with sample :bd_haus, sleep 0.5, then run it and change the sleep time while it is playing.
Add a second live_loop with a snare or hi-hat sample at a different rhythm, and use sync or matching sleep values to keep them together.
Add a third loop playing notes from a scale, press Stop and Run to hear it again, and save the buffer with a note about what you did.
The appeal · Musical practice
Why try live coding music?
In live coding music you write short programs that make sound and edit them while they are running, so the music evolves in front of an audience or just in your headphones. It differs from using a DAW such as Ableton or Logic, where you arrange recorded clips and notes visually, and from DJing, where you mix existing tracks. Beginners usually start with Sonic Pi or Strudel, then move to heavier pattern languages like TidalCycles, and some eventually play at algorave-style events.
Learning music and code together
You learn rhythm, scales and structure by writing them out, and programming concepts by hearing them.
Instant feedback
Changes become audible as soon as you press run, so ideas can be tested quickly.
A creative performance format
You can improvise a set live, record it, or share code that others can run and remix.
Keep it simple
What you need to begin
- A laptop or Raspberry PiSonic Pi is free and runs on Windows, macOS, Linux and Raspberry Pi; Strudel runs in a web browser with no install
- Closed-back headphonesAny decent pair; at around £20–£50 they let you practise late and hear the quiet details
- Sonic Pi or StrudelStart with one tool and its built-in tutorial; TidalCycles needs more setup, so leave it until you are comfortable with loops
- A notes file of snippetsCopy every loop, rhythm or chord pattern you like into one document so you can remix your own library
The fundamentals
Four skills to build
Live loops
Putting each musical layer in its own looping block lets you start, stop and change parts independently while the music runs.
Rhythm and timing
Using sleep values or pattern strings to place beats accurately is the basis for drums and groove.
Scales and chords
Picking notes from a scale or chord, rather than randomly, keeps melodies sounding musical.
Randomness and variation
Functions such as choose, rrand and ring, or pattern modifiers in Strudel, give variation so loops do not feel static.
Software deep dive
Live Coding Music: zero to professional
Programming is the practice of turning a messy human problem into small, testable instructions. In 2026, AI assistants can speed up syntax and boilerplate, but beginners still need fundamentals: reading errors, tracing data, using Git and finishing small projects.
Fresh context
What to know now
- ↳Use AI as a reviewer and explainer, not as the only author. You still need to understand every file you ship.
- ↳Old single-purpose starter tools age quickly. Prefer official docs, small vanilla projects, or maintained framework starters.
- ↳Employers and serious collaborators care about proof: deployed projects, readable commits, tests, issue notes and clear explanations of trade-offs.
Start with the right route
Common options and trade-offs
Web path
HTML, CSS and JavaScript give fast visual feedback and teach the browser platform beneath React, Vue, Svelte and every website builder.
Python path
Strong for automation, data, scraping your own data, command-line tools and backend services. The official tutorial is current and well maintained.
JavaScript/TypeScript app path
Good for full-stack apps because one language can cover browser, server, testing and tooling.
A practical setup
Common tools and what each one does
Pick one editor and learn search, multi-file replace, terminal, debugger and extensions slowly.
Learn folders, paths, environment variables, package scripts and how to read exit errors.
Commit small working checkpoints with messages that explain why, not just what.
Use issues, pull requests and CI even for solo projects once the basics work.
Choose the runtime your project needs; avoid installing every tool mentioned in tutorials.
Start with a few tests for important functions and previous bugs before chasing full coverage.
Do not skip levels
A five-stage learning roadmap
Learn files, terminal navigation, variables, functions, conditionals, loops and reading stack traces.
Proof you are ready to move on: Build a calculator, text formatter or static page without copying a full tutorial.
Handle user input, arrays or objects, modules, DOM events or files, and basic Git branching.
Proof you are ready to move on: Build a searchable list, quiz, simple API client or useful automation script.
Use persistent storage, validation, async code, APIs, authentication basics and automated tests.
Proof you are ready to move on: Ship a tracker with create, edit, delete, empty states, errors and a deploy URL.
Study architecture, databases, accessibility, security, performance budgets and operational monitoring.
Proof you are ready to move on: Run a small multi-user app with backups, logs, migrations and rollback notes.
Practise code review, issue breakdown, debugging production failures and documenting decisions.
Proof you are ready to move on: Maintain a project used by real people and show how feedback changed it.
How real work gets done
A professional workflow
Use the same sequence on small personal projects that you would use on serious work. The scale changes; the discipline does not.
- Write the user problem, constraints and one measurable success condition.
- Sketch data, screens and failure states before choosing libraries.
- Build the thinnest complete version that runs end to end.
- Commit after each working change and keep a readable project log.
- Test expected, empty, invalid, slow and failure states.
- Deploy, observe real behaviour and document the next decision.
Build evidence, not tutorial history
Three portfolio milestones
Tiny personal utility
A script or page that solves one annoyance you actually have.
Local-first tracker
Structured data, filtering, validation, persistence, tests and responsive layout.
Production service
Accounts, database migrations, permissions, observability, backups and a deployment pipeline.
The difference at professional level
Habits that make work trustworthy
- ✓Name variables and functions for their purpose, not their implementation.
- ✓Keep changes small enough to review and revert.
- ✓Write tests around important behaviour and past bugs.
- ✓Treat accessibility, security and error handling as requirements.
- ✓Document setup, architecture decisions and operational steps.
- ✓Measure before optimising and verify after deployment.
Words you will encounter
Essential vocabulary
- Repository
- A project and its version history, usually managed by Git.
- API
- A defined way for one piece of software to request data or behaviour from another.
- Runtime
- The program or environment that executes code, such as a browser, Node.js or Python.
- Dependency
- External code a project relies on; dependencies must be updated and reviewed.
- Framework
- A structured set of tools and conventions that controls part of an application's architecture.
- Deployment
- The repeatable process that releases a tested version for people to use.
Continue with primary sources
Official learning resources
Documentation is a working tool, not something to read once from beginning to end. Follow one structured introduction, then return with specific questions from a project.
Four small steps
Your first week
- Install Sonic Pi, work through the first few sections of its built-in tutorial and play a four-note melody with play and sleep.
- Write a live_loop :drums with sample :bd_haus and sleep 0.5, then add a second loop with a hi-hat sample at a different sleep time.
- Add a bass or lead line using play choose(scale(:e3, :minor_pentatonic)), change use_bpm while it runs, and note which edits sound good.
- Build a three-minute piece with at least three loops, starting and stopping them by hand while it plays, and record it.
The longer path
How progress usually looks
For live coding music, a sustainable rhythm is three 30 to 45-minute sessions a week, plus occasional recording of a piece you like. Move forward when the current step feels repeatable, not merely possible once.
First loops
You can write a drum loop and a bassline, change them live and understand what each line does.
Building a piece
You layer several loops with effects, use scales and random choices, and structure a few minutes of music with an intro and drop.
Performing live
You rehearse a set, switch between prepared snippets, and perform or stream it to a few friends.
Exploring further
You try other tools such as Strudel or TidalCycles, use samples of your own, or go to an algorave or live-coding meetup.
Progress markers
What improvement looks like
You can write a drum loop and a bassline, change them live and understand what each line does.
You rehearse a set, switch between prepared snippets, and perform or stream it to a few friends.
You try other tools such as Strudel or TidalCycles, use samples of your own, or go to an algorave or live-coding meetup.
Spend deliberately
A realistic cost plan
The headline starting range is Free–£60, but access, borrowing and second-hand equipment can change that substantially.
Learn with other people
Community and safety
Finding your people
TOPLAP is the main live-coding community, and the Sonic Pi and TidalCycles forums are active, beginner-friendly places to ask questions. Algorave events and live-coding meetups happen in several UK cities, and many people also share sets online.
Safety note
Keep the volume low on headphones, especially when experimenting with effects, because levels can jump when you change a value, and take breaks to protect your hearing. Check the code you run from other people before executing it, and be careful about sudden loud bass if you play through speakers near neighbours.
Three common beginner mistakes
- Leaving out the sleep in a live loop makes Sonic Pi freeze or error, so put the sleep in first.
- Writing one huge loop makes it hard to change anything live, so split drums, bass and melody into separate live loops.
- Making edits and running them without saving ideas means losing good versions, so copy working snippets into a notes file.
Good to know
One tip worth keeping
Every loop needs a sleep inside it or the program stops with an error, so add the sleep first and the sounds afterwards. Keep the volume modest on headphones, because it is easy to push levels up while experimenting.
Before you begin
Common questions
What is the difference between Sonic Pi and Strudel?+
Sonic Pi is a desktop app with a Ruby-based language and a built-in tutorial. Strudel runs in a browser and uses compact pattern notation, inspired by TidalCycles. Both are good for beginners.
Do I need to know music theory?+
No. You can learn scales and rhythms as you go, and the tools make it easy to pick notes from a scale or chord.
Do I need to know how to code?+
Not before you start. The built-in tutorials teach the basics, and the music gives you a reason to learn loops and variables.
Can I record or share my music?+
Yes. Sonic Pi can record your output, and you can share code snippets or stream your sessions. Check licences if you use samples that are not included with the tool.
What is an algorave?+
An event where performers live-code dance music and visuals. They are friendly occasions, and many welcome beginners who just want to watch.