Supernova¶
Lifecycle management for the embedded supernova parallel-DSP engine. See the Supernova Guide for the threading model and constraints.
nanosynth.supernova ¶
Embedded supernova (parallel DSP engine) lifecycle management.
EmbeddedSupernovaProtocol ¶
Process protocol that runs supernova in-process via libsupernova.
Drop-in replacement for EmbeddedProcessProtocol that uses
supernova's parallel DSP engine instead of scsynth. Supports the
same boot / quit / send_packet / set_reply_callback
interface so it can be used with Server.
Only one supernova instance may be active per process (singleton
nova_server global).
boot ¶
boot(options: Options) -> None
Boot the embedded supernova engine with the given options.
Creates a nova_server, opens the audio backend, installs print and reply callbacks, and starts a daemon thread for the event loop.
Raises: ServerCannotBoot: If a supernova instance is already active, or if nova_server construction or audio setup fails.
set_reply_callback ¶
set_reply_callback(
callback: Callable[[bytes], None] | None,
) -> None
Set (or clear) the callback for OSC replies from the engine.
If the engine is already booted, the callback is installed immediately. Otherwise it will be installed on the next boot.
Args: callback: A callable receiving raw OSC bytes, or None to clear.
quit ¶
quit() -> None
Shut down the embedded supernova engine.
No-op if the engine is not currently online. Blocks until the engine thread has joined (up to 5 seconds, then force-cleanup).