# soundboard.play

Source: https://docs.lightair.app/developers/remote-api/soundboard.play

> Plays a soundboard pad, or stops what's playing.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Audio. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `pad` | `string` | no | A pad's name or id. Without it, or with `stop`, the soundboard stops. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `playing` | `string` | no | The pad's name, when one plays. |

## Errors

Not found (-32004) for an unknown pad. A state error (-32005) when there's no soundboard yet.

## From an AI agent

The MCP server's `soundboard (action: play or stop)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "soundboard.play", "params": { "pad": "Airhorn" } }
```

Result:

```json
{ "playing": "Airhorn" }
```

## Related

- [soundboard.list](https://docs.lightair.app/developers/remote-api/soundboard.list.md)
- [widgets.sound](https://docs.lightair.app/developers/remote-api/widgets.sound.md)
