vivid-osc

Open Sound Control encode/decode

Version on this page:0.3.0.0
LTS Haskell 22.37:0.5.0.0
Stackage Nightly 2024-10-09:0.5.0.0
Latest on Hackage:0.5.0.0

See all snapshots vivid-osc appears in

LicenseRef-GPL licensed and maintained by Tom Murphy
This version can be pinned in stack with:vivid-osc-0.3.0.0@sha256:98b59515ebccae6b1a44415baa594519035b4f71d5a49f1a3ebd541e8531273e,2841

Module documentation for 0.3.0.0

Used by 2 packages in lts-12.26(full list with versions):

A small, simple, and well-tested implementation of the Open Sound Control message format.

Example usage:

{-# LANGUAGE OverloadedStrings #-}
import Network.Socket
import Network.Socket.ByteString as SB

import Vivid.OSC

main = do
   -- Boring Network.Socket setup:
   (a:_) <- getAddrInfo Nothing (Just "127.0.0.1") (Just "57120")
   s <- socket (addrFamily a) Datagram defaultProtocol
   connect s (addrAddress a)

   -- The interesting part:
   SB.send s $ encodeOSC $
      OSC "/play2" [OSC_S "cps", OSC_I 1, OSC_S "s", OSC_S "bd"]