sc_play
Run SuperCollider code in realtime on the default audio output: boots the server, plays patterns or synths for a set duration, then stops. Use sc_stop to end early.
Instructions
Play SuperCollider code in realtime on the default audio output. Boots the server, runs the code (the server is s, e.g. Pbind(...).play or { SinOsc.ar(440) ! 2 * 0.1 }.play), and stops everything after duration seconds.
Returns once playback has started. Use sc_stop to cut it short. Only one playback runs at a time; a new call replaces the old one.
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": {
"code": "<code>",
"duration": "<duration>"
},
"name": "sc_play"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | SuperCollider code to run after the server has booted. | |
| duration | Yes | Seconds to keep playing before shutting down. |