packages feed

tidal 0.9.8 → 0.9.9

raw patch · 4 files changed

+20/−11 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

Sound/Tidal/Parse.hs view
@@ -11,7 +11,7 @@ import Data.Colour.Names import Data.Colour.SRGB import GHC.Exts( IsString(..) )-import Data.Monoid+-- import Data.Monoid -- import qualified Data.Semigroup as Sem import Control.Exception as E import Control.Applicative ((<$>), (<*>), pure)@@ -21,9 +21,11 @@ import Sound.Tidal.Pattern import Sound.Tidal.Time (Arc, Time) +{- #ifdef TIDAL_SEMIGROUP import qualified Data.Semigroup as Sem #endif+-}  -- | AST representation of patterns @@ -44,6 +46,7 @@             | TPat_pE (TPat Int) (TPat Int) (TPat Integer) (TPat a)             deriving (Show) +{- #ifdef TIDAL_SEMIGROUP instance Sem.Semigroup (TPat a) where   (<>) = TPat_Overlay@@ -56,6 +59,7 @@    mempty = TPat_Silence    mappend = TPat_Overlay #endif+-}  toPat :: Enumerable a => TPat a -> Pattern a toPat = \case@@ -260,7 +264,7 @@ pPolyIn :: Parseable a => Parser (TPat a) -> Parser (TPat a) pPolyIn f = do ps <- brackets (pSequence f `sepBy` symbol ",")                spaces-               pMult $ mconcat ps+               pMult $ foldr TPat_Overlay TPat_Silence ps  pPolyOut :: Parseable a => Parser (TPat a) -> Parser (TPat a) pPolyOut f = do ps <- braces (pSequenceN f `sepBy` symbol ",")@@ -270,11 +274,11 @@                            i <- integer <?> "integer"                            return $ Just (fromIntegral i)                         <|> return Nothing-                pMult $ mconcat $ scale base ps+                pMult $ foldr TPat_Overlay TPat_Silence $ scale base ps              <|>              do ps <- angles (pSequenceN f `sepBy` symbol ",")                 spaces-                pMult $ mconcat $ scale (Just 1) ps+                pMult $ foldr TPat_Overlay TPat_Silence $ scale (Just 1) ps   where scale _ [] = []         scale base (ps@((n,_):_)) = map (\(n',p) -> TPat_Density (TPat_Atom $ fromIntegral (fromMaybe n base)/ fromIntegral n') p) ps 
Sound/Tidal/Pattern.hs view
@@ -4,7 +4,7 @@ module Sound.Tidal.Pattern where  import Control.Applicative-import Data.Monoid+-- import Data.Monoid import Data.Fixed import Data.List import Data.Maybe@@ -24,9 +24,11 @@ import Text.Show.Functions () import qualified Control.Exception as E +{- #ifdef TIDAL_SEMIGROUP import qualified Data.Semigroup as Sem #endif+-}  -- | The pattern datatype, a function from a time @Arc@ to @Event@ -- values. For discrete patterns, this returns the events which are@@ -165,6 +167,7 @@                  (xs (s',e'))                 ) +{- #ifdef TIDAL_SEMIGROUP -- | @mappend@ a.k.a. @<>@ is a synonym for @overlay@. instance Sem.Semigroup (Pattern a) where@@ -180,6 +183,7 @@   mempty = silence   mappend = overlay #endif+-}  instance Monad Pattern where   return = pure
Sound/Tidal/Transition.hs view
@@ -39,10 +39,11 @@ superwash _ _ _ _ _ _ [] = silence superwash _ _ _ _ _ _ (p:[]) = p superwash fout fin delay durin durout now (p:p':_) =-   (playWhen (< (now + delay)) p') <>-   (playWhen (between (now + delay) (now + delay + durin)) $ fout p') <>-   (playWhen (between (now + delay + durin) (now + delay + durin + durout)) $ fin p) <>-   (playWhen (>= (now + delay + durin + durout)) $ p)+   stack [(playWhen (< (now + delay)) p'),+          (playWhen (between (now + delay) (now + delay + durin)) $ fout p'),+          (playWhen (between (now + delay + durin) (now + delay + durin + durout)) $ fin p),+          (playWhen (>= (now + delay + durin + durout)) $ p)+         ]  where    between lo hi x = (x >= lo) && (x < hi) 
tidal.cabal view
@@ -1,5 +1,5 @@ name:                tidal-version:             0.9.8+version:             0.9.9 synopsis:            Pattern language for improvised music -- description: homepage:            http://tidalcycles.org/@@ -12,7 +12,7 @@ category:            Sound build-type:          Simple cabal-version:       >=1.10-tested-with:         GHC == 7.10.3, GHC == 8.0.1+tested-with:         GHC == 7.10.3, GHC == 8.0.1, GHC == 8.4.1  Extra-source-files: README.md CHANGELOG.md tidal.el doc/tidal.md