Skip to content

Commit

Permalink
bug fix in _euclidInv
Browse files Browse the repository at this point in the history
  • Loading branch information
dktr0 committed Feb 13, 2019
1 parent a0f1c8e commit e54550f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Sound/Tidal/UI.hs
Expand Up @@ -22,7 +22,7 @@ import Sound.Tidal.Core
import qualified Sound.Tidal.Params as P
import Sound.Tidal.Pattern
import Sound.Tidal.Utils

------------------------------------------------------------------------
-- * UI

Expand Down Expand Up @@ -113,9 +113,9 @@ perlin = perlinWith (sig fromRational)
{- `perlin2With` is Perlin noise with a 2-dimensional input. This can be
useful for more control over how the randomness repeats (or doesn't).
@
d1
$ s "[supersaw:-12*32]"
# lpf (rangex 60 5000 $ perlin2With (cosine*2) (sine*2))
d1
$ s "[supersaw:-12*32]"
# lpf (rangex 60 5000 $ perlin2With (cosine*2) (sine*2))
# lpq 0.3
@
will generate a smooth random cutoff pattern that repeats every cycle without
Expand Down Expand Up @@ -745,7 +745,7 @@ euclidInv = tParam2 _euclidInv

_euclidInv :: Int -> Int -> Pattern a -> Pattern a
--_euclidInv n k p = flip const <$> filterValues (== False) (fastFromList $ bjorklund (n,k)) <*> p
_euclidInv n k a = fastcat $ fmap (bool silence a) $ bjorklund (n,k)
_euclidInv n k a = fastcat $ fmap (bool a silence) $ bjorklund (n,k)

index :: Real b => b -> Pattern b -> Pattern c -> Pattern c
index sz indexpat pat =
Expand Down Expand Up @@ -1652,8 +1652,8 @@ contrastRange
-> ControlPattern
-> Pattern a
contrastRange = contrastBy f
where f (VI s, VI e) (VI v) = v >= s && v <= e
f (VF s, VF e) (VF v) = v >= s && v <= e
where f (VI s, VI e) (VI v) = v >= s && v <= e
f (VF s, VF e) (VF v) = v >= s && v <= e
f (VS s, VS e) (VS v) = v == s && v == e
f _ _ = False

Expand Down

0 comments on commit e54550f

Please sign in to comment.