From 2ab1d4b9b7162a1ef498746ff30765613eb2ab50 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 21 Apr 2019 23:01:09 +0100 Subject: [PATCH] simplify interface (preserving dos line endings for now) --- src/Sound/Tidal/EspGrid.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Sound/Tidal/EspGrid.hs b/src/Sound/Tidal/EspGrid.hs index 1cfea9fbb..bb7cd075f 100644 --- a/src/Sound/Tidal/EspGrid.hs +++ b/src/Sound/Tidal/EspGrid.hs @@ -1,6 +1,6 @@ {-# 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) @@ -8,6 +8,7 @@ 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 @@ -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