Skip to content

Instantly share code, notes, and snippets.

@tuchella
Created August 30, 2019 10:13
Show Gist options
  • Save tuchella/79035b10e607ccf0687f60bab696de9a to your computer and use it in GitHub Desktop.
Save tuchella/79035b10e607ccf0687f60bab696de9a to your computer and use it in GitHub Desktop.
Tidal function list as json/yaml
[
{
"name": "accelerate",
"help": "`accelerate` turns a number pattern into a control pattern that speeds up (or slows down) samples while they play.",
"cmd": "accelerate :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/accelerate"
],
"type": "ctl"
},
{
"name": "attack",
"help": "`attack` turns a number pattern into a control pattern that changes the \"fade in\" time of a sample.",
"cmd": "attack :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/attack"
],
"type": "ctl"
},
{
"name": "bandf",
"help": "`bandf` turns a number pattern into a control pattern that sets the center frequency of a band pass filter.",
"cmd": "bandf :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/bandf"
],
"type": "ctl"
},
{
"name": "bandq",
"help": "`bandq` turns a number pattern into a control pattern that sets the q-factor of the band-pass filter.",
"cmd": "bandq :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/bandq"
],
"type": "ctl"
},
{
"name": "begin",
"help": "`begin` turns a number pattern into a control pattern that changes the start position of a sample.",
"cmd": "begin :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/begin"
],
"type": "ctl"
},
{
"name": "bpf",
"help": "`bpf` is a shortcut for `bandf`.",
"links": [
"https://tidalcycles.org/index.php/bpf"
],
"type": "ctl"
},
{
"name": "bpq",
"help": "`bpq` is a shortcut for `bandq`.",
"links": [
"https://tidalcycles.org/index.php/bpq"
],
"type": "ctl"
},
{
"name": "coarse",
"help": "`coarse` turns a number pattern into a control pattern that lowers the sample rate of a sample.",
"cmd": "coarse :: Pattern Int -> ControlPattern",
"paramTypes": [
"Pattern Int"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/coarse"
],
"type": "ctl"
},
{
"name": "crush",
"help": "`crush` turns a number pattern into a control pattern that creates a bit-crushing effect.",
"cmd": "crush :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/crush"
],
"type": "ctl"
},
{
"name": "cut",
"help": "In the style of classic drum-machines, `cut` will stop a playing sample as soon as another sample with the same cutgroup is played.",
"cmd": "cut :: Pattern Int -> ControlPattern",
"paramTypes": [
"Pattern Int"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/cut"
],
"type": "ctl"
},
{
"name": "cutoff",
"help": "`cutoff` turns a number pattern into a control pattern that sets the cutoff frequency of a low pass filter.",
"cmd": "cutoff :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/cutoff"
],
"type": "ctl"
},
{
"name": "delay",
"help": "`delay` turns a number pattern into a control pattern that changes the level of the initial delay signal.",
"cmd": "delay :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/delay"
],
"type": "ctl"
},
{
"name": "delayfeedback",
"help": "`delayfeedback` turns a number pattern into a control pattern that changes the feedback level of the delay effect.",
"cmd": "delayfeedback :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/delayfeedback"
],
"type": "ctl"
},
{
"name": "delaytime",
"help": "`delaytime` turns a number pattern into a control pattern that changes the length of the delay effect. The `delay`",
"cmd": "delaytime :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/delaytime"
],
"type": "ctl"
},
{
"name": "end",
"help": "`end` turns a number pattern into a control pattern that changes the playback end position of a sample.",
"cmd": "end :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/end"
],
"type": "ctl"
},
{
"name": "gain",
"help": "`gain` turns a number pattern into a control pattern that specifies volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder.",
"cmd": "gain :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/gain"
],
"type": "ctl"
},
{
"name": "hcutoff",
"help": "`hcutoff` turns a number pattern into a control pattern that sets the cutoff frequency of a high pass filter.",
"cmd": "hcutoff :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/hcutoff"
],
"type": "ctl"
},
{
"name": "hpf",
"help": "`hpf` turns a number pattern into a control pattern that sets the cutoff frequency of a high pass filter.",
"cmd": "hpf :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/hpf"
],
"type": "ctl"
},
{
"name": "hpq",
"help": "`hpq` turns a number pattern into a control pattern that sets the resonance of a high pass filter.",
"cmd": "hpq :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/hpq"
],
"type": "ctl"
},
{
"name": "hresonance",
"help": "`hresonance` turns a number pattern into a control pattern that sets the resonance of a high pass filter.",
"cmd": "hresonance :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/hresonance"
],
"type": "ctl"
},
{
"name": "leslie",
"help": "`leslie` controls dry/wet. \"lrate\" is the modulation rate (typical vintage rates would be 6.7 for \"fast\", 0.7 for \"slow\"). \"lsize\" is the physical size of the cabinet in meters, this mostly affects the Doppler amount (pitch warble).",
"cmd": "leslie :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/leslie"
],
"type": "ctl"
},
{
"name": "loop",
"help": "`loop` turns a number pattern into a control pattern that changes the number of times a sample plays from its `begin` and `end` points. A negative value behaves the same as its positive counterpart. With fractional `loop` values, the final iteration will be incomplete - for example, a value of `2.3` loops thrice with the final loop playing 30% of the sample between its `begin` and `end` points.",
"cmd": "loop :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/loop"
],
"type": "ctl"
},
{
"name": "lpf",
"help": "`lpf` turns a number pattern into a control pattern that sets the cutoff frequency of a low pass filter.",
"cmd": "lpf :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/lpf"
],
"type": "ctl"
},
{
"name": "lpq",
"help": "`lpq` turns a number pattern into a control pattern that sets the resonance of a low pass filter.",
"cmd": "lpq :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/lpq"
],
"type": "ctl"
},
{
"name": "midichan",
"help": "`midichan` turns a number pattern into a control pattern that controls what MIDI channel to play a MIDI pattern on.",
"cmd": "midichan :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/midichan"
],
"type": "ctl"
},
{
"name": "midicmd",
"help": "`midicmd` turns a string pattern into a control pattern that controls what `type` of MIDI pattern to play. i.e. a control-change pattern, a note pattern, etc.",
"cmd": "midicmd :: Pattern String -> ControlPattern",
"paramTypes": [
"Pattern String"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/midicmd"
],
"type": "ctl"
},
{
"name": "midinote",
"help": "`midinote` turns a number pattern into a control pattern that specifies the note on a MIDI keyboard to play, beginning at zero.",
"cmd": "midinote :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/midinote"
],
"type": "ctl"
},
{
"name": "nudge",
"help": "`nudge` turns a number pattern into a control pattern that changes the timing of a sample. Allows for nice things like swing feeling:",
"cmd": "nudge :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/nudge"
],
"type": "ctl"
},
{
"name": "orbit",
"help": "`orbit` is used to separate out audio channels. One use is to deal with global effects such as `room` and `delay`.",
"cmd": "orbit :: Pattern Int -> ControlPattern",
"paramTypes": [
"Pattern Int"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/orbit"
],
"type": "ctl"
},
{
"name": "pan",
"help": "`pan` turns a number pattern (ranging from 0 to 1) into a control pattern that specifies the audio channel. In a 2-channel setup, a value of 0 pans the audio hard left and a value of 1 pans",
"cmd": "pan :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/pan"
],
"type": "ctl"
},
{
"name": "release",
"help": "`release` turns a number pattern into a control pattern that changes the \"fade out\" time of a sample.",
"cmd": "release :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/release"
],
"type": "ctl"
},
{
"name": "resonance",
"help": "`resonance` turns a number pattern into a control pattern that sets the resonance of a low pass filter.",
"cmd": "resonance :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/resonance"
],
"type": "ctl"
},
{
"name": "room",
"help": "`room` controls reverb. It turns a number pattern (ranging from 0 to 1) into a control pattern that controls how much of the audio is signal is sent into the reverb effect.",
"cmd": "room :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/room"
],
"type": "ctl"
},
{
"name": "shape",
"help": "`shape` produces wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion. It can get very loud if you reach 1 - be careful!",
"cmd": "shape :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/shape"
],
"type": "ctl"
},
{
"name": "size",
"help": "`size` controls reverb room decay time. It turns a number pattern (ranging from 0 to 1) into a control pattern that controls the room decay time of the reverb effect.",
"cmd": "size :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/size"
],
"type": "ctl"
},
{
"name": "sound",
"help": "`sound` turns a pattern of strings into a control pattern representing sounds - either sample sets or synth names. This function is `required` when using SuperDirt.",
"cmd": "sound :: Pattern String -> ControlPattern",
"paramTypes": [
"Pattern String"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/sound"
],
"type": "ctl"
},
{
"name": "speed",
"help": "`speed` turns a number pattern into a control pattern that sets the playback speed of a sample",
"cmd": "speed :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/speed"
],
"type": "ctl"
},
{
"name": "squiz",
"help": "`squiz` is a simplistic pitch-raising algorithm, reminiscent of some weird mixture of filter, ring-modulator and pitch-shifter.",
"cmd": "squiz :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/squiz"
],
"type": "ctl"
},
{
"name": "vowel",
"help": "`vowel` turns a string pattern into a control pattern that creates a formant filter to produce vowel sounds on samples.",
"cmd": "vowel :: Pattern String -> ControlPattern",
"paramTypes": [
"Pattern String"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/vowel"
],
"type": "ctl"
},
{
"name": "waveloss",
"help": "`waveloss` divides an audio stream into tiny segments, using the signal`s zero-crossings as segment boundaries, and discards a defined fraction of them.",
"cmd": "waveloss :: Pattern Double -> ControlPattern",
"paramTypes": [
"Pattern Double"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/waveloss"
],
"type": "ctl"
},
{
"name": "append",
"help": "`append` combines two patterns into a new pattern, where cycles alternate between the first and second pattern.",
"cmd": "append :: Pattern a -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern a",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/append"
],
"type": "fun"
},
{
"name": "fastAppend",
"help": "`fastAppend` works like `append` described above, but each pair of cycles from the two patterns are squashed to fit a single cycle.",
"cmd": "fastAppend :: Pattern a -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern a",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/fastAppend"
],
"type": "fun"
},
{
"name": "arpeggiate",
"help": "The `arpeggiate` (alias `arpg`) function spreads chords of note numbers over time.",
"cmd": "arpeggiate :: Pattern a -> Pattern a ",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a ",
"links": [
"https://tidalcycles.org/index.php/arpeggiate"
],
"type": "fun"
},
{
"name": "arp",
"help": "The `arp` function takes an additional pattern of arpeggiate modes.",
"cmd": "arp :: Pattern String -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern String",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/arp"
],
"type": "fun"
},
{
"name": "binary",
"help": "`binary` allows you to express a boolean pattern as a decimal number.",
"cmd": "binary :: Pattern Int -> Pattern Bool",
"paramTypes": [
"Pattern Int"
],
"returnType": "Pattern Bool",
"links": [
"https://tidalcycles.org/index.php/binary"
],
"type": "fun"
},
{
"name": "binaryN",
"help": "`binaryN` lets you specify a number of bits for the pattern.",
"cmd": "binaryN :: Int -> Pattern Int -> Pattern Bool",
"paramTypes": [
"Int",
"Pattern Int"
],
"returnType": "Pattern Bool",
"links": [
"https://tidalcycles.org/index.php/binaryN"
],
"type": "fun"
},
{
"name": "ascii",
"help": "Turns characters into 8-bit binary patterns, using their ASCII encoding. E.g. the letter `a` give the binary pattern 01100001.",
"cmd": "ascii :: Pattern String -> Pattern Bool",
"paramTypes": [
"Pattern String"
],
"returnType": "Pattern Bool",
"links": [
"https://tidalcycles.org/index.php/ascii"
],
"type": "fun"
},
{
"name": "bite",
"help": "The `bite` function allows you to slice each cycle into a given number of equal sized bits, and then pattern those bits by number. It`s similar to `slice`, but is for slicing up patterns, rather than samples.",
"cmd": "bite :: Int -> Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/bite"
],
"type": "fun"
},
{
"name": "chew",
"help": "`chew` works the same as bite, but speeds up/slows down playback of sounds as well as squeezing / contracting the slices of pattern.",
"cmd": "chew :: Int -> Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/chew"
],
"type": "fun"
},
{
"name": "brak",
"help": "`brak` makes a pattern sound a bit like a breakbeat. It does this by every other cycle, squashing the pattern to fit half a cycle, and offsetting it by a quarter of a cycle.",
"cmd": "brak :: Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/brak"
],
"type": "fun"
},
{
"name": "cat",
"help": "`cat`, (also known as slowcat, to match with fastcat defined below) concatenates a list of patterns into a new pattern; each pattern in the list will maintain its original duration.",
"cmd": "cat :: [Pattern a] -> Pattern a",
"paramTypes": [
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/cat"
],
"type": "fun"
},
{
"name": "fastcat",
"help": "`fastcat` works like cat above, but squashes all the patterns to fit a single cycle.",
"cmd": "fastcat :: [Pattern a] -> Pattern a",
"paramTypes": [
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/fastcat"
],
"type": "fun"
},
{
"name": "choose",
"help": "The `choose` function emits a stream of randomly choosen values from the given list, as a `Oscillators|continuous` pattern.",
"cmd": "choose :: [a] -> Pattern a",
"paramTypes": [
"[a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/choose"
],
"type": "fun"
},
{
"name": "chooseBy",
"help": "The `chooseBy` function is like `choose` but instead of selecting elements of the list randomly, it uses the given pattern to select elements.",
"cmd": "chooseBy :: Pattern Double -> [a] -> Pattern a",
"paramTypes": [
"Pattern Double",
"[a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/chooseBy"
],
"type": "fun"
},
{
"name": "wchoose",
"help": "`wchoose` is similar to `choose`, but allows you to `weight` the choices, so some are more likely to be chosen than others. The following is similar to the previous example, but the 2 is twice as likely to be chosen than the 0 or 3.",
"cmd": "wchoose :: [(a, Double)] -> Pattern a",
"paramTypes": [
"[(a, Double)]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/wchoose"
],
"type": "fun"
},
{
"name": "wchooseBy",
"help": "The `wchooseBy` function is like `wchoose` but instead of selecting elements of the list randomly, it uses the given pattern to select elements.",
"cmd": "wchooseBy :: Pattern Double -> [(a,Double)] -> Pattern a ",
"paramTypes": [
"Pattern Double",
"[(a,Double)]"
],
"returnType": "Pattern a ",
"links": [
"https://tidalcycles.org/index.php/wchooseBy"
],
"type": "fun"
},
{
"name": "chop",
"help": "`chop` cuts each sample into the given number of parts, allowing you to explore a technique known as `granular synthesis`. It turns a pattern of samples into a pattern of parts of samples.",
"cmd": "chop :: Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/chop"
],
"type": "fun"
},
{
"name": "chunk",
"help": "`chunk` divides a pattern into a given number of parts, then cycles through those parts in turn, applying the given function to each part in turn (one part per cycle).",
"cmd": "chunk :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b",
"paramTypes": [
"Int",
"(Pattern b -> Pattern b)",
"Pattern b"
],
"returnType": "Pattern b",
"links": [
"https://tidalcycles.org/index.php/chunk"
],
"type": "fun"
},
{
"name": "chunk'",
"help": "`chunk`` does the same as `chunk` but cycles through the parts in the reverse direction.",
"links": [
"https://tidalcycles.org/index.php/chunk'"
],
"type": "fun"
},
{
"name": "deconstruct",
"help": "The `deconstruct` function displays the given number of steps within a pattern of strings. It`s useful for visualising simple patterns, for example for seeing what a euclidean pattern is doing.",
"cmd": "deconstruct :: Int -> Pattern String -> String",
"paramTypes": [
"Int",
"Pattern String"
],
"returnType": "String",
"links": [
"https://tidalcycles.org/index.php/deconstruct"
],
"type": "fun"
},
{
"name": "degrade",
"help": "`degrade` randomly removes events from a pattern, 50% of the time.",
"cmd": "degrade :: Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/degrade"
],
"type": "fun"
},
{
"name": "degradeBy",
"help": "Similarly to degrade, `degradeBy` allows you to control the percentage of events that are removed.",
"cmd": "degradeBy :: Double -> Pattern a -> Pattern a",
"paramTypes": [
"Double",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/degradeBy"
],
"type": "fun"
},
{
"name": "euclid",
"help": "`euclid` creates a Euclidean rhythmic structure. It produces the same output as the Euclidean pattern string.",
"cmd": "euclid :: Pattern Int -> Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/euclid"
],
"type": "fun"
},
{
"name": "every",
"help": "`every` is function, that allows you to apply another function conditionally. It takes three inputs, how often the function should be applied (e.g. 3 to apply it every 3 cycles), the function to be applied, and the pattern you are applying it to.",
"cmd": "every :: Pattern Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/every"
],
"type": "fun"
},
{
"name": "every'",
"help": "`every`` is a generalisation of `every`, taking one additional argument. The additional argument allows you to offset the function you are applying.",
"cmd": "every' :: Int -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Int",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/every'"
],
"type": "fun"
},
{
"name": "fast",
"help": "`fast` speeds up a pattern. For example, the following will play the sound pattern \"bd sn kurt\" twice as fast (i.e. so it repeats twice per cycle), and the vowel pattern three times as fast:",
"cmd": "fast :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/fast"
],
"type": "fun"
},
{
"name": "fit",
"help": "The `fit` function takes a pattern of integer numbers, which are used to select values from the given list. What makes this a bit strange is that only a given number of values are selected each cycle.",
"cmd": "fit :: Int -> [a] -> Pattern Int -> Pattern a",
"paramTypes": [
"Int",
"[a]",
"Pattern Int"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/fit"
],
"type": "fun"
},
{
"name": "fit'",
"help": "`fit` ` is a generalization of fit, where the list is instead constructed by using another integer pattern to slice up a given pattern. The first argument is the number of cycles of that latter pattern to use when slicing.",
"cmd": "fit' :: Time -> Int -> Pattern Int -> Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Time",
"Int",
"Pattern Int",
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/fit'"
],
"type": "fun"
},
{
"name": "fix",
"help": "The `fix` function applies another function to matching events in a pattern of controls.",
"cmd": "fix :: (ControlPattern -> ControlPattern) -> ControlPattern -> ControlPattern -> ControlPattern",
"paramTypes": [
"(ControlPattern -> ControlPattern)",
"ControlPattern",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/fix"
],
"type": "fun"
},
{
"name": "foldEvery",
"help": "`foldEvery` transforms a pattern with a function, once per any of the given number of cycles. If a particular cycle is the start of more than one of the given cycle periods, then it it applied more than once. It is similar to chaining multiple `every` functions together.",
"cmd": "foldEvery :: [Int] -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"[Int]",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/foldEvery"
],
"type": "fun"
},
{
"name": "gap",
"help": "`gap` is similar to `chop` in that it granulates every sample in place as it is played, but every other grain is silent. Use an integer value to specify how many granules each sample is chopped into:",
"cmd": "gap :: Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/gap"
],
"type": "fun"
},
{
"name": "ghost",
"help": "`ghost` adds quieter, pitch-shifted, copies of an event after the event, emulating ghost notes that are common in drumming patterns.",
"cmd": "ghost :: Pattern ControlMap -> Pattern ControlMap",
"paramTypes": [
"Pattern ControlMap"
],
"returnType": "Pattern ControlMap",
"links": [
"https://tidalcycles.org/index.php/ghost"
],
"type": "fun"
},
{
"name": "hurry",
"help": "`hurry` is similiar to `fast`, in that it speeds up a pattern, but it also increases the `speed` control by the same factor, so if you`re triggering samples, the sound gets higher in pitch.",
"cmd": "hurry :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/hurry"
],
"type": "fun"
},
{
"name": "ifp",
"help": "`ifp` decides whether to apply one or another function depending on the result of a test function, which is passed the current cycle as a number.",
"cmd": "ifp :: (Int -> Bool) -> (Pattern a -> Pattern a) -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"(Int -> Bool)",
"(Pattern a -> Pattern a)",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/ifp"
],
"type": "fun"
},
{
"name": "inside",
"help": "`inside` carries out an operation `inside` a cycle.",
"cmd": "inside :: Pattern Time -> (Pattern a -> Pattern b) -> Pattern a -> Pattern b",
"paramTypes": [
"Pattern Time",
"(Pattern a -> Pattern b)",
"Pattern a"
],
"returnType": "Pattern b",
"links": [
"https://tidalcycles.org/index.php/inside"
],
"type": "fun"
},
{
"name": "outside",
"help": "`outside` is the inverse of the `inside` function. `outside` applies its function outside the cycle.",
"cmd": "outside :: Pattern Time -> (Pattern a -> Pattern b) -> Pattern a -> Pattern b",
"paramTypes": [
"Pattern Time",
"(Pattern a -> Pattern b)",
"Pattern a"
],
"returnType": "Pattern b",
"links": [
"https://tidalcycles.org/index.php/outside"
],
"type": "fun"
},
{
"name": "interlace",
"help": "`interlace` shifts between two patterns, by using SuperDirt`s `shape` distortion control pattern.",
"cmd": "interlace :: ControlPattern -> ControlPattern -> ControlPattern",
"paramTypes": [
"ControlPattern",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/interlace"
],
"type": "fun"
},
{
"name": "iter",
"help": "`iter` divides a pattern into a given number of subdivisions, plays the subdivisions in order, but increments the starting subdivision each cycle. The pattern wraps to the first subdivision after the last subdivision is played.",
"cmd": "iter :: Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/iter"
],
"type": "fun"
},
{
"name": "iter'",
"help": "`iter`` does the same as `iter` but in the other direction. So this:",
"links": [
"https://tidalcycles.org/index.php/iter'"
],
"type": "fun"
},
{
"name": "jux",
"help": "The `jux` function creates strange stereo effects, by applying a function to a pattern, but only in the right-hand channel.",
"cmd": "jux :: (ControlPattern -> ControlPattern) -> ControlPattern -> ControlPattern",
"paramTypes": [
"(ControlPattern -> ControlPattern)",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/jux"
],
"type": "fun"
},
{
"name": "juxBy",
"help": "With jux, the original and effected versions of the pattern are panned hard left and right (i.e., panned at 0 and 1). This can be a bit much, especially when listening on headphones. The variant `juxBy` has an additional parameter, which brings the channel closer to the centre.",
"cmd": "juxBy :: Pattern Double -> (ControlPattern -> ControlPattern) -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Double",
"(ControlPattern -> ControlPattern)",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/juxBy"
],
"type": "fun"
},
{
"name": "See also",
"help": "This function is related to `superimpose`, in particular layer `id, rev` is the same as superimpose rev.",
"links": [
"https://tidalcycles.org/index.php/See also"
],
"type": "fun"
},
{
"name": "linger",
"help": "`linger` is similar to `trunc`, in that it truncates a pattern so that only the first fraction of the pattern is played. However unlike trunk, linger repeats that part to fill the remainder of the cycle.",
"cmd": "linger :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/linger"
],
"type": "fun"
},
{
"name": "loopAt",
"help": "`loopAt` makes sample fit the given number of cycles. Internally, it works by setting the `unit` control to \"c\", changing the playback speed of the sample with the speed parameter, and setting the density of the pattern to match.",
"cmd": "loopAt :: Pattern Time -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Time",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/loopAt"
],
"type": "fun"
},
{
"name": "markovPat",
"help": "`markovPat` generates a one-cycle pattern of steps in a Markov",
"cmd": "markovPat :: Pattern Int -> Pattern Int -> [[Double]] -> Pattern Int",
"paramTypes": [
"Pattern Int",
"Pattern Int",
"[[Double]]"
],
"returnType": "Pattern Int",
"links": [
"https://tidalcycles.org/index.php/markovPat"
],
"type": "fun"
},
{
"name": "mask",
"help": "`mask` takes a boolean (aka binary) pattern and `masks` another pattern with it. That is, events are only carried over if they match within a `true` event in the binary pattern.",
"cmd": "mask :: Pattern Bool -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Bool",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/mask"
],
"type": "fun"
},
{
"name": "mono",
"help": "`mono` makes the given pattern `monophonic`, so only one event happens at a time.",
"cmd": "mono :: Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/mono"
],
"type": "fun"
},
{
"name": "palindrome",
"help": "The `palindrome` function applies `rev` to a pattern `every` other cycle, so that the pattern alternates between forwards and backwards.",
"cmd": "palindrome :: Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/palindrome"
],
"type": "fun"
},
{
"name": "perlin",
"help": "`perlin` produces 1D Perlin (smooth) noise. It works like `rand` but smoothly moves between random values each cycle.",
"cmd": "perlin :: Pattern Double ",
"paramTypes": [],
"returnType": "Pattern Double ",
"links": [
"https://tidalcycles.org/index.php/perlin"
],
"type": "fun"
},
{
"name": "perlinWith",
"help": "`perlinWith` allows you to specify a pattern as input to generate random values instead of using the default cycle count:",
"links": [
"https://tidalcycles.org/index.php/perlinWith"
],
"type": "fun"
},
{
"name": "perlin2",
"help": "`perlin2` creates 2D noise by allowing you to specify a custom pattern as a second dimension (cycle number",
"links": [
"https://tidalcycles.org/index.php/perlin2"
],
"type": "fun"
},
{
"name": "perlin2With",
"help": "`perlin2With` is the same as perlinWith except allows you to provide two functions for 2D noise:",
"links": [
"https://tidalcycles.org/index.php/perlin2With"
],
"type": "fun"
},
{
"name": "ply",
"help": "The `ply` function repeats each event the given number of times.",
"cmd": "ply :: Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/ply"
],
"type": "fun"
},
{
"name": "rand",
"help": "`rand` is an `Oscillators|oscillator` that generates a pattern of (pseudo-)random, floating point numbers between 0 and 1.",
"cmd": "rand :: Fractional a => Pattern a ",
"paramTypes": [],
"returnType": "Pattern a ",
"links": [
"https://tidalcycles.org/index.php/rand"
],
"type": "fun"
},
{
"name": "irand",
"help": "`irand` is similar to `rand`, but generates a `Oscillators|continuous oscillator` of (pseudo-)random integers between 0 to n-1 inclusive. Notably used to pick random samples from a folder.",
"cmd": "irand :: Num a => Int -> Pattern a",
"paramTypes": [
"Int"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/irand"
],
"type": "fun"
},
{
"name": "randcat",
"help": "`randcat` is similar to `cat`, but rather than playing the given patterns in order, it picks them at random.",
"cmd": "randcat :: [Pattern a] -> Pattern a",
"paramTypes": [
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/randcat"
],
"type": "fun"
},
{
"name": "randslice",
"help": "`randslice` chops the sample into the given number of pieces and then plays back a random one each cycle:",
"cmd": "randslice :: Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/randslice"
],
"type": "fun"
},
{
"name": "range",
"help": "`range` will take a pattern which goes from 0 to 1 (such as `sine`), and scale it to a different range - between the first and second arguments. In the below example, range 1 1.5 shifts the range of sine from 0 - 1 to 1 - 1.5.",
"cmd": "range :: Num a => Pattern a -> Pattern a -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern a",
"Pattern a",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/range"
],
"type": "fun"
},
{
"name": "rangex",
"help": "`rangex` is an exponential version of range described above, good to use for frequencies. For example, range 20 2000 \"0.5\" will give 1010 - halfway between 20 and 2000. But rangex 20 2000 0.5 will give 200 - halfway between on a logarithmic scale. This usually sounds better if you’re using the numbers as pitch frequencies. Since rangex uses logarithms, don’t try to scale things to zero or less!",
"cmd": "rangex :: (Floating b, Functor f) => b -> b -> f b -> f b",
"paramTypes": [
"b",
"b",
"f b"
],
"returnType": "f b",
"links": [
"https://tidalcycles.org/index.php/rangex"
],
"type": "fun"
},
{
"name": "repeatCycles",
"help": "`repeatCycles` is function that repeats each cycle of a given pattern a given number of times.. It takes two inputs, the number of repeats, and the pattern you are transforming.",
"cmd": "repeatCycles :: Int -> Pattern a -> Pattern",
"paramTypes": [
"Int",
"Pattern a"
],
"returnType": "Pattern",
"links": [
"https://tidalcycles.org/index.php/repeatCycles"
],
"type": "fun"
},
{
"name": "rev",
"help": "`rev` returns a `reversed` version of the given pattern.",
"cmd": "rev :: Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/rev"
],
"type": "fun"
},
{
"name": "rot",
"help": "The `rot` function `rotates` the values in a pattern, while preserving its structure.",
"cmd": "rot :: Ord a => Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/rot"
],
"type": "fun"
},
{
"name": "run",
"help": "The `run` function generates a pattern representing a cycle of numbers from 0 to n-1 inclusive. Notably used to ‘run’ through a folder of samples in order:",
"cmd": "run :: (Num a, Enum a) => Pattern a -> Pattern a ",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a ",
"links": [
"https://tidalcycles.org/index.php/run"
],
"type": "fun"
},
{
"name": "scan",
"help": "`scan` is similar to `run`, but starts at 1 for the first cycle, adding an additional number each cycle until it reaches n",
"cmd": "scan :: (Num a, Enum a) => Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/scan"
],
"type": "fun"
},
{
"name": "scale",
"help": "`Not to be confused with `range`.`",
"cmd": "scale :: Num a => Pattern String -> Pattern Int -> Pattern a",
"paramTypes": [
"Pattern String",
"Pattern Int"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/scale"
],
"type": "fun"
},
{
"name": "scaleList",
"help": "The `scaleList` function outputs all the available scales, at the time of writing:",
"cmd": "scaleList :: String",
"paramTypes": [],
"returnType": "String",
"links": [
"https://tidalcycles.org/index.php/scaleList"
],
"type": "fun"
},
{
"name": "getScale",
"help": "You can build your own `scale` function with additional scales if you wish, using getScale.",
"cmd": "getScale :: Num a => [(String, [a])] -> Pattern String -> Pattern Int -> Pattern a",
"paramTypes": [
"[(String, [a])]",
"Pattern String",
"Pattern Int"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/getScale"
],
"type": "fun"
},
{
"name": "toScale",
"help": "d1 $ n (toScale `0,2,3,5,7,8,10` \"0 1 2 3 4 5 6 7\") # sound \"superpiano\"",
"cmd": "toScale :: Num a => [a] -> Pattern Int -> Pattern a",
"paramTypes": [
"[a]",
"Pattern Int"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/toScale"
],
"type": "fun"
},
{
"name": "scramble",
"help": "`scramble` takes a number and a pattern as input, divides the pattern into the given number of parts, and returns a new pattern by randomly selecting from the parts. This could also be called \"sampling with replacement\".",
"cmd": "scramble :: Int -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/scramble"
],
"type": "fun"
},
{
"name": "segment",
"help": "`segment` `samples` the pattern at a rate of n events per cycle. Useful for turning a continuous pattern into a discrete one.",
"cmd": "segment :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/segment"
],
"type": "fun"
},
{
"name": "seqP",
"help": "`seqP` allows you sequence patterns, with start and end times. The code below contains three separate patterns in a “stack”, but each has different start times (zero cycles, eight cycles, and sixteen cycles, respectively).",
"cmd": "seqP :: [(Time, Time, Pattern a)] -> Pattern a",
"paramTypes": [
"[(Time, Time, Pattern a)]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/seqP"
],
"type": "fun"
},
{
"name": "seqPLoop",
"help": "A third option is to use `seqPLoop` instead, which will keep looping the sequence when it gets to the end:",
"cmd": "seqPLoop :: [(Time, Time, Pattern a)] -> Pattern a",
"paramTypes": [
"[(Time, Time, Pattern a)]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/seqPLoop"
],
"type": "fun"
},
{
"name": "shuffle",
"help": "`shuffle` takes a number and a pattern as input, divides the pattern into the given number of parts, and returns a new pattern as a random permutation of the parts, picking one of each per cycle. This could also be called \"sampling without replacement\".",
"cmd": "shuffle :: Int -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/shuffle"
],
"type": "fun"
},
{
"name": "silence",
"help": "`silence` is the empty pattern, it contains nothing, nada. It`s still useful, though!",
"cmd": "silence :: Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/silence"
],
"type": "fun"
},
{
"name": "splice",
"help": "`splice` is similar to slice, but the slices are automatically pitched up or down to fit their `slot`.",
"cmd": "splice :: Int -> Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Int",
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/splice"
],
"type": "fun"
},
{
"name": "slow",
"help": "`slow` slows down a pattern. For example, the following will play the sound pattern \"bd sn kurt\" twice as slow (i.e. so it repeats once every two cycles), and the vowel pattern three times as slow:",
"cmd": "slow :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/slow"
],
"type": "fun"
},
{
"name": "smash",
"help": "`smash` is a combination of `spread` and `striate` - it cuts the samples into the given number of bits, and then cuts between playing the loop at different speeds according to the values in the list.",
"cmd": "smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"[Pattern Time]",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/smash"
],
"type": "fun"
},
{
"name": "smooth",
"help": "`smooth` blends between the numbers (rational or floating point) in a pattern. It does linear interpolation, that is it will go in a straight line from one number to the next. For example, smooth \"1 2\" will go from 1 to 2 and back to 1 again over one cycle, so that one quarter of the way through it will have the value 1.5.",
"cmd": "smooth :: Fractional a => Pattern a -> Pattern a",
"paramTypes": [
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/smooth"
],
"type": "fun"
},
{
"name": "snowball",
"help": "The `snowball` function recursively combines a pattern with a modified version itself using a combination function over the given number of cycles. Each passing cycle is one level deeper in the recursion and is based of all the previous cycles.",
"cmd": "snowball :: Int -> (Pattern a -> Pattern a -> Pattern a) -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"(Pattern a -> Pattern a -> Pattern a)",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/snowball"
],
"type": "fun"
},
{
"name": "soak",
"help": "The `soak` function applies the given function over the given number of cycles.",
"cmd": "soak :: Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/soak"
],
"type": "fun"
},
{
"name": "someCycles",
"help": "`See also: `sometimes``",
"cmd": "someCycles :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/someCycles"
],
"type": "fun"
},
{
"name": "someCyclesBy",
"help": "As with sometimesBy, if you want to be specific, you can use someCyclesBy and a number. For example someCyclesBy 0.93 (# speed 2) will apply the speed control on average 93 cycles out of a hundred.",
"links": [
"https://tidalcycles.org/index.php/someCyclesBy"
],
"type": "fun"
},
{
"name": "sometimes",
"help": "`See also: `someCycles``",
"cmd": "sometimes :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/sometimes"
],
"type": "fun"
},
{
"name": "sometimesBy",
"help": "If you want to be specific, you can use sometimesBy and a number, for example sometimesBy 0.93 (# speed 2) to apply the speed control on average 93 times out of a hundred.",
"links": [
"https://tidalcycles.org/index.php/sometimesBy"
],
"type": "fun"
},
{
"name": "spin",
"help": "`spin` will play the given number of copies of the given control pattern at once. For n copies, each successive copy will be offset in time by an additional 1/n of a cycle, and also panned in space by an additional n1/n. This function works particularly well on multichannel systems.",
"cmd": "spin :: Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/spin"
],
"type": "fun"
},
{
"name": "spread",
"help": "The `spread` function allows you to take a pattern transformation",
"cmd": "spread :: (a -> t -> Pattern b) -> [a] -> t -> Pattern b",
"paramTypes": [
"(a -> t -> Pattern b)",
"[a]",
"t"
],
"returnType": "Pattern b",
"links": [
"https://tidalcycles.org/index.php/spread"
],
"type": "fun"
},
{
"name": "fastspread",
"help": "`fastspread` works the same as `spread`, but the result is squashed into a single cycle. If you gave four values to `spread`, then the result would seem to speed up by a factor of four. Compare these two:",
"links": [
"https://tidalcycles.org/index.php/fastspread"
],
"type": "fun"
},
{
"name": "spreadChoose",
"help": "`spreadChoose` (alias `spreadr`) works the same as `spread`, but the values are selected at random, one cycle at a time.",
"links": [
"https://tidalcycles.org/index.php/spreadChoose"
],
"type": "fun"
},
{
"name": "stack",
"help": "`stack` takes a list of patterns and combines them into a new pattern by layering them up - effectively playing all of the patterns in the list simultaneously.",
"cmd": "stack :: [Pattern a] -> Pattern a",
"paramTypes": [
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/stack"
],
"type": "fun"
},
{
"name": "overlay",
"help": "The `overlay` function is similar to `cat` described above, but combines two patterns, rather than a list of patterns.",
"cmd": "overlay :: Pattern a -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern a",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/overlay"
],
"type": "fun"
},
{
"name": "striate",
"help": "`striate` is a kind of granulator, cutting samples into bits in a similar to `chop`, but the resulting bits are organised differently.",
"cmd": "striate :: Pattern Int -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/striate"
],
"type": "fun"
},
{
"name": "striateBy",
"help": "`striateBy` is a variant of striate. with an extra parameter, which specifies the length of each part. striate still scans across the sample over a single cycle, but if each bit is longer, it creates a sort of stuttering effect.",
"cmd": "striateBy :: Pattern Int -> Pattern Double -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Int",
"Pattern Double",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/striateBy"
],
"type": "fun"
},
{
"name": "stripe",
"help": "The `stripe` function repeats a pattern at random speeds. The first parameter gives the number of cycles to operate over, for example stripe 2 will repeat a pattern twice, over two cycles. Each cycle will be played at a random speed, but in such a way that the total duration will be the same.",
"cmd": "stripe :: Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/stripe"
],
"type": "fun"
},
{
"name": "slowstripe",
"help": "The `slowstripe` function is the same as `stripe` but the result is also",
"cmd": "slowstripe :: Pattern Int -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/slowstripe"
],
"type": "fun"
},
{
"name": "struct",
"help": "`struct` places a rhythmic `boolean` structure on the pattern you give it.",
"cmd": "struct :: Pattern Bool -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Bool",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/struct"
],
"type": "fun"
},
{
"name": "stut",
"help": "`stut` applies a type of delay to a pattern. It has three parameters, which could be called depth, feedback and time. Depth is an integer and the others floating point. This adds a bit of echo:",
"cmd": "stut :: Pattern Integer -> Pattern Double -> Pattern Rational -> ControlPattern -> ControlPattern",
"paramTypes": [
"Pattern Integer",
"Pattern Double",
"Pattern Rational",
"ControlPattern"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/stut"
],
"type": "fun"
},
{
"name": "stutWith",
"help": "`stutWith` (formerly known as stut`) is similar to stut described above, but instead of just decreasing volume to produce echoes, stutWith applies a function each step and overlays the result delayed by the given time.",
"cmd": "stutWith :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Int",
"Pattern Time",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/stutWith"
],
"type": "fun"
},
{
"name": "superimpose",
"help": "`superimpose` plays a modified version of a pattern `on top of` the original pattern, resulting in the modified and original version of the patterns being played at the same time.",
"cmd": "superimpose :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/superimpose"
],
"type": "fun"
},
{
"name": "See also",
"help": "Compare this function with `jux` which works similarly but pans the two versions of the pattern left and right, `off` which offsets the modified pattern in time, and `layer` which works like superimpose but allows you to layer up the results of more than one function.",
"links": [
"https://tidalcycles.org/index.php/See also"
],
"type": "fun"
},
{
"name": "swingBy",
"help": "The function swingBy x n breaks each cycle into n slices, and then delays events in the second half of each slice by the amount x, which is relative to the size of the (half) slice. So if x is 0 it does nothing, 0.5 delays for half the note duration, and 1 will wrap around to doing nothing again. The end result is a shuffle or swing-like rhythm.",
"cmd": "swingBy :: Pattern Time -> Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/swingBy"
],
"type": "fun"
},
{
"name": "swing",
"help": "`swing` is an alias for swingBy (1/3)",
"cmd": "swing :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/swing"
],
"type": "fun"
},
{
"name": "trigger",
"help": "The `trigger` function causes the pattern passed to it to be `reset` every time its evaluated.",
"cmd": "trigger :: Show a => a -> Pattern b -> Pattern b",
"paramTypes": [
"a",
"Pattern b"
],
"returnType": "Pattern b",
"links": [
"https://tidalcycles.org/index.php/trigger"
],
"type": "fun"
},
{
"name": "trunc",
"help": "`trunc` truncates a pattern so that only a fraction of the pattern is played.",
"cmd": "trunc :: Pattern Time -> Pattern a -> Pattern a",
"paramTypes": [
"Pattern Time",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/trunc"
],
"type": "fun"
},
{
"name": "ur",
"help": "The `ur` function is designed for longer form composition, by allowing you to create `patterns of patterns` in a repeating loop. It takes three parameters -- how long the loop will take, a pattern giving the structure of the composition, a lookup table for named patterns to feed into that structure, and a second lookup table for named transformations/fx.",
"cmd": "ur :: Time -> Pattern String -> [(String, Pattern a)] -> [(String, Pattern a -> Pattern a)] -> Pattern a",
"paramTypes": [
"Time",
"Pattern String",
"[(String, Pattern a)]",
"[(String, Pattern a -> Pattern a)]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/ur"
],
"type": "fun"
},
{
"name": "weave",
"help": "`weave` applies one control pattern to a list of other control patterns, with a successive time offset.",
"cmd": "weave :: Time -> ControlPattern -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"ControlPattern",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/weave"
],
"type": "fun"
},
{
"name": "weaveWith",
"help": "d1 $ weaveWith 3 (sound \"bd `sn drum:2*2` bd*2 `sn drum:1`\")",
"cmd": "weaveWith :: Time -> Pattern a -> [Pattern a -> Pattern a] -> Pattern a",
"paramTypes": [
"Time",
"Pattern a",
"[Pattern a -> Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/weaveWith"
],
"type": "fun"
},
{
"name": "wedge",
"help": "`wedge` combines two patterns by squashing them into a single cycle. It takes a ratio as the first argument. The ratio determines what percentage of the pattern cycle is taken up by the first pattern. The second pattern fills in the remainder of the pattern cycle.",
"cmd": "wedge :: Time -> Pattern a -> Pattern a -> Pattern a",
"paramTypes": [
"Time",
"Pattern a",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/wedge"
],
"type": "fun"
},
{
"name": "when",
"help": "Only `when` the given test function returns True the given pattern transformation is applied. The test function will be called with the current cycle as a number.",
"cmd": "when :: (Int -> Bool) -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"(Int -> Bool)",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/when"
],
"type": "fun"
},
{
"name": "whenmod",
"help": "`whenmod` has a similar form and behavior to `every`, but requires an additional number. It applies the function to the pattern, when the remainder of the current loop number divided by the first parameter, is greater or equal than the second parameter.",
"cmd": "whenmod :: Int -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Int",
"Int",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/whenmod"
],
"type": "fun"
},
{
"name": "within",
"help": "Use `within` to apply a function to only a part of a pattern. `within` takes two arguments: a start time and an end time, specified as floats between 0 and 1, which are applied to the relevant pattern. Note that the second argument must be greater than the first for the function to have any effect.",
"cmd": "within :: Arc -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a",
"paramTypes": [
"Arc",
"(Pattern a -> Pattern a)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/within"
],
"type": "fun"
},
{
"name": "zoom",
"help": "Plays a portion of a pattern, specified by the beginning and end of a time span (known as an `arc`). The new resulting pattern is played over the time period of the original pattern:",
"cmd": "zoom :: (Time, Time) -> Pattern a -> Pattern a",
"paramTypes": [
"(Time, Time)",
"Pattern a"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/zoom"
],
"type": "fun"
},
{
"name": "anticipate",
"help": "An increasing comb filter.",
"cmd": "anticipate :: Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/anticipate"
],
"type": "trn"
},
{
"name": "anticipateIn",
"help": "Same as anticipate though it allows you to specify the number of cycles until dropping to the new pattern.",
"cmd": "anticipateIn :: Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/anticipateIn"
],
"type": "trn"
},
{
"name": "clutch",
"help": "Degrades the current pattern while undegrading the next.",
"cmd": "clutch :: Time -> [Pattern a] -> Pattern a",
"paramTypes": [
"Time",
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/clutch"
],
"type": "trn"
},
{
"name": "clutchIn",
"help": "-",
"cmd": "clutchIn :: Time -> Time -> [Pattern a] -> Pattern a",
"paramTypes": [
"Time",
"Time",
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/clutchIn"
],
"type": "trn"
},
{
"name": "interpolate",
"help": "-",
"cmd": "interpolate :: Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/interpolate"
],
"type": "trn"
},
{
"name": "interpolateIn",
"help": "-",
"cmd": "interpolateIn :: Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/interpolateIn"
],
"type": "trn"
},
{
"name": "jump",
"help": "Jumps directly into the given pattern, this is essentially the ''no_transition''-transition.\nVariants of jump provide more useful capabilities, see jumpIn and jumpMod.",
"cmd": "jump :: Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/jump"
],
"type": "trn"
},
{
"name": "jumpIn",
"help": "Takes the identifier of the ControlPattern track and an integer ''cycleCount''. It will jump '''unaligned''' into the given pattern after ''cycleCount'' cycles have completed.",
"cmd": "jumpIn :: Int -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Int",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/jumpIn"
],
"type": "trn"
},
{
"name": "jumpIn'",
"help": "Unlike jumpIn the variant jumpIn' will only transition at cycle boundary (e.g. when the cycle count is an integer).",
"cmd": "jumpIn' :: Int -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Int",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/jumpIn'"
],
"type": "trn"
},
{
"name": "jumpMod",
"help": "Sharp jump transition at next cycle boundary where cycle mod n == 0.",
"cmd": "jumpMod :: Int -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Int",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/jumpMod"
],
"type": "trn"
},
{
"name": "histpan",
"help": "Pans the last n versions of the pattern across the field.",
"cmd": "histpan :: Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/histpan"
],
"type": "trn"
},
{
"name": "wait",
"help": "Just stop for a bit before playing new pattern.",
"cmd": "wait :: Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/wait"
],
"type": "trn"
},
{
"name": "waitT",
"help": "Just as wait, waitT stops for a bit and then applies the given transition to the playing pattern.",
"cmd": "waitT :: (Time -> [ControlPattern] -> ControlPattern) -> Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"(Time -> [ControlPattern] -> ControlPattern)",
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/waitT"
],
"type": "trn"
},
{
"name": "wash",
"help": "Washes away the current pattern after a certain delay by applying a function to it over time, then switching over to the next pattern to which another function is applied.",
"cmd": "wash :: (Pattern a -> Pattern a) -> (Pattern a -> Pattern a) -> Time -> Time -> Time -> Time -> [Pattern a] -> Pattern a",
"paramTypes": [
"(Pattern a -> Pattern a)",
"(Pattern a -> Pattern a)",
"Time",
"Time",
"Time",
"Time",
"[Pattern a]"
],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/wash"
],
"type": "trn"
},
{
"name": "washIn",
"help": "-",
"cmd": "washIn :: (Pattern a -> Pattern a) -> Time -> Time -> [Pattern a] -> Pattern a ",
"paramTypes": [
"(Pattern a -> Pattern a)",
"Time",
"Time",
"[Pattern a]"
],
"returnType": "Pattern a ",
"links": [
"https://tidalcycles.org/index.php/washIn"
],
"type": "trn"
},
{
"name": "xfade",
"help": "Applies a crossfade over 4 cycles, and fades one pattern out while fading a new pattern in.",
"cmd": "xfade :: Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/xfade"
],
"type": "trn"
},
{
"name": "xfadeIn",
"help": "Applies a crossfade, and fades one pattern out while fading a new pattern in.",
"cmd": "xfadeIn :: Time -> Time -> [ControlPattern] -> ControlPattern",
"paramTypes": [
"Time",
"Time",
"[ControlPattern]"
],
"returnType": "ControlPattern",
"links": [
"https://tidalcycles.org/index.php/xfadeIn"
],
"type": "trn"
},
{
"name": "sine",
"help": "A sine wave.",
"cmd": "sine :: Fractional a => Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/sine"
],
"type": "osc"
},
{
"name": "cosine",
"help": "A cosine wave, i.e. a sine shifted in time by a quarter of a cycle.",
"cmd": "cosine :: Fractional a => Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/cosine"
],
"type": "osc"
},
{
"name": "square",
"help": "A squarewave, starting at 0, then going up to 1 halfway through a cycle.",
"cmd": "square :: Fractional a => Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/square"
],
"type": "osc"
},
{
"name": "tri",
"help": "A triangle wave, starting at 0, then linearly rising to 1 halfway through a cycle, then down again.",
"cmd": "tri :: Fractional a => Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/tri"
],
"type": "osc"
},
{
"name": "saw",
"help": "A sawtooth wave starting at 0, then linearly rising to 1 over one cycle, then jumping back to 0.",
"cmd": "saw :: Fractional a => Pattern a",
"paramTypes": [],
"returnType": "Pattern a",
"links": [
"https://tidalcycles.org/index.php/saw"
],
"type": "osc"
}
]
accelerate:
help: >-
`accelerate` turns a number pattern into a control pattern that speeds up
(or slows down) samples while they play.
cmd: 'accelerate :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/accelerate'
type: ctl
attack:
help: >-
`attack` turns a number pattern into a control pattern that changes the
"fade in" time of a sample.
cmd: 'attack :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/attack'
type: ctl
bandf:
help: >-
`bandf` turns a number pattern into a control pattern that sets the center
frequency of a band pass filter.
cmd: 'bandf :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/bandf'
type: ctl
bandq:
help: >-
`bandq` turns a number pattern into a control pattern that sets the q-factor
of the band-pass filter.
cmd: 'bandq :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/bandq'
type: ctl
begin:
help: >-
`begin` turns a number pattern into a control pattern that changes the start
position of a sample.
cmd: 'begin :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/begin'
type: ctl
bpf:
help: '`bpf` is a shortcut for `bandf`.'
links:
- 'https://tidalcycles.org/index.php/bpf'
type: ctl
bpq:
help: '`bpq` is a shortcut for `bandq`.'
links:
- 'https://tidalcycles.org/index.php/bpq'
type: ctl
coarse:
help: >-
`coarse` turns a number pattern into a control pattern that lowers the
sample rate of a sample.
cmd: 'coarse :: Pattern Int -> ControlPattern'
paramTypes:
- Pattern Int
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/coarse'
type: ctl
crush:
help: >-
`crush` turns a number pattern into a control pattern that creates a
bit-crushing effect.
cmd: 'crush :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/crush'
type: ctl
cut:
help: >-
In the style of classic drum-machines, `cut` will stop a playing sample as
soon as another sample with the same cutgroup is played.
cmd: 'cut :: Pattern Int -> ControlPattern'
paramTypes:
- Pattern Int
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/cut'
type: ctl
cutoff:
help: >-
`cutoff` turns a number pattern into a control pattern that sets the cutoff
frequency of a low pass filter.
cmd: 'cutoff :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/cutoff'
type: ctl
delay:
help: >-
`delay` turns a number pattern into a control pattern that changes the level
of the initial delay signal.
cmd: 'delay :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/delay'
type: ctl
delayfeedback:
help: >-
`delayfeedback` turns a number pattern into a control pattern that changes
the feedback level of the delay effect.
cmd: 'delayfeedback :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/delayfeedback'
type: ctl
delaytime:
help: >-
`delaytime` turns a number pattern into a control pattern that changes the
length of the delay effect. The `delay`
cmd: 'delaytime :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/delaytime'
type: ctl
end:
help: >-
`end` turns a number pattern into a control pattern that changes the
playback end position of a sample.
cmd: 'end :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/end'
type: ctl
gain:
help: >-
`gain` turns a number pattern into a control pattern that specifies volume.
Values less than 1 make the sound quieter. Values greater than 1 make the
sound louder.
cmd: 'gain :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/gain'
type: ctl
hcutoff:
help: >-
`hcutoff` turns a number pattern into a control pattern that sets the cutoff
frequency of a high pass filter.
cmd: 'hcutoff :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/hcutoff'
type: ctl
hpf:
help: >-
`hpf` turns a number pattern into a control pattern that sets the cutoff
frequency of a high pass filter.
cmd: 'hpf :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/hpf'
type: ctl
hpq:
help: >-
`hpq` turns a number pattern into a control pattern that sets the resonance
of a high pass filter.
cmd: 'hpq :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/hpq'
type: ctl
hresonance:
help: >-
`hresonance` turns a number pattern into a control pattern that sets the
resonance of a high pass filter.
cmd: 'hresonance :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/hresonance'
type: ctl
leslie:
help: >-
`leslie` controls dry/wet. "lrate" is the modulation rate (typical vintage
rates would be 6.7 for "fast", 0.7 for "slow"). "lsize" is the physical size
of the cabinet in meters, this mostly affects the Doppler amount (pitch
warble).
cmd: 'leslie :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/leslie'
type: ctl
loop:
help: >-
`loop` turns a number pattern into a control pattern that changes the number
of times a sample plays from its `begin` and `end` points. A negative value
behaves the same as its positive counterpart. With fractional `loop` values,
the final iteration will be incomplete - for example, a value of `2.3` loops
thrice with the final loop playing 30% of the sample between its `begin` and
`end` points.
cmd: 'loop :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/loop'
type: ctl
lpf:
help: >-
`lpf` turns a number pattern into a control pattern that sets the cutoff
frequency of a low pass filter.
cmd: 'lpf :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/lpf'
type: ctl
lpq:
help: >-
`lpq` turns a number pattern into a control pattern that sets the resonance
of a low pass filter.
cmd: 'lpq :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/lpq'
type: ctl
midichan:
help: >-
`midichan` turns a number pattern into a control pattern that controls what
MIDI channel to play a MIDI pattern on.
cmd: 'midichan :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/midichan'
type: ctl
midicmd:
help: >-
`midicmd` turns a string pattern into a control pattern that controls what
`type` of MIDI pattern to play. i.e. a control-change pattern, a note
pattern, etc.
cmd: 'midicmd :: Pattern String -> ControlPattern'
paramTypes:
- Pattern String
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/midicmd'
type: ctl
midinote:
help: >-
`midinote` turns a number pattern into a control pattern that specifies the
note on a MIDI keyboard to play, beginning at zero.
cmd: 'midinote :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/midinote'
type: ctl
nudge:
help: >-
`nudge` turns a number pattern into a control pattern that changes the
timing of a sample. Allows for nice things like swing feeling:
cmd: 'nudge :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/nudge'
type: ctl
orbit:
help: >-
`orbit` is used to separate out audio channels. One use is to deal with
global effects such as `room` and `delay`.
cmd: 'orbit :: Pattern Int -> ControlPattern'
paramTypes:
- Pattern Int
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/orbit'
type: ctl
pan:
help: >-
`pan` turns a number pattern (ranging from 0 to 1) into a control pattern
that specifies the audio channel. In a 2-channel setup, a value of 0 pans
the audio hard left and a value of 1 pans
cmd: 'pan :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/pan'
type: ctl
release:
help: >-
`release` turns a number pattern into a control pattern that changes the
"fade out" time of a sample.
cmd: 'release :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/release'
type: ctl
resonance:
help: >-
`resonance` turns a number pattern into a control pattern that sets the
resonance of a low pass filter.
cmd: 'resonance :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/resonance'
type: ctl
room:
help: >-
`room` controls reverb. It turns a number pattern (ranging from 0 to 1) into
a control pattern that controls how much of the audio is signal is sent into
the reverb effect.
cmd: 'room :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/room'
type: ctl
shape:
help: >-
`shape` produces wave shaping distortion, a pattern of numbers from 0 for no
distortion up to 1 for loads of distortion. It can get very loud if you
reach 1 - be careful!
cmd: 'shape :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/shape'
type: ctl
size:
help: >-
`size` controls reverb room decay time. It turns a number pattern (ranging
from 0 to 1) into a control pattern that controls the room decay time of the
reverb effect.
cmd: 'size :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/size'
type: ctl
sound:
help: >-
`sound` turns a pattern of strings into a control pattern representing
sounds - either sample sets or synth names. This function is `required` when
using SuperDirt.
cmd: 'sound :: Pattern String -> ControlPattern'
paramTypes:
- Pattern String
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/sound'
type: ctl
speed:
help: >-
`speed` turns a number pattern into a control pattern that sets the playback
speed of a sample
cmd: 'speed :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/speed'
type: ctl
squiz:
help: >-
`squiz` is a simplistic pitch-raising algorithm, reminiscent of some weird
mixture of filter, ring-modulator and pitch-shifter.
cmd: 'squiz :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/squiz'
type: ctl
vowel:
help: >-
`vowel` turns a string pattern into a control pattern that creates a formant
filter to produce vowel sounds on samples.
cmd: 'vowel :: Pattern String -> ControlPattern'
paramTypes:
- Pattern String
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/vowel'
type: ctl
waveloss:
help: >-
`waveloss` divides an audio stream into tiny segments, using the signal`s
zero-crossings as segment boundaries, and discards a defined fraction of
them.
cmd: 'waveloss :: Pattern Double -> ControlPattern'
paramTypes:
- Pattern Double
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/waveloss'
type: ctl
append:
help: >-
`append` combines two patterns into a new pattern, where cycles alternate
between the first and second pattern.
cmd: 'append :: Pattern a -> Pattern a -> Pattern a'
paramTypes:
- Pattern a
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/append'
type: fun
fastAppend:
help: >-
`fastAppend` works like `append` described above, but each pair of cycles
from the two patterns are squashed to fit a single cycle.
cmd: 'fastAppend :: Pattern a -> Pattern a -> Pattern a'
paramTypes:
- Pattern a
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/fastAppend'
type: fun
arpeggiate:
help: >-
The `arpeggiate` (alias `arpg`) function spreads chords of note numbers over
time.
cmd: 'arpeggiate :: Pattern a -> Pattern a '
paramTypes:
- Pattern a
returnType: 'Pattern a '
links:
- 'https://tidalcycles.org/index.php/arpeggiate'
type: fun
arp:
help: The `arp` function takes an additional pattern of arpeggiate modes.
cmd: 'arp :: Pattern String -> Pattern a -> Pattern a'
paramTypes:
- Pattern String
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/arp'
type: fun
binary:
help: '`binary` allows you to express a boolean pattern as a decimal number.'
cmd: 'binary :: Pattern Int -> Pattern Bool'
paramTypes:
- Pattern Int
returnType: Pattern Bool
links:
- 'https://tidalcycles.org/index.php/binary'
type: fun
binaryN:
help: '`binaryN` lets you specify a number of bits for the pattern.'
cmd: 'binaryN :: Int -> Pattern Int -> Pattern Bool'
paramTypes:
- Int
- Pattern Int
returnType: Pattern Bool
links:
- 'https://tidalcycles.org/index.php/binaryN'
type: fun
ascii:
help: >-
Turns characters into 8-bit binary patterns, using their ASCII encoding.
E.g. the letter `a` give the binary pattern 01100001.
cmd: 'ascii :: Pattern String -> Pattern Bool'
paramTypes:
- Pattern String
returnType: Pattern Bool
links:
- 'https://tidalcycles.org/index.php/ascii'
type: fun
bite:
help: >-
The `bite` function allows you to slice each cycle into a given number of
equal sized bits, and then pattern those bits by number. It`s similar to
`slice`, but is for slicing up patterns, rather than samples.
cmd: 'bite :: Int -> Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Int
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/bite'
type: fun
chew:
help: >-
`chew` works the same as bite, but speeds up/slows down playback of sounds
as well as squeezing / contracting the slices of pattern.
cmd: 'chew :: Int -> Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Int
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/chew'
type: fun
brak:
help: >-
`brak` makes a pattern sound a bit like a breakbeat. It does this by every
other cycle, squashing the pattern to fit half a cycle, and offsetting it by
a quarter of a cycle.
cmd: 'brak :: Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/brak'
type: fun
cat:
help: >-
`cat`, (also known as slowcat, to match with fastcat defined below)
concatenates a list of patterns into a new pattern; each pattern in the list
will maintain its original duration.
cmd: 'cat :: [Pattern a] -> Pattern a'
paramTypes:
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/cat'
type: fun
fastcat:
help: >-
`fastcat` works like cat above, but squashes all the patterns to fit a
single cycle.
cmd: 'fastcat :: [Pattern a] -> Pattern a'
paramTypes:
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/fastcat'
type: fun
choose:
help: >-
The `choose` function emits a stream of randomly choosen values from the
given list, as a `Oscillators|continuous` pattern.
cmd: 'choose :: [a] -> Pattern a'
paramTypes:
- '[a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/choose'
type: fun
chooseBy:
help: >-
The `chooseBy` function is like `choose` but instead of selecting elements
of the list randomly, it uses the given pattern to select elements.
cmd: 'chooseBy :: Pattern Double -> [a] -> Pattern a'
paramTypes:
- Pattern Double
- '[a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/chooseBy'
type: fun
wchoose:
help: >-
`wchoose` is similar to `choose`, but allows you to `weight` the choices, so
some are more likely to be chosen than others. The following is similar to
the previous example, but the 2 is twice as likely to be chosen than the 0
or 3.
cmd: 'wchoose :: [(a, Double)] -> Pattern a'
paramTypes:
- '[(a, Double)]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/wchoose'
type: fun
wchooseBy:
help: >-
The `wchooseBy` function is like `wchoose` but instead of selecting elements
of the list randomly, it uses the given pattern to select elements.
cmd: 'wchooseBy :: Pattern Double -> [(a,Double)] -> Pattern a '
paramTypes:
- Pattern Double
- '[(a,Double)]'
returnType: 'Pattern a '
links:
- 'https://tidalcycles.org/index.php/wchooseBy'
type: fun
chop:
help: >-
`chop` cuts each sample into the given number of parts, allowing you to
explore a technique known as `granular synthesis`. It turns a pattern of
samples into a pattern of parts of samples.
cmd: 'chop :: Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/chop'
type: fun
chunk:
help: >-
`chunk` divides a pattern into a given number of parts, then cycles through
those parts in turn, applying the given function to each part in turn (one
part per cycle).
cmd: 'chunk :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b'
paramTypes:
- Int
- (Pattern b -> Pattern b)
- Pattern b
returnType: Pattern b
links:
- 'https://tidalcycles.org/index.php/chunk'
type: fun
chunk':
help: >-
`chunk`` does the same as `chunk` but cycles through the parts in the
reverse direction.
links:
- 'https://tidalcycles.org/index.php/chunk'''
type: fun
deconstruct:
help: >-
The `deconstruct` function displays the given number of steps within a
pattern of strings. It`s useful for visualising simple patterns, for example
for seeing what a euclidean pattern is doing.
cmd: 'deconstruct :: Int -> Pattern String -> String'
paramTypes:
- Int
- Pattern String
returnType: String
links:
- 'https://tidalcycles.org/index.php/deconstruct'
type: fun
degrade:
help: '`degrade` randomly removes events from a pattern, 50% of the time.'
cmd: 'degrade :: Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/degrade'
type: fun
degradeBy:
help: >-
Similarly to degrade, `degradeBy` allows you to control the percentage of
events that are removed.
cmd: 'degradeBy :: Double -> Pattern a -> Pattern a'
paramTypes:
- Double
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/degradeBy'
type: fun
euclid:
help: >-
`euclid` creates a Euclidean rhythmic structure. It produces the same output
as the Euclidean pattern string.
cmd: 'euclid :: Pattern Int -> Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/euclid'
type: fun
every:
help: >-
`every` is function, that allows you to apply another function
conditionally. It takes three inputs, how often the function should be
applied (e.g. 3 to apply it every 3 cycles), the function to be applied, and
the pattern you are applying it to.
cmd: 'every :: Pattern Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/every'
type: fun
every':
help: >-
`every`` is a generalisation of `every`, taking one additional argument. The
additional argument allows you to offset the function you are applying.
cmd: 'every'' :: Int -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- Int
- Int
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/every'''
type: fun
fast:
help: >-
`fast` speeds up a pattern. For example, the following will play the sound
pattern "bd sn kurt" twice as fast (i.e. so it repeats twice per cycle), and
the vowel pattern three times as fast:
cmd: 'fast :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/fast'
type: fun
fit:
help: >-
The `fit` function takes a pattern of integer numbers, which are used to
select values from the given list. What makes this a bit strange is that
only a given number of values are selected each cycle.
cmd: 'fit :: Int -> [a] -> Pattern Int -> Pattern a'
paramTypes:
- Int
- '[a]'
- Pattern Int
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/fit'
type: fun
fit':
help: >-
`fit` ` is a generalization of fit, where the list is instead constructed by
using another integer pattern to slice up a given pattern. The first
argument is the number of cycles of that latter pattern to use when slicing.
cmd: 'fit'' :: Time -> Int -> Pattern Int -> Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Time
- Int
- Pattern Int
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/fit'''
type: fun
fix:
help: >-
The `fix` function applies another function to matching events in a pattern
of controls.
cmd: >-
fix :: (ControlPattern -> ControlPattern) -> ControlPattern ->
ControlPattern -> ControlPattern
paramTypes:
- (ControlPattern -> ControlPattern)
- ControlPattern
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/fix'
type: fun
foldEvery:
help: >-
`foldEvery` transforms a pattern with a function, once per any of the given
number of cycles. If a particular cycle is the start of more than one of the
given cycle periods, then it it applied more than once. It is similar to
chaining multiple `every` functions together.
cmd: 'foldEvery :: [Int] -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- '[Int]'
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/foldEvery'
type: fun
gap:
help: >-
`gap` is similar to `chop` in that it granulates every sample in place as it
is played, but every other grain is silent. Use an integer value to specify
how many granules each sample is chopped into:
cmd: 'gap :: Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/gap'
type: fun
ghost:
help: >-
`ghost` adds quieter, pitch-shifted, copies of an event after the event,
emulating ghost notes that are common in drumming patterns.
cmd: 'ghost :: Pattern ControlMap -> Pattern ControlMap'
paramTypes:
- Pattern ControlMap
returnType: Pattern ControlMap
links:
- 'https://tidalcycles.org/index.php/ghost'
type: fun
hurry:
help: >-
`hurry` is similiar to `fast`, in that it speeds up a pattern, but it also
increases the `speed` control by the same factor, so if you`re triggering
samples, the sound gets higher in pitch.
cmd: 'hurry :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/hurry'
type: fun
ifp:
help: >-
`ifp` decides whether to apply one or another function depending on the
result of a test function, which is passed the current cycle as a number.
cmd: >-
ifp :: (Int -> Bool) -> (Pattern a -> Pattern a) -> (Pattern a -> Pattern a)
-> Pattern a -> Pattern a
paramTypes:
- (Int -> Bool)
- (Pattern a -> Pattern a)
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/ifp'
type: fun
inside:
help: '`inside` carries out an operation `inside` a cycle.'
cmd: 'inside :: Pattern Time -> (Pattern a -> Pattern b) -> Pattern a -> Pattern b'
paramTypes:
- Pattern Time
- (Pattern a -> Pattern b)
- Pattern a
returnType: Pattern b
links:
- 'https://tidalcycles.org/index.php/inside'
type: fun
outside:
help: >-
`outside` is the inverse of the `inside` function. `outside` applies its
function outside the cycle.
cmd: >-
outside :: Pattern Time -> (Pattern a -> Pattern b) -> Pattern a -> Pattern
b
paramTypes:
- Pattern Time
- (Pattern a -> Pattern b)
- Pattern a
returnType: Pattern b
links:
- 'https://tidalcycles.org/index.php/outside'
type: fun
interlace:
help: >-
`interlace` shifts between two patterns, by using SuperDirt`s `shape`
distortion control pattern.
cmd: 'interlace :: ControlPattern -> ControlPattern -> ControlPattern'
paramTypes:
- ControlPattern
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/interlace'
type: fun
iter:
help: >-
`iter` divides a pattern into a given number of subdivisions, plays the
subdivisions in order, but increments the starting subdivision each cycle.
The pattern wraps to the first subdivision after the last subdivision is
played.
cmd: 'iter :: Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/iter'
type: fun
iter':
help: '`iter`` does the same as `iter` but in the other direction. So this:'
links:
- 'https://tidalcycles.org/index.php/iter'''
type: fun
jux:
help: >-
The `jux` function creates strange stereo effects, by applying a function to
a pattern, but only in the right-hand channel.
cmd: >-
jux :: (ControlPattern -> ControlPattern) -> ControlPattern ->
ControlPattern
paramTypes:
- (ControlPattern -> ControlPattern)
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/jux'
type: fun
juxBy:
help: >-
With jux, the original and effected versions of the pattern are panned hard
left and right (i.e., panned at 0 and 1). This can be a bit much, especially
when listening on headphones. The variant `juxBy` has an additional
parameter, which brings the channel closer to the centre.
cmd: >-
juxBy :: Pattern Double -> (ControlPattern -> ControlPattern) ->
ControlPattern -> ControlPattern
paramTypes:
- Pattern Double
- (ControlPattern -> ControlPattern)
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/juxBy'
type: fun
See also:
help: >-
Compare this function with `jux` which works similarly but pans the two
versions of the pattern left and right, `off` which offsets the modified
pattern in time, and `layer` which works like superimpose but allows you to
layer up the results of more than one function.
links:
- 'https://tidalcycles.org/index.php/See also'
type: fun
linger:
help: >-
`linger` is similar to `trunc`, in that it truncates a pattern so that only
the first fraction of the pattern is played. However unlike trunk, linger
repeats that part to fill the remainder of the cycle.
cmd: 'linger :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/linger'
type: fun
loopAt:
help: >-
`loopAt` makes sample fit the given number of cycles. Internally, it works
by setting the `unit` control to "c", changing the playback speed of the
sample with the speed parameter, and setting the density of the pattern to
match.
cmd: 'loopAt :: Pattern Time -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Time
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/loopAt'
type: fun
markovPat:
help: '`markovPat` generates a one-cycle pattern of steps in a Markov'
cmd: 'markovPat :: Pattern Int -> Pattern Int -> [[Double]] -> Pattern Int'
paramTypes:
- Pattern Int
- Pattern Int
- '[[Double]]'
returnType: Pattern Int
links:
- 'https://tidalcycles.org/index.php/markovPat'
type: fun
mask:
help: >-
`mask` takes a boolean (aka binary) pattern and `masks` another pattern with
it. That is, events are only carried over if they match within a `true`
event in the binary pattern.
cmd: 'mask :: Pattern Bool -> Pattern a -> Pattern a'
paramTypes:
- Pattern Bool
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/mask'
type: fun
mono:
help: >-
`mono` makes the given pattern `monophonic`, so only one event happens at a
time.
cmd: 'mono :: Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/mono'
type: fun
palindrome:
help: >-
The `palindrome` function applies `rev` to a pattern `every` other cycle, so
that the pattern alternates between forwards and backwards.
cmd: 'palindrome :: Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/palindrome'
type: fun
perlin:
help: >-
`perlin` produces 1D Perlin (smooth) noise. It works like `rand` but
smoothly moves between random values each cycle.
cmd: 'perlin :: Pattern Double '
paramTypes: []
returnType: 'Pattern Double '
links:
- 'https://tidalcycles.org/index.php/perlin'
type: fun
perlinWith:
help: >-
`perlinWith` allows you to specify a pattern as input to generate random
values instead of using the default cycle count:
links:
- 'https://tidalcycles.org/index.php/perlinWith'
type: fun
perlin2:
help: >-
`perlin2` creates 2D noise by allowing you to specify a custom pattern as a
second dimension (cycle number
links:
- 'https://tidalcycles.org/index.php/perlin2'
type: fun
perlin2With:
help: >-
`perlin2With` is the same as perlinWith except allows you to provide two
functions for 2D noise:
links:
- 'https://tidalcycles.org/index.php/perlin2With'
type: fun
ply:
help: The `ply` function repeats each event the given number of times.
cmd: 'ply :: Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/ply'
type: fun
rand:
help: >-
`rand` is an `Oscillators|oscillator` that generates a pattern of
(pseudo-)random, floating point numbers between 0 and 1.
cmd: 'rand :: Fractional a => Pattern a '
paramTypes: []
returnType: 'Pattern a '
links:
- 'https://tidalcycles.org/index.php/rand'
type: fun
irand:
help: >-
`irand` is similar to `rand`, but generates a `Oscillators|continuous
oscillator` of (pseudo-)random integers between 0 to n-1 inclusive. Notably
used to pick random samples from a folder.
cmd: 'irand :: Num a => Int -> Pattern a'
paramTypes:
- Int
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/irand'
type: fun
randcat:
help: >-
`randcat` is similar to `cat`, but rather than playing the given patterns in
order, it picks them at random.
cmd: 'randcat :: [Pattern a] -> Pattern a'
paramTypes:
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/randcat'
type: fun
randslice:
help: >-
`randslice` chops the sample into the given number of pieces and then plays
back a random one each cycle:
cmd: 'randslice :: Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/randslice'
type: fun
range:
help: >-
`range` will take a pattern which goes from 0 to 1 (such as `sine`), and
scale it to a different range - between the first and second arguments. In
the below example, range 1 1.5 shifts the range of sine from 0 - 1 to 1 -
1.5.
cmd: 'range :: Num a => Pattern a -> Pattern a -> Pattern a -> Pattern a'
paramTypes:
- Pattern a
- Pattern a
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/range'
type: fun
rangex:
help: >-
`rangex` is an exponential version of range described above, good to use for
frequencies. For example, range 20 2000 "0.5" will give 1010 - halfway
between 20 and 2000. But rangex 20 2000 0.5 will give 200 - halfway between
on a logarithmic scale. This usually sounds better if you’re using the
numbers as pitch frequencies. Since rangex uses logarithms, don’t try to
scale things to zero or less!
cmd: 'rangex :: (Floating b, Functor f) => b -> b -> f b -> f b'
paramTypes:
- b
- b
- f b
returnType: f b
links:
- 'https://tidalcycles.org/index.php/rangex'
type: fun
repeatCycles:
help: >-
`repeatCycles` is function that repeats each cycle of a given pattern a
given number of times.. It takes two inputs, the number of repeats, and the
pattern you are transforming.
cmd: 'repeatCycles :: Int -> Pattern a -> Pattern'
paramTypes:
- Int
- Pattern a
returnType: Pattern
links:
- 'https://tidalcycles.org/index.php/repeatCycles'
type: fun
rev:
help: '`rev` returns a `reversed` version of the given pattern.'
cmd: 'rev :: Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/rev'
type: fun
rot:
help: >-
The `rot` function `rotates` the values in a pattern, while preserving its
structure.
cmd: 'rot :: Ord a => Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/rot'
type: fun
run:
help: >-
The `run` function generates a pattern representing a cycle of numbers from
0 to n-1 inclusive. Notably used to ‘run’ through a folder of samples in
order:
cmd: 'run :: (Num a, Enum a) => Pattern a -> Pattern a '
paramTypes:
- Pattern a
returnType: 'Pattern a '
links:
- 'https://tidalcycles.org/index.php/run'
type: fun
scan:
help: >-
`scan` is similar to `run`, but starts at 1 for the first cycle, adding an
additional number each cycle until it reaches n
cmd: 'scan :: (Num a, Enum a) => Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/scan'
type: fun
scale:
help: '`Not to be confused with `range`.`'
cmd: 'scale :: Num a => Pattern String -> Pattern Int -> Pattern a'
paramTypes:
- Pattern String
- Pattern Int
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/scale'
type: fun
scaleList:
help: >-
The `scaleList` function outputs all the available scales, at the time of
writing:
cmd: 'scaleList :: String'
paramTypes: []
returnType: String
links:
- 'https://tidalcycles.org/index.php/scaleList'
type: fun
getScale:
help: >-
You can build your own `scale` function with additional scales if you wish,
using getScale.
cmd: >-
getScale :: Num a => [(String, [a])] -> Pattern String -> Pattern Int ->
Pattern a
paramTypes:
- '[(String, [a])]'
- Pattern String
- Pattern Int
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/getScale'
type: fun
toScale:
help: 'd1 $ n (toScale `0,2,3,5,7,8,10` "0 1 2 3 4 5 6 7") # sound "superpiano"'
cmd: 'toScale :: Num a => [a] -> Pattern Int -> Pattern a'
paramTypes:
- '[a]'
- Pattern Int
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/toScale'
type: fun
scramble:
help: >-
`scramble` takes a number and a pattern as input, divides the pattern into
the given number of parts, and returns a new pattern by randomly selecting
from the parts. This could also be called "sampling with replacement".
cmd: 'scramble :: Int -> Pattern a -> Pattern a'
paramTypes:
- Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/scramble'
type: fun
segment:
help: >-
`segment` `samples` the pattern at a rate of n events per cycle. Useful for
turning a continuous pattern into a discrete one.
cmd: 'segment :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/segment'
type: fun
seqP:
help: >-
`seqP` allows you sequence patterns, with start and end times. The code
below contains three separate patterns in a “stack”, but each has different
start times (zero cycles, eight cycles, and sixteen cycles, respectively).
cmd: 'seqP :: [(Time, Time, Pattern a)] -> Pattern a'
paramTypes:
- '[(Time, Time, Pattern a)]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/seqP'
type: fun
seqPLoop:
help: >-
A third option is to use `seqPLoop` instead, which will keep looping the
sequence when it gets to the end:
cmd: 'seqPLoop :: [(Time, Time, Pattern a)] -> Pattern a'
paramTypes:
- '[(Time, Time, Pattern a)]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/seqPLoop'
type: fun
shuffle:
help: >-
`shuffle` takes a number and a pattern as input, divides the pattern into
the given number of parts, and returns a new pattern as a random permutation
of the parts, picking one of each per cycle. This could also be called
"sampling without replacement".
cmd: 'shuffle :: Int -> Pattern a -> Pattern a'
paramTypes:
- Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/shuffle'
type: fun
silence:
help: >-
`silence` is the empty pattern, it contains nothing, nada. It`s still
useful, though!
cmd: 'silence :: Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/silence'
type: fun
splice:
help: >-
`splice` is similar to slice, but the slices are automatically pitched up or
down to fit their `slot`.
cmd: 'splice :: Int -> Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Int
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/splice'
type: fun
slow:
help: >-
`slow` slows down a pattern. For example, the following will play the sound
pattern "bd sn kurt" twice as slow (i.e. so it repeats once every two
cycles), and the vowel pattern three times as slow:
cmd: 'slow :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/slow'
type: fun
smash:
help: >-
`smash` is a combination of `spread` and `striate` - it cuts the samples
into the given number of bits, and then cuts between playing the loop at
different speeds according to the values in the list.
cmd: 'smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- '[Pattern Time]'
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/smash'
type: fun
smooth:
help: >-
`smooth` blends between the numbers (rational or floating point) in a
pattern. It does linear interpolation, that is it will go in a straight line
from one number to the next. For example, smooth "1 2" will go from 1 to 2
and back to 1 again over one cycle, so that one quarter of the way through
it will have the value 1.5.
cmd: 'smooth :: Fractional a => Pattern a -> Pattern a'
paramTypes:
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/smooth'
type: fun
snowball:
help: >-
The `snowball` function recursively combines a pattern with a modified
version itself using a combination function over the given number of cycles.
Each passing cycle is one level deeper in the recursion and is based of all
the previous cycles.
cmd: >-
snowball :: Int -> (Pattern a -> Pattern a -> Pattern a) -> (Pattern a ->
Pattern a) -> Pattern a -> Pattern a
paramTypes:
- Int
- (Pattern a -> Pattern a -> Pattern a)
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/snowball'
type: fun
soak:
help: >-
The `soak` function applies the given function over the given number of
cycles.
cmd: 'soak :: Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- Int
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/soak'
type: fun
someCycles:
help: '`See also: `sometimes``'
cmd: 'someCycles :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/someCycles'
type: fun
someCyclesBy:
help: >-
As with sometimesBy, if you want to be specific, you can use someCyclesBy
and a number. For example someCyclesBy 0.93 (# speed 2) will apply the speed
control on average 93 cycles out of a hundred.
links:
- 'https://tidalcycles.org/index.php/someCyclesBy'
type: fun
sometimes:
help: '`See also: `someCycles``'
cmd: 'sometimes :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/sometimes'
type: fun
sometimesBy:
help: >-
If you want to be specific, you can use sometimesBy and a number, for
example sometimesBy 0.93 (# speed 2) to apply the speed control on average
93 times out of a hundred.
links:
- 'https://tidalcycles.org/index.php/sometimesBy'
type: fun
spin:
help: >-
`spin` will play the given number of copies of the given control pattern at
once. For n copies, each successive copy will be offset in time by an
additional 1/n of a cycle, and also panned in space by an additional n1/n.
This function works particularly well on multichannel systems.
cmd: 'spin :: Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/spin'
type: fun
spread:
help: The `spread` function allows you to take a pattern transformation
cmd: 'spread :: (a -> t -> Pattern b) -> [a] -> t -> Pattern b'
paramTypes:
- (a -> t -> Pattern b)
- '[a]'
- t
returnType: Pattern b
links:
- 'https://tidalcycles.org/index.php/spread'
type: fun
fastspread:
help: >-
`fastspread` works the same as `spread`, but the result is squashed into a
single cycle. If you gave four values to `spread`, then the result would
seem to speed up by a factor of four. Compare these two:
links:
- 'https://tidalcycles.org/index.php/fastspread'
type: fun
spreadChoose:
help: >-
`spreadChoose` (alias `spreadr`) works the same as `spread`, but the values
are selected at random, one cycle at a time.
links:
- 'https://tidalcycles.org/index.php/spreadChoose'
type: fun
stack:
help: >-
`stack` takes a list of patterns and combines them into a new pattern by
layering them up - effectively playing all of the patterns in the list
simultaneously.
cmd: 'stack :: [Pattern a] -> Pattern a'
paramTypes:
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/stack'
type: fun
overlay:
help: >-
The `overlay` function is similar to `cat` described above, but combines two
patterns, rather than a list of patterns.
cmd: 'overlay :: Pattern a -> Pattern a -> Pattern a'
paramTypes:
- Pattern a
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/overlay'
type: fun
striate:
help: >-
`striate` is a kind of granulator, cutting samples into bits in a similar to
`chop`, but the resulting bits are organised differently.
cmd: 'striate :: Pattern Int -> ControlPattern -> ControlPattern'
paramTypes:
- Pattern Int
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/striate'
type: fun
striateBy:
help: >-
`striateBy` is a variant of striate. with an extra parameter, which
specifies the length of each part. striate still scans across the sample
over a single cycle, but if each bit is longer, it creates a sort of
stuttering effect.
cmd: >-
striateBy :: Pattern Int -> Pattern Double -> ControlPattern ->
ControlPattern
paramTypes:
- Pattern Int
- Pattern Double
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/striateBy'
type: fun
stripe:
help: >-
The `stripe` function repeats a pattern at random speeds. The first
parameter gives the number of cycles to operate over, for example stripe 2
will repeat a pattern twice, over two cycles. Each cycle will be played at a
random speed, but in such a way that the total duration will be the same.
cmd: 'stripe :: Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/stripe'
type: fun
slowstripe:
help: The `slowstripe` function is the same as `stripe` but the result is also
cmd: 'slowstripe :: Pattern Int -> Pattern a -> Pattern a'
paramTypes:
- Pattern Int
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/slowstripe'
type: fun
struct:
help: '`struct` places a rhythmic `boolean` structure on the pattern you give it.'
cmd: 'struct :: Pattern Bool -> Pattern a -> Pattern a'
paramTypes:
- Pattern Bool
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/struct'
type: fun
stut:
help: >-
`stut` applies a type of delay to a pattern. It has three parameters, which
could be called depth, feedback and time. Depth is an integer and the others
floating point. This adds a bit of echo:
cmd: >-
stut :: Pattern Integer -> Pattern Double -> Pattern Rational ->
ControlPattern -> ControlPattern
paramTypes:
- Pattern Integer
- Pattern Double
- Pattern Rational
- ControlPattern
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/stut'
type: fun
stutWith:
help: >-
`stutWith` (formerly known as stut`) is similar to stut described above, but
instead of just decreasing volume to produce echoes, stutWith applies a
function each step and overlays the result delayed by the given time.
cmd: >-
stutWith :: Pattern Int -> Pattern Time -> (Pattern a -> Pattern a) ->
Pattern a -> Pattern a
paramTypes:
- Pattern Int
- Pattern Time
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/stutWith'
type: fun
superimpose:
help: >-
`superimpose` plays a modified version of a pattern `on top of` the original
pattern, resulting in the modified and original version of the patterns
being played at the same time.
cmd: 'superimpose :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/superimpose'
type: fun
swingBy:
help: >-
The function swingBy x n breaks each cycle into n slices, and then delays
events in the second half of each slice by the amount x, which is relative
to the size of the (half) slice. So if x is 0 it does nothing, 0.5 delays
for half the note duration, and 1 will wrap around to doing nothing again.
The end result is a shuffle or swing-like rhythm.
cmd: 'swingBy :: Pattern Time -> Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/swingBy'
type: fun
swing:
help: '`swing` is an alias for swingBy (1/3)'
cmd: 'swing :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/swing'
type: fun
trigger:
help: >-
The `trigger` function causes the pattern passed to it to be `reset` every
time its evaluated.
cmd: 'trigger :: Show a => a -> Pattern b -> Pattern b'
paramTypes:
- a
- Pattern b
returnType: Pattern b
links:
- 'https://tidalcycles.org/index.php/trigger'
type: fun
trunc:
help: >-
`trunc` truncates a pattern so that only a fraction of the pattern is
played.
cmd: 'trunc :: Pattern Time -> Pattern a -> Pattern a'
paramTypes:
- Pattern Time
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/trunc'
type: fun
ur:
help: >-
The `ur` function is designed for longer form composition, by allowing you
to create `patterns of patterns` in a repeating loop. It takes three
parameters -- how long the loop will take, a pattern giving the structure of
the composition, a lookup table for named patterns to feed into that
structure, and a second lookup table for named transformations/fx.
cmd: >-
ur :: Time -> Pattern String -> [(String, Pattern a)] -> [(String, Pattern a
-> Pattern a)] -> Pattern a
paramTypes:
- Time
- Pattern String
- '[(String, Pattern a)]'
- '[(String, Pattern a -> Pattern a)]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/ur'
type: fun
weave:
help: >-
`weave` applies one control pattern to a list of other control patterns,
with a successive time offset.
cmd: 'weave :: Time -> ControlPattern -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- ControlPattern
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/weave'
type: fun
weaveWith:
help: 'd1 $ weaveWith 3 (sound "bd `sn drum:2*2` bd*2 `sn drum:1`")'
cmd: 'weaveWith :: Time -> Pattern a -> [Pattern a -> Pattern a] -> Pattern a'
paramTypes:
- Time
- Pattern a
- '[Pattern a -> Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/weaveWith'
type: fun
wedge:
help: >-
`wedge` combines two patterns by squashing them into a single cycle. It
takes a ratio as the first argument. The ratio determines what percentage of
the pattern cycle is taken up by the first pattern. The second pattern fills
in the remainder of the pattern cycle.
cmd: 'wedge :: Time -> Pattern a -> Pattern a -> Pattern a'
paramTypes:
- Time
- Pattern a
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/wedge'
type: fun
when:
help: >-
Only `when` the given test function returns True the given pattern
transformation is applied. The test function will be called with the current
cycle as a number.
cmd: 'when :: (Int -> Bool) -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- (Int -> Bool)
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/when'
type: fun
whenmod:
help: >-
`whenmod` has a similar form and behavior to `every`, but requires an
additional number. It applies the function to the pattern, when the
remainder of the current loop number divided by the first parameter, is
greater or equal than the second parameter.
cmd: 'whenmod :: Int -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- Int
- Int
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/whenmod'
type: fun
within:
help: >-
Use `within` to apply a function to only a part of a pattern. `within` takes
two arguments: a start time and an end time, specified as floats between 0
and 1, which are applied to the relevant pattern. Note that the second
argument must be greater than the first for the function to have any effect.
cmd: 'within :: Arc -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a'
paramTypes:
- Arc
- (Pattern a -> Pattern a)
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/within'
type: fun
zoom:
help: >-
Plays a portion of a pattern, specified by the beginning and end of a time
span (known as an `arc`). The new resulting pattern is played over the time
period of the original pattern:
cmd: 'zoom :: (Time, Time) -> Pattern a -> Pattern a'
paramTypes:
- '(Time, Time)'
- Pattern a
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/zoom'
type: fun
anticipate:
help: An increasing comb filter.
cmd: 'anticipate :: Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/anticipate'
type: trn
anticipateIn:
help: >-
Same as anticipate though it allows you to specify the number of cycles
until dropping to the new pattern.
cmd: 'anticipateIn :: Time -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/anticipateIn'
type: trn
clutch:
help: Degrades the current pattern while undegrading the next.
cmd: 'clutch :: Time -> [Pattern a] -> Pattern a'
paramTypes:
- Time
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/clutch'
type: trn
clutchIn:
help: '-'
cmd: 'clutchIn :: Time -> Time -> [Pattern a] -> Pattern a'
paramTypes:
- Time
- Time
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/clutchIn'
type: trn
interpolate:
help: '-'
cmd: 'interpolate :: Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/interpolate'
type: trn
interpolateIn:
help: '-'
cmd: 'interpolateIn :: Time -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/interpolateIn'
type: trn
jump:
help: >-
Jumps directly into the given pattern, this is essentially the
''no_transition''-transition.
Variants of jump provide more useful capabilities, see jumpIn and jumpMod.
cmd: 'jump :: Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/jump'
type: trn
jumpIn:
help: >-
Takes the identifier of the ControlPattern track and an integer
''cycleCount''. It will jump '''unaligned''' into the given pattern after
''cycleCount'' cycles have completed.
cmd: 'jumpIn :: Int -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Int
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/jumpIn'
type: trn
jumpIn':
help: >-
Unlike jumpIn the variant jumpIn' will only transition at cycle boundary
(e.g. when the cycle count is an integer).
cmd: 'jumpIn'' :: Int -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Int
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/jumpIn'''
type: trn
jumpMod:
help: Sharp jump transition at next cycle boundary where cycle mod n == 0.
cmd: 'jumpMod :: Int -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Int
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/jumpMod'
type: trn
histpan:
help: Pans the last n versions of the pattern across the field.
cmd: 'histpan :: Time -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/histpan'
type: trn
wait:
help: Just stop for a bit before playing new pattern.
cmd: 'wait :: Time -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/wait'
type: trn
waitT:
help: >-
Just as wait, waitT stops for a bit and then applies the given transition to
the playing pattern.
cmd: >-
waitT :: (Time -> [ControlPattern] -> ControlPattern) -> Time -> Time ->
[ControlPattern] -> ControlPattern
paramTypes:
- '(Time -> [ControlPattern] -> ControlPattern)'
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/waitT'
type: trn
wash:
help: >-
Washes away the current pattern after a certain delay by applying a function
to it over time, then switching over to the next pattern to which another
function is applied.
cmd: >-
wash :: (Pattern a -> Pattern a) -> (Pattern a -> Pattern a) -> Time -> Time
-> Time -> Time -> [Pattern a] -> Pattern a
paramTypes:
- (Pattern a -> Pattern a)
- (Pattern a -> Pattern a)
- Time
- Time
- Time
- Time
- '[Pattern a]'
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/wash'
type: trn
washIn:
help: '-'
cmd: >-
washIn :: (Pattern a -> Pattern a) -> Time -> Time -> [Pattern a] -> Pattern
a
paramTypes:
- (Pattern a -> Pattern a)
- Time
- Time
- '[Pattern a]'
returnType: 'Pattern a '
links:
- 'https://tidalcycles.org/index.php/washIn'
type: trn
xfade:
help: >-
Applies a crossfade over 4 cycles, and fades one pattern out while fading a
new pattern in.
cmd: 'xfade :: Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/xfade'
type: trn
xfadeIn:
help: >-
Applies a crossfade, and fades one pattern out while fading a new pattern
in.
cmd: 'xfadeIn :: Time -> Time -> [ControlPattern] -> ControlPattern'
paramTypes:
- Time
- Time
- '[ControlPattern]'
returnType: ControlPattern
links:
- 'https://tidalcycles.org/index.php/xfadeIn'
type: trn
sine:
help: A sine wave.
cmd: 'sine :: Fractional a => Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/sine'
type: osc
cosine:
help: 'A cosine wave, i.e. a sine shifted in time by a quarter of a cycle.'
cmd: 'cosine :: Fractional a => Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/cosine'
type: osc
square:
help: 'A squarewave, starting at 0, then going up to 1 halfway through a cycle.'
cmd: 'square :: Fractional a => Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/square'
type: osc
tri:
help: >-
A triangle wave, starting at 0, then linearly rising to 1 halfway through a
cycle, then down again.
cmd: 'tri :: Fractional a => Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/tri'
type: osc
saw:
help: >-
A sawtooth wave starting at 0, then linearly rising to 1 over one cycle,
then jumping back to 0.
cmd: 'saw :: Fractional a => Pattern a'
paramTypes: []
returnType: Pattern a
links:
- 'https://tidalcycles.org/index.php/saw'
type: osc
const request = require('request');
const fs = require('fs');
const yaml = require('js-yaml');
Promise.all([
getFunctions('Control_Functions'),
getFunctions('Functions'),
getFunctionsFromList('List_of_Transitions'),
getFunction(840) // Oscillators
]).then(res => {
const all = res[0].map(withType('ctl'))
.concat(
res[1].map(withType('fun'))
).concat(
res[2].map(withType('trn'))
).concat(
res[3].map(withType('osc'))
);
all.forEach(f => console.log(f.name));
const json = JSON.stringify(all,null,2);
const yml = yaml.dump(asObject(all));
fs.writeFileSync("./functions.json", json);
fs.writeFileSync('./functions.yaml', yml);
console.log("all done");
console.log(json);
});
Object.defineProperty(Array.prototype, 'flat', {
value: function(depth = 1) {
return this.reduce(function (flat, toFlatten) {
return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);
}, []);
}
});
Object.defineProperty(String.prototype, 'containsIgnoreCase', {
value: function(search) {
return this.toLowerCase().indexOf(search.toLowerCase()) >= 0;
}
});
function withType(type) {
return p => {
p.type = type;
return p;
}
}
function asObject(functions) {
// for yaml we don't use a list but rather
// a big object with the function names as
// keys.
const obj = {};
functions.forEach(f => {
obj[f.name] = f;
delete obj[f.name].name;
});
return obj;
}
// get all functions listed on pages with the given gategory
function getFunctions(category) {
return new Promise((resolve,reject) => {
request.get({
url: "https://tidalcycles.org/api.php?action=query&format=json&list=categorymembers&cmtitle=Category%3A" + category + "&cmtype=page&cmlimit=200",
json: true,
headers: {'User-Agent': 'request'}
}, async function(err, res, data) {
if (err) {
reject(err);
} else {
let allFunctions = []
let pages = data.query.categorymembers
.filter(c => /^[a-z'][a-zA-Z']+$/.test(c.title));
for (var i = 0; i < pages.length; i++) {
const functions = await getFunction(pages[i].pageid);
allFunctions = allFunctions.concat(functions);
console.log("done " + pages[i].title);
}
resolve(allFunctions);
}
});
});
}
function getFunctionsFromList(list) {
return new Promise((resolve,reject) => {
request.get({
url: "https://tidalcycles.org/api.php?action=parse&format=json&page=" + list +
"&prop=sections|displaytitle|wikitext|iwlinks|categories&",
json: true,
headers: {'User-Agent': 'request'}
}, async function(err, res, data) {
if (err) {
reject(err);
} else {
let text = data.parse.wikitext["*"];
const pattern = RegExp(/\|\[\[([^\]]*)\]\]\s*\|<code>([^<]*)<\/code>\s*\|([^|]+)/g);
let match = pattern.exec(text);
const funcs = []
while (match != null) {
const name = match[1];
const type = match[2];
const cmd = name + " :: " + type;
const parsed = parseCmd(cmd);
funcs.push({
name: name,
help: match[3].trim(),
cmd: cmd,
paramTypes: parsed[0],
returnType: parsed[1],
links: ["https://tidalcycles.org/index.php/" + name]
});
match = pattern.exec(text);
}
console.log("done " + list);
resolve(funcs)
}
});
});
}
// get all functions listed on the page with the given pageid
function getFunction(id) {
return new Promise((resolve,reject) => {
const url = "https://tidalcycles.org/api.php?action=parse&format=json&pageid=" + id + "&prop=sections%7Cdisplaytitle%7Cwikitext%7Ciwlinks%7Ccategories&sectiontitle=";
request.get({
url: url,
json: true,
headers: {'User-Agent': 'request'}
}, (err, res, data) => {
if (err) {
reject(err);
return;
}
if (!data.parse) {
console.error("Nothing parsed in ", id, JSON.stringify(data));
resolve([]);
return;
}
const funcs = [];
const text = data.parse.wikitext["*"].trim();
const root = parseFunction(data.parse.title, text);
if (root) {
funcs.push(root);
}
data.parse.sections.forEach(s => {
const sectionTitle = s.line;
const sectionText = text.substring(text.indexOf("= " + sectionTitle));
const sect = parseFunction(sectionTitle, sectionText);
if (sect) {
funcs.push(sect);
}
});
resolve(funcs);
});
});
}
function parseFunction(name, text) {
const obj = {};
const lines = text.split('\n').map(l => l.trim());
obj.name = name;
// try to find the first 'normal' sentence to use as help text
obj.help = lines.find(l => l.length > 0 && !l.startsWith("[") &&
!l.startsWith("{") && !l.startsWith("<") && !l.startsWith("=")
&& !l.startsWith("#"));
if (!obj.help) {
return null;
}
obj.help = removeExampleSentence(obj.help
// this remove most formatting from the desc string
.replace(/<[^>]*>/g,'')
.replace(/('){1,3}|(\[){1,2}|(\]){1,2}/g,'`')
);
let type = parseType(lines);
if (type) {
obj.cmd = type;
const parsed = parseCmd(obj.cmd);
obj.paramTypes = parsed[0];
obj.returnType = parsed[1];
// a safeguard for sections which are just
// sections but not additional functions
// listed on a page
if(!obj.cmd.startsWith(name)) {
return null;
}
}
obj.links = ["https://tidalcycles.org/index.php/" + name];
return obj;
}
function parseType(lines) {
const signature = lines.find(l => l.startsWith('[[Type') || l.startsWith('{{Type'));
if (signature) {
const matches = signature.match(/<[^>]*>([^<]*)</);
if (matches.length > 1) {
return matches[1];
}
}
return null;
}
// a lot of descriptions contain a last sample like "For example:"
// which is followed by - you guessed it - an example. We don't
// show these examples so those last sentences are useless.
function removeExampleSentence(text) {
if(!text.containsIgnoreCase('example')) {
return text;
}
let sentences = text.split('.');
let lastSentence = sentences.pop();
if (!lastSentence.containsIgnoreCase('example')) {
return text;
} else {
return sentences.join('.') + '.';
}
}
// Extract parameter and return types from a cmd declaration like
// > cmd :: Int -> (Pattern a -> Pattern a) -> Pattern a
// will be parsed as
// > returnType = Pattern a
// > params = [Int, (Pattern a -> Pattern a)]
// the functions return both in an array:
// > [params, returnType]
function parseCmd(p) {
if (p.indexOf(' => ') > -1) {
p = p.substring(p.indexOf(' => ') + 4);
} else {
p = p.substring(p.indexOf('::') + 3);
}
const parsed = [];
let level = 0;
let current = "";
p.split(" -> ").forEach((part) => {
if (part.startsWith("(") || part.startsWith("[")) {
level++;
}
if (part.endsWith(")") || part.endsWith("]")) {
level--;
}
if (level == 0) {
current += part;
parsed.push(current);
current = "";
} else {
current += part + " -> ";
}
});
const result = parsed.pop();
return [parsed, result];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment