Lesson 9 +10 XP

Parallel Patterns with ,

Parallel Patterns with ,

Use a comma to play multiple patterns at the same time (in parallel).

Two patterns at once

The left side plays its own rhythm while the right side plays its own.

As many commas as you want

Commas inside sub-sequences too

Notice: sound("bd [bd,casio]") and sound("bd bd, bd casio") sound the same! There are often many ways to express the same idea.

Multiple lines with backticks

For long patterns, use backticks (template literals) to write several lines:

Each line is still one big pattern - line breaks just make it readable.

TL;DR

  • , plays patterns in parallel.
  • You can use many commas.
  • Commas work inside sub-sequences too.
  • Backtick strings let you write patterns across many lines.