Skip to content

Commit

Permalink
simplify interface (preserving dos line endings for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Apr 21, 2019
1 parent ff58c58 commit 2ab1d4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Sound/Tidal/EspGrid.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{-# LANGUAGE ScopedTypeVariables #-}

module Sound.Tidal.EspGrid (tidalEspGridLink,cpsEsp) where
module Sound.Tidal.EspGrid (tidalEspGridLink,cpsEsp,espgrid) where

import Control.Concurrent.MVar
import Control.Concurrent (forkIO,threadDelay)
import Control.Monad (forever)
import Control.Exception
import Sound.OSC.FD
import Sound.Tidal.Tempo
import Sound.Tidal.Stream (Stream, sTempoMV)

parseEspTempo :: [Datum] -> Maybe (Tempo -> Tempo)
parseEspTempo d = do
Expand All @@ -32,7 +33,11 @@ changeTempo t (Packet_Message msg) =
changeTempo _ _ = putStrLn "Serious error: Can only process Packet_Message"

tidalEspGridLink :: MVar Tempo -> IO ()
tidalEspGridLink t = do
tidalEspGridLink _ = putStrLn "Function no longer supported, please use 'espgrid tidal' to connect to ESPgrid instead."

espgrid :: Stream -> IO ()
espgrid st = do
let t = sTempoMV st
socket <- openUDP "127.0.0.1" 5510
_ <- forkIO $ forever $ do
(do
Expand Down

0 comments on commit 2ab1d4b

Please sign in to comment.