Documentation
¶
Overview ¶
Package instrument ships ompool's SuperCollider instrument inside the binary and runs it. The audio view starts sclang on the embedded ompool.scd so a single `go install` gives people the sound as well as the dashboard; the only thing they need installed is SuperCollider itself.
Index ¶
Constants ¶
const Env = "OMPOOL_INSTRUMENT"
Env is the environment variable that controls the launcher: unset or "auto" starts the embedded instrument, "off" never starts anything (use this when running the instrument yourself in SCIDE), and a path runs that .scd instead of the embedded one.
Variables ¶
var Source string
Source is the instrument as a SuperCollider script. `ompool instrument` prints it so people can open it in SCIDE and change the tunables.
var TestSender string
TestSender is a script that fakes the live feed so the instrument can be auditioned without waiting on the network.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process is a running (or finished) sclang.
func Start ¶
Start decides whether to launch sclang for the given OSC destination and does so. It never returns nil, so callers can always ask for Status. The process is detached from the terminal: its output goes to a log file under the user cache directory, and stopping it also stops the scsynth it booted.
type State ¶
type State int
State describes where the launcher got to, for display in the audio view.
const ( // Off means the launcher was disabled with OMPOOL_INSTRUMENT=off. Off State = iota // External means something already listens on the OSC port, so ompool // left it alone and is feeding that instead (typically SCIDE). External // Missing means sclang is not on PATH. Missing // Starting means sclang is compiling its class library and booting the // server, which takes a few seconds. Starting // Running means the script reported itself ready. Running // Exited means sclang stopped on its own; the log has the reason. Exited // Failed means sclang could not be started at all. Failed )