Randomness

From TidalCycles userbase
Revision as of 15:33, 17 November 2018 by Tomo-makes (talk | contribs) (added language bar)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Other languages:
British English • ‎English • ‎français • ‎中文(繁體)‎ • ‎日本語

Randomness can help us quickly introduce character and variation into our patterns


sometimes works a bit like every, but instead of happening after a set period, changes have a random chance of appearing

d1 $ sometimes (# speed "2") $ sound "drum*8"

often works like sometimes but happens more often!

d1 $ often (# speed "2") $ sound "drum*8"

irand generates a random integer up to the number specified. e.g. to play a random sample:

d1 $ sound "arpy(3,8)" # n (irand 16)

rand generates a random decimal between 0 and 1

d1 $ sound "tink*16" # gain rand

You can use degradeBy to remove random elements. The number indicates how likely a sample is to play

d1 $ degradeBy 0.2 $ sound "tink*16"

(degrade on its own is the same as degradeBy 0.5)

Or, you can use ? to remove sounds with a 50% likelihood

d1 $ sound "bd sn:2? bd sn?"