Difference between revisions of "stitch"

From TidalCycles userbase
Jump to: navigation, search
Line 5: Line 5:
 
For example, the following will use a boolean pattern to send CC0 with a value of 64 to midi.
 
For example, the following will use a boolean pattern to send CC0 with a value of 64 to midi.
 
<source>d1 $ stitch "1(7,16)" (cc "0:64") $ sound "midi"</source>
 
<source>d1 $ stitch "1(7,16)" (cc "0:64") $ sound "midi"</source>
 +
 +
See also [[sew]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 01:55, 10 May 2020

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

stitch uses the first (binary) pattern to switch between the following two patterns. The resulting structure comes from the binary pattern, not the source patterns. This differs from sew where the resulting structure comes from the source patterns.

For example, the following will use a boolean pattern to send CC0 with a value of 64 to midi.

d1 $ stitch "1(7,16)" (cc "0:64") $ sound "midi"

See also sew