Packages

A simple OSC transport layer for communicating with SuperCollider from Elixir. Provides low-level OSC messaging and node/group management for live coding and audio synthesis. Requires SuperCollider to be installed on your system.

Current section

Files

Jump to
waveform lib waveform osc transport.ex
Raw

lib/waveform/osc/transport.ex

defmodule Waveform.OSC.Transport do
@moduledoc """
Behaviour for OSC message transport.
This behaviour defines the interface for sending OSC messages to SuperCollider.
Different implementations can be used for production (UDP) and testing (NoOp).
## Implementations
- `Waveform.OSC.UDP` - Production implementation that sends actual OSC messages via UDP
- `Waveform.OSC.NoOp` - Test implementation that accepts messages but doesn't send them
"""
@doc """
Send an OSC message.
## Parameters
- `state` - The OSC GenServer state (contains socket and host info)
- `address` - OSC address as a charlist (e.g., '/s_new', '/g_new')
- `args` - List of OSC arguments
## Returns
`:ok` on success
"""
@callback send_osc_message(state :: map(), address :: charlist(), args :: list()) :: :ok
end