Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

nekobee acid synth

  • Loading branch information...
commit 1e567bfdd13fec5eb6e51f25a384a9e3a992ab2f 1 parent 447d7d5
@yaxu authored
Showing with 36 additions and 0 deletions.
  1. +36 −0 Acid.hs
View
36 Acid.hs
@@ -0,0 +1,36 @@
+{-# LANGUAGE NoMonomorphismRestriction #-}
+
+module Acid where
+
+import Stream
+import Pattern
+import Parse
+import Sound.OpenSoundControl
+import qualified Data.Map as Map
+import Control.Concurrent.MVar
+import Control.Concurrent
+import Network.Netclock.Client
+
+dit :: OscShape
+dit = OscShape {path = "/point",
+ params = [ S "port" Nothing,
+ F "angle" (Just 0),
+ F "radius" (Just 0)
+ ],
+ timestamp = False
+ }
+
+
+ditstream name = stream "127.0.0.1" "127.0.0.1" name "127.0.0.1" 6014 dit
+
+port = makeS dit "port"
+angle = makeF dit "angle"
+radius = makeF dit "radius"
+
+sendSam = do forkIO $ clocked "sam" "127.0.0.1" "127.0.0.1" 1 samTick
+ return ()
+
+samTick x ticks = do dit <- openUDP "127.0.0.1" 6014
+ send dit $ Message "/sam" []
+ close dit
+ putStrLn "Sam."
Please sign in to comment.
Something went wrong with that request. Please try again.