> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rawchunks.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Write a Live Code pattern

> Use supported Strudel-style sound and note patterns in a repeating lane.

Open **LIVE CODE** in the toolbox. Select **CREATE LIVE CODE TRACK** if needed.

<Frame caption="Live Code with an example pattern in the Rawchunks editor.">
  <img src="https://mintcdn.com/rawchunks/TJh732SoaqfpR6P6/images/app/editor-strudel.jpg?fit=max&auto=format&n=TJh732SoaqfpR6P6&q=85&s=cb732f6e1a6f8b7e0c613b6b0716d100" alt="Live Code editor with pattern text and Run Pattern, Stop and Clear controls." width="666" height="432" data-path="images/app/editor-strudel.jpg" />
</Frame>

Enter a sound pattern:

```javascript theme={null}
s("bd sd hh cp")
```

Or a note pattern:

```javascript theme={null}
note("c3 e3 g3")
```

Select **RUN PATTERN**, or press **Shift+Enter** in the editor. This starts the arrangement and applies the project's displayed BPM to the pattern. **STOP** stops the arrangement and returns to the beginning; **CLEAR** empties the pattern.

## Supported pattern tools

| Write | To request… |
| - | - |
| `s("bd ~ sd hh")` | Sounds with a rest; `bd` is kick, `sd` snare, `hh` hi-hat |
| `s("[bd hh] sd")` | A grouped subdivision |
| `s("hh*4")` | Repeated hits |
| `s("bd(3,8)")` | Three hits spread across eight steps |
| `note("c3 e3 g3").slow(2)` | Notes at a slower rate |
| `.fast(2)` or `.speed(2)` | A faster rate |

You can separate expressions with commas, semicolons, or newlines. Other named sounds include **cp/clap**, **tom**, **perc/rim**, and **crash/cymbal**.

This panel supports a subset of Strudel-style notation. Full Strudel programs and arbitrary JavaScript aren't supported. A successful console status doesn't mean every modifier is supported. Keep patterns small and listen after changes; editing the text can update an already playing lane.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.