Skip to content

A neat OSC library with focus on easy of use and performance. Not the most performant it could be due to reference type heap allocations, but minimized as much as possible!

License

Notifications You must be signed in to change notification settings

LucHeart/CoreOSC-UTF8-ASYNC

 
 

Repository files navigation

LucHeart.CoreOSC - ASYNC OSC Library for .NET Standard 2.1 & NET 7.0, NET 8.0+

NuGet NuGet

CoreOSC is a small library designed to make interacting with Open Sound Control easy (OSC). It provides the following features:

  • Produce an OSC Packet (messages and bundles) from .NET objects.
  • Translate an OSC message (consisting of a sequence of bytes) into a .NET object.
  • Transmit OSC packets via UDP.
  • Receive OSC packets via UDP.

Supported Types

The following OSC types are supported:

  • i - int (System.Int32)
  • f - float (System.Single)
  • s - string (System.String)
  • b - blob (System.Byte[])
  • h - long - 64 bit big-endian two's complement integer (System.Int64)
  • t - OSC-timetag (System.UInt64 / CoreOSC.TimeTag)
  • d - double - 64 bit IEEE 754 floating point number (System.Double)
  • S - CoreOSC.Symbol Alternate type represented as an OSC-string (for example, for systems that differentiate "symbols" from "strings") (CoreOSC.Symbol)
  • c - an ascii character, sent as 32 bits (System.Char)
  • r - 32 bit RGBA color (CoreOSC.RGBA)
  • m - 4 byte MIDI message. Bytes from MSB to LSB are: port id, status byte, data1, data2 (CoreOSC.Midi)
  • T - true. No bytes are allocated in the argument data. (System.Boolean)
  • F - false. No bytes are allocated in the argument data. (System.Boolean)
  • N - mull. No bytes are allocated in the argument data. (null)
  • I - Infinity. No bytes are allocated in the argument data. (Double.PositiveInfinity)
  • [ - Indicates the beginning of an array. The tags following are for data in the Array until a close brace tag is reached. (System.Object[] / List<object>)
  • ] - Indicates the end of an array.

(Note that nested arrays (arrays within arrays) are not supported, the OSC specification is unclear about whether that it is even allowed)

Using The Library

NuGet NuGet

Get this library at NuGet.

License

LucHeart.CoreOSC is licensed under the MIT license.

See LICENSE

History

CoreOSC is forked and converted from SharpOSC made by ValdermarOrn

About

A neat OSC library with focus on easy of use and performance. Not the most performant it could be due to reference type heap allocations, but minimized as much as possible!

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C# 100.0%