Skip to content
Newer
Older
100644 23 lines (17 sloc) 587 Bytes
d7a65ef @yaxu adds
authored
1 import Sound.OpenSoundControl
2 import Network.Netclock.Client
bd0b2a8 fiddles
alex authored
3 import Control.Concurrent (threadDelay, forkIO)
d7a65ef @yaxu adds
authored
4
5 tpb = 4
6 address = "127.0.0.1"
7
bd0b2a8 fiddles
alex authored
8 adeip = "10.0.0.3"
d7a65ef @yaxu adds
authored
9 adeport = 1777
10
bd0b2a8 fiddles
alex authored
11 main = do putStrLn "start"
12 clocked "adesync" address address tpb ot
d7a65ef @yaxu adds
authored
13
14 ot :: BpsChange -> Int -> IO ()
15 ot change tick = do putStrLn "tick"
16 ade <- openUDP adeip adeport
17 let m = Message "/PureEvents/Beat" [Int tick]
bd0b2a8 fiddles
alex authored
18 threadDelay $ 1000000 `div` 18
d7a65ef @yaxu adds
authored
19 send ade m
20 close ade
21 return ()
22
Something went wrong with that request. Please try again.