Skip to content

Commit

Permalink
Make repeatCycles default as slow (one new cycle per old cycle), and …
Browse files Browse the repository at this point in the history
…add fastRepeatCycles version
  • Loading branch information
yaxu committed Nov 13, 2018
1 parent 297853b commit 5994d50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Sound/Tidal/Core.hs
Expand Up @@ -329,7 +329,10 @@ compressTo :: Arc -> Pattern a -> Pattern a
compressTo = __compressTo

repeatCycles :: Int -> Pattern a -> Pattern a
repeatCycles n p = fastcat (replicate n p)
repeatCycles n p = cat (replicate n p)

fastRepeatCycles :: Int -> Pattern a -> Pattern a
fastRepeatCycles n p = cat (replicate n p)

-- | * Higher order functions

Expand Down
3 changes: 2 additions & 1 deletion src/Sound/Tidal/UI.hs
Expand Up @@ -143,7 +143,7 @@ _unDegradeBy :: Double -> Pattern a -> Pattern a
_unDegradeBy x p = fmap fst $ filterValues ((<= x) . snd) $ (,) <$> p <*> rand

degradeOverBy :: Int -> Pattern Double -> Pattern a -> Pattern a
degradeOverBy i tx p = unwrap $ (\x -> (fmap fst $ filterValues ((> x) . snd) $ (,) <$> p <*> repeatCycles i rand)) <$> (slow (fromIntegral i) tx)
degradeOverBy i tx p = unwrap $ (\x -> (fmap fst $ filterValues ((> x) . snd) $ (,) <$> p <*> fastRepeatCycles i rand)) <$> (slow (fromIntegral i) tx)


{- | Use @sometimesBy@ to apply a given function "sometimes". For example, the
Expand Down Expand Up @@ -1418,3 +1418,4 @@ tabby n p p' = stack [maskedWarp,
warpP = thread warp p
maskedWeft = mask (every 2 rev $ _fast ((n)%2) $ fastCat [silence, pure True]) weftP
maskedWarp = mask (every 2 rev $ _fast ((n)%2) $ fastCat [pure True, silence]) warpP

0 comments on commit 5994d50

Please sign in to comment.