stitch

From TidalCycles userbase
Revision as of 01:35, 10 May 2020 by Ovitus (talk | contribs) (Created page with "<source> stitch :: Pattern Bool -> Pattern a -> Pattern a -> Pattern a stitch pb a b = overlay (struct pb a) (struct (inv pb) b) </source> '''stitch''' uses the first (binar...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
stitch :: Pattern Bool -> Pattern a -> Pattern a -> Pattern a
stitch pb a b = overlay (struct pb a)  (struct (inv pb) b)

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.

Example: <source> d1 $ stitch "1(8,16)" (cc "0:64") $ sound "midi" <source>

This will use the boolean pattern to send CC0 with a value of 64 to midi.