Add device
score.add_devicePut an instrument or an effect on a part of a score, or an effect on the whole score (master). A part sounds through its devices in order: its instruments first, every one of them playing every note of the part (two or more sound together as one layered sound), then its effects in the order added. Instruments, by name: sampler, synth, grand_piano, electric_piano, organ, acoustic_bass, electric_bass, synth_bass, sub_bass, strings, pad_warm, brass, flute, bells, music_box, marimba, acoustic_guitar, electric_guitar, pluck, choir; drum kits, where a pitch selects a drum: kit_acoustic, kit_808, kit_909, kit_lofi. Each named instrument and kit is recorded so its loudest note peaks at -12 dBFS at gain_db 0, which leaves room for chords and several parts. Effects, each with the params it has to be given (no value is assumed for them; the rest have defaults): eq {bands}, filter {type, cutoff_hz}, compressor {threshold_db, ratio, attack_ms, release_ms}, limiter {ceiling_dbtp}, reverb {decay_seconds, wet}, delay {wet, time_beats or time_ms}, chorus {rate_hz, depth, wet}, saturation {drive_db}, gain {gain_db}. sampler plays any media (media_id), or a time range of it, at each note's pitch, from its start for the note's length, then release_ms; one_shot plays it to its end whatever the length; root_note is the pitch that plays it unchanged; with slices, each pitch plays its own range of the media, as a drum kit does, and a pitch with no slice is silent. synth is oscillators, a filter and envelopes. A wrong name or param is refused with the full list, ranges, units and defaults (also at video://catalog/devices); score.get shows every param applied. Returns the new score_id (edit that one next) and the device_id.
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>",
"score_id": "<score_id>"
},
"name": "score.add_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A device name from video://catalog/devices | |
| master | No | true puts an effect on the whole score | |
| params | No | The device's params. For sampler: media_id, from_seconds, until_seconds, root_note (a pitch, as in notes), one_shot, or slices [{note, from_seconds, until_seconds}] | |
| part_id | No | The part. One of part_id or master | |
| at_index | No | Position in the part's order. Default last (an instrument: after the part's other instruments) | |
| score_id | Yes | The score to edit |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent | Yes | The version this edit started from | |
| changed | Yes | What the edit added, removed or modified | |
| score_id | Yes | The new version: edit this one next (older ids stay valid) | |
| warnings | Yes | ||
| device_id | Yes |