strudel_set_block
Add or replace a named Strudel pattern block so multiple blocks play together; invalid code returns an error and leaves the current program unchanged.
Instructions
Add or replace a named block in the Strudel program, which plays on every open Strudel page (the server's web page at /strudel; needs TIDAL_UI_PORT). Each block is one Strudel pattern in JavaScript syntax, e.g. s("bd*2 [~ sd]").bank("RolandTR909") or note("c e g").s("piano").fast(2). Blocks play together. If Strudel rejects the code, you get its error and nothing changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | One Strudel pattern expression, without $: | |
| name | Yes | Block name, e.g. "drums"; reusing a name replaces that block |