Skip to content

Low Level API

Andreas Dzialocha edited this page Nov 2, 2018 · 5 revisions

Use pack or unpack methods to read or write binary OSC data. For even lower handling of the library you might want to have a look into the documentation of Atomic Type classes: https://doc.esdoc.org/github.com/adzialocha/osc-js/class/src/atomic/int32.js~AtomicInt32.html

Examples

const message = new OSC.Message('/some/path', 21)
const binary = message.pack() // returns a Uint8Array
const msg = new OSC.Message()
msg.unpack(binary) // binary is a DataView instance
console.log(msg.args)

Further Reading