package osc
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=920640b4c6b4fe65dfb7e99733717b260ae072de530ce94b52d1e76dc3b46a0a
Description
Library containing types for representing OpenSoundControl messages, as well as functions for converting OpenSoundControl messages to and from strings.
Added to opam-repository:
README
ocaml-osc
Pure OCaml implementation of the Open Sound Control protocol.
Dependencies:
- lwt (optional)
- ocplib-endian
- oUnit
- rresult
Usage
If you just need to parse and serialise OSC packets, use the Osc.Codec module:
# require "osc";;
# open Osc.Types;;
# let data = Osc.Codec.of_packet (Message {address = "/hello/world"; arguments = [Int32 123l; String "foo"]});;
val data : bytes = "/hello/world\000\000\000\000,is\000\000\000\000{foo\000"
# let packet = Osc.Codec.to_packet data;;
val packet : (packet, [ `Missing_typetag_string | `Unsupported_typetag of char ]) Rresult.result =
Rresult.Ok (Message {address = "/hello/world"; arguments = [Int32 123l; String "foo"]})To simplify sending and receiving OSC packets over the network, the modules Osc_lwt and Osc_unix are available:
# require "osc.lwt";;
# require "lwt.syntax";;
# open Osc.Types;;
# lwt client = Osc_lwt.Udp.Client.create ();;
val client : Osc_lwt.Udp.Client.t = <abstr>
# let addr = Unix.ADDR_INET (Unix.inet_addr_of_string "127.0.0.1", 57120);;
val addr : Lwt_unix.sockaddr = Unix.ADDR_INET (<abstr>, 57120)
# lwt () = Osc_lwt.Udp.Client.send client addr (Message {address = "/hello/world"; arguments = [Int32 123l; String "foo"]});;
Dependencies (4)
- ocplib-endian
-
ocaml
>= "4.08" -
dune
>= "2.9" - base-bytes
Dev Dependencies (1)
-
ounit
with-test
Optional Dependencies
None
Conflicts
None
Build status
Results of building osc with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.2.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure