Skip to content
Browse files

twiddles for visualisaiton

  • Loading branch information...
1 parent 1cb7931 commit 0608ff19304789f555bdbb016d4513911a91a44b alex committed Dec 19, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −0 Dirt.hs
  2. +0 −1 Parse.hs
  3. +8 −0 Stream.hs
View
1 Dirt.hs
@@ -8,6 +8,7 @@ import Parse
import Sound.OpenSoundControl
import qualified Data.Map as Map
import Control.Concurrent.MVar
+import Visual
dirt :: OscShape
dirt = OscShape {path = "/play",
View
1 Parse.hs
@@ -10,7 +10,6 @@ import Data.Ratio
import Data.Colour
import Data.Colour.Names
import Data.Colour.SRGB
-
import GHC.Exts( IsString(..) )
class (Pattern p) => ParseablePattern p where
View
8 Stream.hs
@@ -3,6 +3,7 @@
module Stream where
import Data.Maybe
+import Sound.OSC.FD
import Sound.OpenSoundControl
import Control.Applicative
import Network.Netclock.Client
@@ -104,6 +105,13 @@ stream client server name address port shape
return $ \p -> do swapMVar patternM p
return ()
+streamcallback :: (OscSequence -> IO ()) String -> String -> String -> String -> Int -> OscShape -> IO (OscSequence -> IO ())
+streamcallback callback client server name address port shape
+ = do f <- stream client server name address port shape
+ let f' p = do callback p
+ f p
+ return f'
+
onTick :: UDP -> OscShape -> MVar (OscSequence) -> BpsChange -> Int -> IO ()
onTick s shape patternM change ticks
= do p <- readMVar patternM

0 comments on commit 0608ff1

Please sign in to comment.
Something went wrong with that request. Please try again.