tidal_set_layer
Add or replace a named transform, source, or control layer on a TidalCycles channel and re-evaluate it, with optional variants for autopilot switching.
Instructions
Add or replace one named layer of a channel, then re-evaluate that channel. A channel's pattern is built as: $ $ ... # # . Transforms apply in the order they were added, outermost first. Each channel has one source; setting a new one replaces the old. Give variants to let tidal_autopilot switch between them. Call tidal_palette for idioms that work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The layer's code, without the $ or # that joins it | |
| kind | Yes | transform: a function applied with $ (e.g. "every 3 (jux rev)"). source: the base pattern (e.g. 's "bd*2 sd"'). control: an effect applied with # (e.g. "crush 4"). | |
| name | Yes | Layer name, e.g. "rhythm", "stereo", "filter". Reusing a name replaces that layer. | |
| channel | Yes | The channel (d1-d9) | |
| variants | No | Optional alternatives the autopilot may switch to. Keep them the same shape as code. |