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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"code": "<code>"
},
"name": "strudel_set_block"
}
}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 |