Add region
score.add_regionPlace a stretch of music on a part: a notes region (empty for score.add_notes, or with notes passed now) or an audio region (media, or a source range of it: a loop, a recording, a stem). at_beats and length_beats place it (or at_seconds and length_seconds). Audio keeps its own speed unless fit_beats is given, which stretches it to that many beats without changing its pitch. Regions on one part may overlap and sound together. Returns the new score_id (edit that one next), the region_id, and where it sits in beats, seconds and frames.
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": {
"part_id": "<part_id>",
"score_id": "<score_id>"
},
"name": "score.add_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Notes to put in it now, as in score.add_notes | |
| source | No | {from_seconds, until_seconds} of the media. Default all of it | |
| gain_db | No | Level of an audio region. Default 0 | |
| part_id | Yes | The part | |
| at_beats | No | Where it starts. One of at_beats or at_seconds | |
| media_id | No | Audio media, for an audio region | |
| score_id | Yes | The score to edit | |
| fit_beats | No | Stretch the audio to this many beats, pitch unchanged | |
| at_seconds | No | Where it starts, in seconds | |
| length_beats | No | Its length (or length_seconds). Required for a notes region; default for audio is the source's length | |
| length_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent | Yes | The version this edit started from | |
| region | Yes | ||
| changed | Yes | What the edit added, removed or modified | |
| note_ids | No | Notes passed with it, in the order given | |
| score_id | Yes | The new version: edit this one next (older ids stay valid) | |
| warnings | Yes | ||
| region_id | Yes |