packages feed

vivid-osc-0.3.0.0: vivid-osc.cabal

name:                vivid-osc
version:             0.3.0.0
synopsis:            Open Sound Control encode/decode
description:
  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"]

license:             GPL
license-file:        LICENSE
author:              Tom Murphy
maintainer:          Tom Murphy
category:            Audio, Codec, Music, Sound

build-type:          Simple
cabal-version:       >=1.10


library
  exposed-modules:
      Vivid.OSC
    , Vivid.OSC.Old
    , Vivid.OSC.Old.Util
  other-extensions:
      LambdaCase
    , OverloadedStrings
    , ViewPatterns
    , ScopedTypeVariables
    , NoRebindableSyntax
    , NoIncoherentInstances
    , NoMonomorphismRestriction
    , NoUndecidableInstances
  build-depends:

      base >3 && <5

      -- TODO: can remove when we remove .Old:
      -- Lower bound:
      --    Just a guess -- 0.5.0.2 is >5 years old
      --    I don't have a reason to think it needs a lower bound
      --    0.2 is the oldest version on Hackage
      -- Upper bound:
      --    0.9 doesn't exist yet
      -- Try: "> 0.5.0.2 && < 0.9"
    , binary


      -- Lower bound:
      --    Just a guess -- 0.9.1.8 is >5 years old
      --    I don't have a reason to think it needs a lower bound
      --    0.9 is the oldest version on Hackage
      -- Upper bound:
      --    0.11 doesn't exist yet
      -- Try: "> 0.9.1.8 && < 0.11"
    , bytestring

      -- Lower bound:
      --    Guess: 0.4 is ~5 years old
      -- Upper bound:
      --    0.6 doesn't exist yet
      -- Try: ">= 0.4 && < 0.6"
    , cereal

      -- Lower bound:
      --    Just a guess -- 1.2 is >5 years old
      --    I don't have a reason to think it needs a lower bound
      --    (Although check out 'old-time' and those changes -- but
      --    that's before 1.2)
      --    1.0 is the oldest version on Hackage
      -- Upper bound:
      --    1.7 doesn't exist yet
      -- Try: "&& < 1.7"
    , time >= 1.2

  default-language:    Haskell2010
  ghc-options:
    -O2

test-suite vivid-osc-tests
  hs-source-dirs: test
  main-is: Test.hs
  type: exitcode-stdio-1.0
  build-depends:
      base
    , vivid-osc

    , bytestring
    , cereal
    -- Try: == 0.1
    , microspec
    , time
  default-language:    Haskell2010