packages feed

hosc-utils 0.14 → 0.15

raw patch · 2 files changed

+38/−24 lines, 2 filesdep ~hoscdep ~hosc-jsondep ~hsc3

Dependency ranges changed: hosc, hosc-json, hsc3, websockets, www-minus

Files

hosc-utils.cabal view
@@ -1,15 +1,15 @@ Name:              hosc-utils-Version:           0.14+Version:           0.15 Synopsis:          Haskell Open Sound Control Utilities Description:       hosc-utils License:           GPL Category:          Sound-Copyright:         (c) Rohan Drape and others, 2006-2013+Copyright:         (c) Rohan Drape and others, 2006-2014 Author:            Rohan Drape Maintainer:        rd@slavepianos.org Stability:         Experimental Homepage:          http://rd.slavepianos.org/?t=hosc-utils-Tested-With:       GHC == 7.6.1+Tested-With:       GHC == 7.8.2 Build-Type:        Simple Cabal-Version:     >= 1.8 Data-Files:        README@@ -17,8 +17,8 @@ executable hosc-json-cat   build-depends:   base == 4.*,                    bytestring,-                   hosc == 0.14,-                   hosc-json == 0.14,+                   hosc == 0.15.*,+                   hosc-json == 0.15.*,                    json,                    text,                    transformers,@@ -31,13 +31,13 @@   build-depends:   base == 4.*,                    bytestring,                    cgi,-                   hosc == 0.14,-                   hosc-json == 0.14,+                   hosc == 0.15.*,+                   hosc-json == 0.15.*,                    json,                    text,                    transformers,                    utf8-string,-                   www-minus+                   www-minus == 0.15.*   hs-source-dirs:  hs   main-is:         json-cgi.hs   ghc-options:     -Wall -fwarn-tabs@@ -46,8 +46,8 @@   build-depends:   base == 4.*,                    bytestring,                    haskeline,-                   hosc == 0.14,-                   hosc-json == 0.14,+                   hosc == 0.15.*,+                   hosc-json == 0.15.*,                    json,                    text,                    transformers,@@ -59,9 +59,9 @@ executable hosc-json-nrt   build-depends:   base == 4.*,                    bytestring,-                   hosc == 0.14,-                   hosc-json == 0.14,-                   hsc3 == 0.14,+                   hosc == 0.15.*,+                   hosc-json == 0.15.*,+                   hsc3 == 0.15.*,                    json,                    text,                    transformers,@@ -73,14 +73,14 @@ executable hosc-json-ws   build-depends:   base == 4.*,                    bytestring,-                   hosc == 0.14,-                   hosc-json == 0.14,+                   hosc == 0.15.*,+                   hosc-json == 0.15.*,                    bytestring,                    json,                    text,                    transformers,                    utf8-string,-                   websockets+                   websockets >= 0.8.2.4   hs-source-dirs:  hs   main-is:         json-ws.hs   ghc-options:     -Wall -fwarn-tabs
hs/json-ws.hs view
@@ -1,19 +1,22 @@ import Control.Monad {- base -} import qualified Network.WebSockets as W {- websockets -} -import U+import qualified U -go :: WithT -> W.WebSockets W.Hybi00 ()-go withT = W.receiveData >>= proc_t withT+go :: U.WithT -> W.Connection -> IO ()+go withT c = do+  d <- W.receiveData c+  print d+  U.proc_lb withT d -json_ws :: WithT -> W.Request -> W.WebSockets W.Hybi00 ()+json_ws :: U.WithT -> W.ServerApp json_ws withT rq = do-    W.acceptRequest rq-    forever (go withT)+  c <- W.acceptRequest rq+  forever (go withT c)  main :: IO () main = do-  Opt t h w <- opt_arg+  U.Opt t h w <- U.opt_arg   W.runServer h w (json_ws t)  {-@@ -38,8 +41,19 @@     ;k1 = control KR "k1" 0     ;k2 = control KR "k2" 0.1     ;k3 = control KR "k3" 0}-in audition (out k3 (sinOsc AR k0 k1 * k2))+in draw (out k3 (sinOsc AR k0 k1 * k2))  withSC3 (send (n_set (-1) [("k0",660)])) withSC3 (send (n_set (-1) [("k2",0.01)]))++json-ws.04++withSC3 (send (dumpOSC TextPrinter))++let {c1 = control KR "c1" 60+    ;c2 = control KR "c2" 0+    ;c3 = control KR "c3" (-12)+    ;c4 = control KR "c4" 0}+in audition (out c4 (sinOsc AR (midiCPS c1) c2 * dbAmp c3))+ -}