tidal 1.0.3 → 1.0.4
raw patch · 5 files changed
+15/−14 lines, 5 filesdep ~hosc
Dependency ranges changed: hosc
Files
- README.md +2/−0
- src/Sound/Tidal/EspGrid.hs +2/−2
- src/Sound/Tidal/Stream.hs +1/−1
- src/Sound/Tidal/Tempo.hs +8/−9
- tidal.cabal +2/−2
README.md view
@@ -7,6 +7,8 @@ For documentation, mailing list and more info see here: https://tidalcycles.org/ +<a href='https://ko-fi.com/G2G6LHVU' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>+ (c) Alex McLean and contributors, 2018 Distributed under the terms of the GNU Public license version 3 (or
src/Sound/Tidal/EspGrid.hs view
@@ -34,7 +34,7 @@ tidalEspGridLink t = do socket <- openUDP "127.0.0.1" 5510 _ <- forkIO $ forever $ do - _ <- sendOSC socket $ Message "/esp/tempo/q" [] + _ <- sendMessage socket $ Message "/esp/tempo/q" [] response <- waitAddress socket "/esp/tempo/r" changeTempo t response threadDelay 200000 @@ -43,4 +43,4 @@ cpsEsp :: Real t => t -> IO () cpsEsp t = do socket <- openUDP "127.0.0.1" 5510 - sendOSC socket $ Message "/esp/beat/tempo" [float (t*60)] + sendMessage socket $ Message "/esp/beat/tempo" [float (t*60)]
src/Sound/Tidal/Stream.hs view
@@ -121,7 +121,7 @@ return () send :: O.Transport t => Double -> t -> (Double, O.Message) -> IO ()-send latency u (time, m) = O.sendOSC u $ O.Bundle (time + latency) [m]+send latency u (time, m) = O.sendBundle u $ O.Bundle (time + latency) [m] sched :: T.Tempo -> Rational -> Double sched tempo c = ((fromRational $ c - (T.atCycle tempo)) / T.cps tempo) + (T.atTime tempo)
src/Sound/Tidal/Tempo.hs view
@@ -121,7 +121,7 @@ remote = N.SockAddrInet (fromIntegral port) (a) t = defaultTempo s local remote -- Send to clock port from same port that's listened to- O.sendTo local (O.Message "/hello" []) remote+ O.sendTo local (O.p_message "/hello" []) remote -- Make tempo mvar tempoMV <- newMVar t -- Listen to tempo changes@@ -129,13 +129,12 @@ return (tempoMV, tempoChild) sendTempo :: Tempo -> IO ()-sendTempo tempo = O.sendTo (localUDP tempo) b (remoteAddr tempo)- where b = O.Bundle (atTime tempo) [O.Message "/transmit/cps/cycle" [O.Float $ fromRational $ atCycle tempo,- O.Float $ realToFrac $ cps tempo,- O.Int32 $ if (paused tempo) then 1 else 0- ]- ]-+sendTempo tempo = O.sendTo (localUDP tempo) (O.p_bundle (atTime tempo) [m]) (remoteAddr tempo)+ where m = O.Message "/transmit/cps/cycle" [O.Float $ fromRational $ atCycle tempo,+ O.Float $ realToFrac $ cps tempo,+ O.Int32 $ if (paused tempo) then 1 else 0+ ]+ listenTempo :: O.UDP -> (MVar Tempo) -> IO () listenTempo udp tempoMV = forever $ do pkt <- O.recvPacket udp act Nothing pkt@@ -175,7 +174,7 @@ | isPrefixOf "/transmit" path = do let path' = drop 9 path msg = O.Message path' params- mapM_ (O.sendTo udp $ O.Bundle ts [msg]) cs+ mapM_ (O.sendTo udp $ O.p_bundle ts [msg]) cs return cs act _ _ _ cs pkt = do putStrLn $ "Unknown packet: " ++ show pkt return cs
tidal.cabal view
@@ -1,5 +1,5 @@ name: tidal-version: 1.0.3+version: 1.0.4 synopsis: Pattern language for improvised music -- description: homepage: http://tidalcycles.org/@@ -52,7 +52,7 @@ , containers , hashable , colour- , hosc == 0.16+ , hosc == 0.17 , text , random , time