Set Pattern Length
pattern_set_lengthSet a 1-based pattern's loop length in bars, beats, or 16th-note steps for FL Studio 2026+, returning the resulting steps, beats, and bars.
Instructions
Set a 1-based pattern's loop length in bars, beats, or 16th-note steps (FL Studio 2026+).
Supply exactly one of bars, beats, or steps (passing zero or multiple raises a
tool error). Returns the resulting length in steps, beats, and bars. On FL 2024/2025
where this API is unavailable, returns ok=False with a hint—extend notes or the
step grid instead.
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": {
"index": "<index>"
},
"name": "pattern_set_length"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | Target length in bars using the project time signature. Provide exactly one of `bars`, `beats`, or `steps`. | |
| beats | No | Target length in beats (quarter notes in 4/4). Provide exactly one of `bars`, `beats`, or `steps`. | |
| index | Yes | 1-based pattern index whose length will be set. | |
| steps | No | Target length in 16th-note steps (4 per beat, 16 per 4/4 bar). Provide exactly one of `bars`, `beats`, or `steps`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||