Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ go-osc Public
forked from hypebeast/go-osc

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

License

Notifications You must be signed in to change notification settings

kward/go-osc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoOSC

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

  • Build Status: CI Status
  • Documentation: GoDoc

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 osc "github.com/kward/go-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/kward/go-osc/osc"

func main() {
  addr := "127.0.0.1:8765"
  server, err := osc.NewServer(addr)
  if err != nil {
    panic(err)
  }

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

  server.ListenAndServe()
}

Misc

This library was forked from https://github.com/hypebeast/go-osc to modernize the codebase with Go modules, GitHub Actions CI/CD, and updated dependencies.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%