packages feed

tidal 1.6.0 → 1.6.1

raw patch · 5 files changed

+52/−16 lines, 5 filesdep ~random

Dependency ranges changed: random

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # TidalCycles log of changes +## 1.6.1 - We are not DJs+	* Patternise first parameter of chunk @lwlsn+	* Patternise fit parameter @bgold-cosmos+	* Increase upper bounds of random @yaxu+	* Switch travis to ubuntu bionic @yaxu  ## 1.6.0 - Keep live coding live 	* Rollback to previous pattern on parse error @jwaldmann
src/Sound/Tidal/UI.hs view
@@ -968,10 +968,13 @@ The above fits three samples into the pattern, i.e. for the first cycle this will be `"bd"`, `"sn"` and `"arpy"`, giving the result `"bd [~ sn] arpy sn"` (note that we start counting at zero, so that `0` picks the first value). The following cycle the *next* three values in the list will be picked, i.e. `"arpy:1"`, `"casio"` and `"bd"`, giving the pattern `"arpy:1 [~ casio] bd casio"` (note that the list wraps round here).  -}-fit :: Int -> [a] -> Pattern Int -> Pattern a-fit perCycle xs p = (xs !!!) <$> (p {query = map (\e -> fmap (+ pos e) e) . query p})+_fit :: Int -> [a] -> Pattern Int -> Pattern a+_fit perCycle xs p = (xs !!!) <$> (p {query = map (\e -> fmap (+ pos e) e) . query p})   where pos e = perCycle * floor (start $ part e) +fit :: Pattern Int -> [a] -> Pattern Int -> Pattern a+fit pi xs p = (tParam ( \i x@(xs,p) -> _fit i xs p )) pi (xs,p)+ permstep :: RealFrac b => Int -> [a] -> Pattern b -> Pattern a permstep nSteps things p = unwrap $ (\n -> fastFromList $ concatMap (\x -> replicate (fst x) (snd x)) $ zip (ps !! floor (n * fromIntegral (length ps - 1))) things) <$> _segment 1 p       where ps = permsort (length things) nSteps@@ -1186,7 +1189,7 @@  -} fit' :: Pattern Time -> Int -> Pattern Int -> Pattern Int -> Pattern a -> Pattern a-fit' cyc n from to p = squeezeJoin $ fit n mapMasks to+fit' cyc n from to p = squeezeJoin $ _fit n mapMasks to   where mapMasks = [stretch $ mask (const True <$> filterValues (== i) from') p'                      | i <- [0..n-1]]         p' = density cyc p@@ -1198,9 +1201,15 @@ d1 $ chunk 4 (density 4) $ sound "cp sn arpy [mt lt]" @ -}-chunk :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b-chunk n f p = cat [withinArc (Arc (i % fromIntegral n) ((i+1) % fromIntegral n)) f p | i <- [0 .. fromIntegral n - 1]]+_chunk :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b+_chunk n f p = cat [withinArc (Arc (i % fromIntegral n) ((i+1) % fromIntegral n)) f p | i <- [0 .. fromIntegral n - 1]] ++chunk :: Pattern Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b+chunk npat f p  = innerJoin $ (\n -> _chunk n f p) <$> npat+++ {- chunk n f p = do i <- _slow (toRational n) $ run (fromIntegral n)                  within (i%(fromIntegral n),(i+)1%(fromIntegral n)) f p@@ -1208,17 +1217,28 @@  -- deprecated (renamed to chunk) runWith :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b-runWith = chunk+runWith = _chunk  {-| @chunk'@ works much the same as `chunk`, but runs from right to left. -}-chunk' :: Integral a => a -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b-chunk' n f p = do i <- _slow (toRational n) $ rev $ run (fromIntegral n)-                  withinArc (Arc (i % fromIntegral n) ((i+)1 % fromIntegral n)) f p+-- this was throwing a parse error when I ran it in tidal whenever I changed the function name..+_chunk' :: Integral a => a -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b+_chunk' n f p = do i <- _slow (toRational n) $ rev $ run (fromIntegral n)+                   withinArc (Arc (i % fromIntegral n) ((i+)1 % fromIntegral n)) f p +chunk' :: Integral a1 => Pattern a1 -> (Pattern a2 -> Pattern a2) -> Pattern a2 -> Pattern a2+chunk' npat f p = innerJoin $ (\n -> _chunk' n f p) <$> npat++ -- deprecated (renamed to chunk')-runWith' :: Integral a => a -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b-runWith' = chunk'+-- runWith' :: Integral a => a -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b+-- runWith' = chunk'++--++++  inside :: Pattern Time -> (Pattern a1 -> Pattern a) -> Pattern a1 -> Pattern a inside n f p = density n $ f (slow n p)
src/Sound/Tidal/Version.hs view
@@ -1,4 +1,4 @@ module Sound.Tidal.Version where  tidal_version :: String-tidal_version = "1.6.0"+tidal_version = "1.6.1"
test/Sound/Tidal/UITest.hs view
@@ -277,3 +277,14 @@         compareP (Arc 0 4)           (arpeggiate $ "[0,0]*2")           ("0 0 0 0" :: Pattern Int)+++      describe "chunk" $ do+        it "can chunk a rev pattern" $ do+          compareP (Arc 0 4)+            (chunk 2 (rev) $  ("a b c d" :: Pattern String))+            (slow 2 $ "d c c d a b b a" :: Pattern String)+        it "can chunk a fast pattern" $ do+          compareP (Arc 0 4)+            (chunk 2 (fast 2) $ "a b" :: Pattern String)+            (slow 2 $ "a b b _ a _ a b" :: Pattern String)
tidal.cabal view
@@ -1,5 +1,5 @@ name:                tidal-version:             1.6.0+version:             1.6.1 synopsis:            Pattern language for improvised music -- description: homepage:            http://tidalcycles.org/@@ -8,11 +8,11 @@ author:              Alex McLean maintainer:          Alex McLean <alex@slab.org>, Mike Hodnick <mike.hodnick@gmail.com> Stability:           Experimental-Copyright:           (c) Tidal contributors, 2019+Copyright:           (c) Alex McLean and other contributors, 2020 category:            Sound build-type:          Simple cabal-version:       >=1.10-tested-with:         GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.3+tested-with:         GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1 data-files:          BootTidal.hs  Extra-source-files: README.md CHANGELOG.md tidal.el@@ -63,7 +63,7 @@     , clock < 0.9     , deepseq >= 1.1.0.0     , primitive < 0.8-    , random < 1.2+    , random < 1.3     -- , serialport     -- , hashable