Skip to content
Changelog

editor.words.cut

Cuts words or time ranges out of a clip, and its linked sound, closing the gaps.

JSON-RPC 2.0project.write

The clip's first piece keeps its id.

Parameters

  • clipstringrequiredThe clip's id, from editor.timeline.get.
  • wordsnumber[]Word numbers from editor.words.get.
  • ranges[number, number][][start_ms, end_ms] in the file.
  • alonebooleanOnly the clip, not its linked sound.
  • canvasstringA canvas's id or name, shown first. Default: the canvas shown.

Result

  • removed_msnumberTime removed.
  • ranges[number, number][]The ranges cut, in the file.

Errors

Invalid params (-32602) without words or ranges, or for a range that ends before it starts. A state error (-32005) for words before it's transcribed. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it. Invalid params (-32602) for a clip id that can't be read; not found (-32004) for a clip that isn't on the canvas.

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_words (action: cut) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.words.cut",
"params": {
"clip": "019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d",
"words": [
12,
13,
14
]
}
}

Result

{ "removed_ms": 860, "ranges": [[5120, 5980]] }

editor.words.get · editor.words.tighten