Categorygithub.com/scgolang/osc
modulepackage
0.11.1
Repository: https://github.com/scgolang/osc.git
Documentation: pkg.go.dev

# README

osc

Open Sound Control 1.0 for Go.

Go Report Card

Install

go install github.com/scgolang/osc

Usage

See the ping pong example.

Contributing

This package aims to be high quality and completely compliant with the OSC 1.0 Spec.

If there is anything missing or this package does not satisfy your use case please open an issue with a detailed description of what you are doing and we will try to address it as quickly as possible.

If you wish to contribute code, please write tests that cover all your code.

# Functions

DialUDP creates a new OSC connection over UDP.
DialUDPContext returns a new OSC connection over UDP that can be canceled with the provided context.
DialUnix opens a unix socket for OSC communication.
DialUnixContext creates a new UnixConn.
FromTime converts the given time to an OSC timetag.
GetRegex compiles and returns a regular expression object for the given address pattern.
ListenUDP creates a new UDP server.
ListenUDPContext creates a UDP listener that can be canceled with the provided context.
ListenUnix creates a Unix listener that can be canceled with the provided context.
ListenUnixContext creates a Unix listener that can be canceled with the provided context.
Pad pads a slice of bytes with null bytes so that it's length is a multiple of 4.
ParseBundle parses a bundle from a byte slice.
ParseMessage parses an OSC message from a slice of bytes.
ReadArgument parses an OSC message argument given a type tag and some data.
ReadArguments reads all arguments from the reader and adds it to the OSC message.
ReadBlob reads a blob of the given length from the given slice of bytes.
ReadBlobFrom reads a binary blob from the provided data.
ReadFloatFrom reads a 32-bit float from a byte slice.
ReadIntFrom reads a 32-bit integer from a byte slice.
ReadString reads a string from a byte slice.
ReadTimetag parses a timetag from a byte slice.
TempSocket creates an absolute path to a temporary socket file.
ToBytes returns an OSC representation of the given string.
ValidateAddress returns an error if addr contains characters that are disallowed by the OSC spec.
VerifyParts verifies that m1 and m2 have the same number of parts, where a part is a nonempty string between pairs of '/' or a nonempty string at the end.

# Constants

BundleTag is the tag on an OSC bundle message.
Immediately is a special timetag value that means "immediately".
MessageChar is the first character of any valid OSC message.
SecondsFrom1900To1970 is exactly what it sounds like.
TimetagSize is the number of 8-bit bytes in an OSC timetag.
Typetag constants.
Typetag constants.
Typetag constants.
Typetag constants.
Typetag constants.
Typetag constants.
Typetag constants.

# Variables

Common errors.
Common errors.
Common errors.
Common errors.
Common errors.
Common errors.
Common errors.
Common errors.
Common errors.

# Structs

Bundle is an OSC bundle.
Incoming represents incoming data.
Message is an OSC message.
UDPConn is an OSC connection over UDP.
UnixConn handles OSC over a unix socket.

# Interfaces

Argument represents an OSC argument.
Conn defines the methods.
Dispatcher dispatches OSC packets.
MessageHandler is any type that can handle an OSC message.
Packet is an OSC packet.

# Type aliases

Arguments is a slice of Argument.
Blob is a slice of bytes.
Bool represents a boolean value.
Float represents a 32-bit float.
Int represents a 32-bit integer.
Method is an OSC method.
PatternMatching is a dispatcher that implements OSC 1.0 pattern matching.
String is a string.
Timetag represents an OSC Time Tag.