Skip to content

Commit

Permalink
fix tidal-parse
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Apr 10, 2024
1 parent 17d72dc commit ade3be3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Sound/Tidal/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2438,19 +2438,19 @@ steppify s cs = fastcat $ map f cs
stepifies :: [(String, String)] -> Pattern String
stepifies = stack . map (uncurry steppify)

{- | like `step`, but allows you to specify an array of strings to use for @0,1,2...@
{- | like `stepify`, but allows you to specify an array of strings to use for @0,1,2...@
For example,
> d1 $ s (step' ["superpiano","supermandolin"] "0 1 000 1")
> d1 $ s (stepify' ["superpiano","supermandolin"] "0 1 000 1")
> # sustain 4 # n 0
is equivalent to
> d1 $ s "superpiano ~ supermandolin ~ superpiano!3 ~ supermandolin"
> # sustain 4 # n 0
-}
step' :: [String] -> String -> Pattern String
step' ss cs = fastcat $ map f cs
stepify' :: [String] -> String -> Pattern String
stepify' ss cs = fastcat $ map f cs
where f c | c == 'x' = pure $ head ss
| isDigit c = pure $ ss !! digitToInt c
| otherwise = silence
Expand Down

0 comments on commit ade3be3

Please sign in to comment.