diff --git a/src/Sound/Tidal/Stream.hs b/src/Sound/Tidal/Stream.hs index c1f52e161..593414072 100644 --- a/src/Sound/Tidal/Stream.hs +++ b/src/Sound/Tidal/Stream.hs @@ -69,9 +69,9 @@ dirtTarget = OSCTarget {oName = "Dirt", oAddress = "127.0.0.1", oPort = 7771, oPath = "/play", - oShape = Just [("sec", Nothing), - ("usec", Nothing), - ("cps", Nothing), + oShape = Just [("sec", Just $ VI 0), + ("usec", Just $ VI 0), + ("cps", Just $ VF 0), ("s", Nothing), ("offset", Just $ VF 0), ("begin", Just $ VF 0), @@ -196,10 +196,10 @@ send :: O.Transport t => OSCTarget -> Double -> t -> (Double, O.Message) -> IO ( send target latency u (time, m) | oTimestamp target == BundleStamp = O.sendBundle u $ O.Bundle (time + latency) [m] | oTimestamp target == MessageStamp = O.sendMessage u m - | oTimestamp target == NoStamp = do _ <- forkIO $ do now <- O.time - threadDelay $ floor $ ((time+latency) - now) * 1000000 - O.sendMessage u m - return () + | otherwise = do _ <- forkIO $ do now <- O.time + threadDelay $ floor $ ((time+latency) - now) * 1000000 + O.sendMessage u m + return () sched :: T.Tempo -> Rational -> Double sched tempo c = ((fromRational $ c - (T.atCycle tempo)) / T.cps tempo) + (T.atTime tempo)