A nonoha-engine plugin for SuperCollider (sclang) process management, providing real-time audio synthesis control with automatic PipeWire audio routing on Linux.
This plugin provides a node for launching and managing the SuperCollider language interpreter (sclang) within the nonoha-engine visual programming environment. It handles the full process lifecycle including startup file execution, live code evaluation via stdin, and graceful shutdown with scsynth cleanup. On Linux, it optionally creates PipeWire virtual audio devices to route SuperCollider audio output.
- Sclang: SuperCollider (sclang) process manager
- Start/stop sclang with optional .scd/.sc startup file execution
- Send SuperCollider code to sclang stdin for live evaluation
- Automatic sclang binary discovery (PATH, macOS app bundle)
- Graceful shutdown sequence matching SC IDE behavior (
0.exit→ SIGTERM → force kill) - Orphaned scsynth process cleanup on all platforms
- PipeWire audio routing with virtual speaker/microphone creation (Linux only)
pip install git+https://github.com/viestyle-dev/sc-nodes.gitRequires Python 3.11+. nonoha-core is provided by the host runtime (the
nonoha engine), so it is not a runtime dependency of this package.
- Add
sc-nodesto your workspace'spyproject.toml:
[project]
dependencies = [
"sc-nodes",
# other dependencies...
]
[tool.uv.sources]
sc-nodes = { path = "./plugins/sc-nodes", editable = false }- Install dependencies using uv:
uv syncTo include sc-nodes as a built-in plugin in your nonoha-engine instance:
- Import the plugin in your
src/main.py:
import sc_nodes- Add to RuntimeConfig:
from nonoha_engine.runtime_config import RuntimeConfig
config = RuntimeConfig(
builtin_plugins=[
sc_nodes,
# other built-in plugins...
]
)Once installed, the Sclang node will appear in the nonoha-engine node palette. You can:
- Drag and drop the Sclang node into your visual programming workspace
- Configure properties (startup file path, audio routing toggle)
- Connect a trigger to the
startinput to launch sclang - Send SuperCollider code via the
execute_codeinput for live evaluation - Monitor process status, logs, and errors via the output ports
- Python >= 3.11
- nonoha-core (nonoha-engine core library)
- numpy (array processing)
- SuperCollider installed and accessible via PATH
- PipeWire with PulseAudio compatibility (
pactl) pw-jack(for JACK audio routing)pw-link,pw-cli(for PipeWire device connection)
To contribute or modify the plugin:
uv sync # also installs the dev dependency group (pytest, nonoha-core)
uv run pytesthttps://supercollider.github.io/
Contributions are welcome — see CONTRIBUTING.md. Pull requests require signing the nonoha CLA (a one-time comment on your first PR, shared across the nonoha repositories).
The Sclang node executes SuperCollider code supplied by the graph; treat
graph files like scripts (details in SECURITY.md).
See SECURITY.md for how to report vulnerabilities.