Explore Concepts

Discover music theory through code - no prerequisites required

Browse by Category

Starter Patterns

Simple patterns to explore - click to hear, then open in editor to modify

Basic Beat

A simple four-on-the-floor beat to get started

s("bd hh sd hh")

Syncopated Groove

Off-beat accents that make it groove

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

Euclidean Rhythm

Mathematically distributed hits

s("bd*8").euclid(5, 8)

Layered Texture

Multiple patterns playing together

stack(
  s("bd sd:2"),
  s("hh*8").gain(0.5),
  s("~ cp")
)

Melodic Arpeggio

Playing chord notes one at a time

note("c3 e3 g3 c4").sound("piano")

Phasing Experiment

Two patterns slowly drifting apart

stack(
  s("bd sd bd sd"),
  s("bd sd bd sd").slow(1.01)
)

Community Patterns

Patterns shared by other learners