swingBy

From TidalCycles userbase
Revision as of 00:01, 10 December 2018 by Yaxu (talk | contribs) (Yaxu moved page SwingBy to swingBy)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: swingBy :: Pattern Time -> Pattern Time -> Pattern a -> Pattern a

The function swingBy x n breaks each cycle into n slices, and then delays events in the second half of each slice by the amount x, which is relative to the size of the (half) slice. So if x is 0 it does nothing, 0.5 delays for half the note duration, and 1 will wrap around to doing nothing again. The end result is a shuffle or swing-like rhythm. For example:

d1 $ swingBy (1/3) 4 $ sound "hh*8"

will delay every other "hh" 1/3 of the way to the next "hh".

swing

Type: swing :: Pattern Time -> Pattern a -> Pattern a

swing is an alias for swingBy (1/3)