FSharp.Osc 1.0.2

Install-Package FSharp.Osc -Version 1.0.2
dotnet add package FSharp.Osc --version 1.0.2
<PackageReference Include="FSharp.Osc" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FSharp.Osc --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FSharp.Osc, 1.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install FSharp.Osc as a Cake Addin
#addin nuget:?package=FSharp.Osc&version=1.0.2

// Install FSharp.Osc as a Cake Tool
#tool nuget:?package=FSharp.Osc&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

An OSC 1.1 library for F#.

A server:

#load "FSharp.Osc"
open FSharp.Osc

// listen for messages at /thing/volume on port 12345
let server =
    new OscUdpServer("127.0.0.1", 12345, [
        Path ("thing", [
            Method ("volume", (fun msg -> async { printfn "%O" msg }))
        ])
    ])

server.Run ()

A client:

#load "FSharp.Osc"
open FSharp.Osc
open System

let client = new OscUdpClient("127.0.0.1", 12345)
let rand = System.Random()

// send some random values to /thing/volume at port 12345
for _ in 0..9 do
    let msg = { addressPattern = "/thing/volume"; arguments = [OscFloat32 (float32 (rand.NextDouble()))] }
    printfn "Sending message"
    client.SendMessage msg |> ignore
    System.Threading.Thread.Sleep 1_000

Currently, the following is supported:

  • Strings, 32 bit ints, 32 bit floats, booleans, None, and Impulse data types
  • UDP - client and server
  • TCP - client and server
    • Choose between OSC 1.0 and OSC 1.1 frame encodings

The following is not yet implemented (PRs are welcome!):

  • Timetag data types
  • Bundles
  • TCP server SLIP encoding (aka OSC 1.1 frame encoding)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 109 10/29/2021
1.0.1 115 10/23/2021
1.0.0 156 10/23/2021