tidal 1.0.1 → 1.0.2
raw patch · 3 files changed
+9/−9 lines, 3 files
Files
- src/Sound/Tidal/Pattern.hs +4/−5
- src/Sound/Tidal/Stream.hs +4/−3
- tidal.cabal +1/−1
src/Sound/Tidal/Pattern.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Sound.Tidal.Pattern where@@ -276,7 +275,7 @@ -- | Like <*>, but the structure only comes from the left (<*) :: Pattern (a -> b) -> Pattern a -> Pattern b-(<*) !pf@(Pattern Digital _) !px = Pattern Digital q+(<*) pf@(Pattern Digital _) px = Pattern Digital q where q st = concatMap match $ query pf st where match (Event fWhole fPart f) =@@ -285,7 +284,7 @@ query px $ st {arc = xQuery fWhole} xQuery (Arc s _) = pure s -- for discrete events, match with the onset -(<*) !pf !px = Pattern Analog q+(<*) pf px = Pattern Analog q where q st = concatMap match $ query pf st where match (Event fWhole fPart f) =@@ -295,7 +294,7 @@ -- | Like <*>, but the structure only comes from the right (*>) :: Pattern (a -> b) -> Pattern a -> Pattern b-(*>) !pf !px@(Pattern Digital _) = Pattern Digital q+(*>) pf px@(Pattern Digital _) = Pattern Digital q where q st = concatMap match $ query px st where match (Event xWhole xPart x) =@@ -304,7 +303,7 @@ query pf $ fQuery xWhole fQuery (Arc s _) = st {arc = pure s} -- for discrete events, match with the onset -(*>) !pf !px = Pattern Analog q+(*>) pf px = Pattern Analog q where q st = concatMap match $ query px st where match (Event xWhole xPart x) =
src/Sound/Tidal/Stream.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving, FlexibleContexts, ScopedTypeVariables, BangPatterns #-}+{-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving, FlexibleContexts, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} module Sound.Tidal.Stream where@@ -151,8 +151,9 @@ -- Evaluation of pat is forced so exceptions are picked up here, before replacing the existing pattern. streamReplace :: Show a => Stream -> a -> ControlPattern -> IO ()-streamReplace s k !pat- = E.catch (do pMap <- takeMVar $ sPMapMV s+streamReplace s k pat+ = E.catch (do let x = queryArc pat (Arc 0 0)+ pMap <- seq x $ takeMVar $ sPMapMV s let playState = updatePS $ Map.lookup (show k) pMap putMVar (sPMapMV s) $ Map.insert (show k) playState pMap calcOutput s
tidal.cabal view
@@ -1,5 +1,5 @@ name: tidal-version: 1.0.1+version: 1.0.2 synopsis: Pattern language for improvised music -- description: homepage: http://tidalcycles.org/