From TidalCycles userbase
Revision as of 21:12, 26 July 2019 by Yaxu (talk | contribs)
Jump to: navigation, search

Type: binary :: Pattern Int -> Pattern Bool

binary allows you to express a boolean pattern as a decimal number.

For example `163` in binary is `10100011`, and so these are equivalent:

d1 $ struct (binary 163) $ sound "clap:4"

d1 $ struct "t f t f f f t t" $ sound "clap:4"

That number can be patterned:

d1 $ struct (binary ("163 63")) $ sound "clap:4"


Type: binaryN :: Int -> Pattern Int -> Pattern Bool

binaryN lets you specify a number of bits for the pattern. For example 55532 gives the boolean pattern 1101100011101100:

d1 $ struct (binaryN 16 55532) $ sound "bd"


Type: ascii :: Pattern String -> Pattern Bool

Turns characters into 8-bit binary patterns, using their ASCII encoding.