audio.add
Adds a sound source and its mixer track: a microphone, the desktop's sound or an app's sound.
JSON-RPC 2.0project.write
Sound has no picture, so no object is added to a scene. A microphone's device comes from capture.targets with kind: microphone.
Parameters
- kindstring
microphone,desktoporapp. Defaultmicrophone. - devicestringA microphone's device.
- appstringThe app whose sound to take.
- namestringThe track's name. Default "Mic", "Desktop audio" or "App audio".
Result
- sourcestringThe new source's id.
- trackstringThe new track's id.
Errors
Invalid params (-32602) for another kind.
Events
Subscribers to events get workspace.changed.
From an AI agent
The MCP server's audio (action: add_input) reaches this method.
Example
{ "jsonrpc": "2.0", "id": 1, "method": "audio.add", "params": { "kind": "desktop" }}lightair call audio.add '{"kind":"desktop"}'const result = lightair.call("audio.add", {"kind":"desktop"});Result
{ "source": "019ad3f4-2b3c-7d4e-9f50-6b7c8d9e0f1a", "track": "019ad3f4-3c4d-7e5f-a061-7c8d9e0f1a2b" }