Functions for shifting time

From TidalCycles userbase
Jump to: navigation, search

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 earlier 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 later in time. For example:

d1 $ every 4 (0.25 ~>) $ sound ("bd ~ sn:1 [mt ht]")