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.
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. |