osc

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package osc is a minimal Open Sound Control sender over UDP. It exists so ompool can drive external instruments (e.g. SuperCollider) in lockstep with what it renders, without pulling in a dependency for a few dozen bytes of framing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender writes OSC messages to a single UDP destination. A nil *Sender is valid and silently drops every message, so callers can keep one code path whether or not OSC output is enabled.

func New

func New(addr string) (*Sender, error)

New dials addr (host:port) for UDP. Nothing is sent until Send is called.

func (*Sender) Close

func (s *Sender) Close() error

Close releases the socket. Safe on nil.

func (*Sender) Send

func (s *Sender) Send(address string, args ...float32)

Send emits one message. Every argument is encoded as an OSC float32 ("f"), which keeps the receiving side simple; block heights and satoshi counts fit float32 well enough for sonification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL