Difference between revisions of "Functions for shifting time"
From TidalCycles userbase
Line 3: | Line 3: | ||
= <~ = | = <~ = | ||
− | [[Type signature|Type]]: <syntaxhighlight lang="haskell" inline> <~) :: Pattern Time -> Pattern a -> Pattern a </syntaxhighlight> | + | [[Type signature|Type]]: <syntaxhighlight lang="haskell" inline> (<~) :: Pattern Time -> Pattern a -> Pattern a </syntaxhighlight> |
'''<~''' is an operator that shifts a pattern backward in time, by the given amount. | '''<~''' is an operator that shifts a pattern backward in time, by the given amount. |
Latest revision as of 19:40, 18 April 2019
The title of this page should be "<~, ~> and friends", but unfortunately this software doesn't allow titles with < or > in!
<~
Type: (<~) :: Pattern Time -> Pattern a -> Pattern a
<~ is an operator that shifts a pattern backward in time, by the given amount.
For example, to shift a pattern by a quarter of a cycle, every fourth cycle:
d1 $ every 4 (0.25 <~) $ sound ("arpy arpy:1 arpy:2 arpy:3")
Or to alternate between different shifts:
d1 $ "<0 0.5 0.125>" <~ sound ("arpy arpy:1 arpy:2 arpy:3")
~>
Type: (~>) :: Pattern Time -> Pattern a -> Pattern a
~> Is the same as above, but shifts a pattern forwards in time. For example:
d1 $ every 4 (0.25 ~>) $ sound ("bd ~ sn:1 [mt ht]")