Difference between revisions of "sew"

From TidalCycles userbase
Jump to: navigation, search
 
Line 18: Line 18:
 
d1 $ sew "t(11,16)" (n "0 .. 15" # s "future") (s "cp:3*16" # speed sine + 1.5)
 
d1 $ sew "t(11,16)" (n "0 .. 15" # s "future") (s "cp:3*16" # speed sine + 1.5)
 
</source>
 
</source>
 +
 +
See also [[stitch]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 01:56, 10 May 2020

Type: Pattern Bool -> Pattern a -> Pattern a -> Pattern a

sew Uses a pattern of boolean (true or false) values to switch between two other patterns. For example the following will play the first pattern for the first half of a cycle, and the second pattern for the other half.

d1 $ sound (sew "t f" "bd*8" "cp*8")

The above combines two patterns of strings, and passes the result to the sound function. It's also possible to sew together two control patterns, for example:

d1 $ sew "t <f t> <f [f t] t>" (n "0 .. 15" # s "future") (s "cp:3*16" # speed saw + 1.2)

You can also use Euclidean rhythm syntax in the boolean sequence:

d1 $ sew "t(11,16)" (n "0 .. 15" # s "future") (s "cp:3*16" # speed sine + 1.5)

See also stitch