go-osc

module
v0.0.0-...-ba3669f Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2017 License: MIT

README

GoOSC

Open Sound Control (OSC) library for Golang. Implemented in pure Go.

  • Build Status: Build Status
  • Documentation: GoDoc

views views 24h

library users dependents

Features

  • OSC Bundles, including timetags
  • OSC Messages
  • OSC Client
  • OSC Server
  • Supports the following OSC argument types:
    • 'i' (Int32)
    • 'f' (Float32)
    • 's' (string)
    • 'b' (blob / binary data)
    • 'h' (Int64)
    • 't' (OSC timetag)
    • 'd' (Double/int64)
    • 'T' (True)
    • 'F' (False)
    • 'N' (Nil)
  • Support for OSC address pattern including '*', '?', '{,}' and '[]' wildcards

Usage

Client
import "github.com/hypebeast/go-osc/osc"

func main() {
    client := osc.NewClient("localhost", 8765)
    msg := osc.NewMessage("/osc/address")
    msg.Append(int32(111))
    msg.Append(true)
    msg.Append("hello")
    client.Send(msg)
}
Server
package main

import "github.com/hypebeast/go-osc/osc"

func main() {
  addr := "127.0.0.1:8765"
  server := &osc.Server{Addr: addr}

  server.Handle("/message/address", func(msg *osc.Message) {
    osc.PrintMessage(msg)
  })

  server.ListenAndServe()
}

Directories

Path Synopsis
examples
Package go-osc provides a client and server for sending and receiving OpenSoundControl messages.
Package go-osc provides a client and server for sending and receiving OpenSoundControl messages.

Jump to

Keyboard shortcuts

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