tur/pattern
nil-value
(nil-value)
list-nil?
(list-nil? [lst :int])
cons
(cons [value :int next :int])
head
(head [lst :int])
tail
(tail [lst :int])
tidal-ok
(tidal-ok [x :int])
tidal-err
(tidal-err [e :int])
tidal-ok?
(tidal-ok? [r :ptr<void>])
tidal-err?
(tidal-err? [r :ptr<void>])
tidal-ok-val
(tidal-ok-val [r :ptr<void>])
tidal-err-val
(tidal-err-val [r :ptr<void>])
tidal-void
(tidal-void)
tidal-pat-new1
(tidal-pat-new1 [kind :int child :int])
tidal-pat-new2
(tidal-pat-new2 [kind :int c1 :int c2 :int])
tidal-pat-set-f
(tidal-pat-set-f [pat :int f :float])
tidal-pat-set-n
(tidal-pat-set-n [pat :int n :int])
tidal-pat-free-raw
(tidal-pat-free-raw [pat :int])
pattern-fast
(pattern-fast [p :int n :float])
speed up a pattern by factor n.
| p | pattern handle | |
| n | speed factor (e.g. 2.0 plays twice as fast) |
New pattern handle.
(pattern-fast p 2.0)
Since: TD4
pattern-slow
(pattern-slow [p :int n :float])
slow down a pattern by factor n.
| p | pattern handle | |
| n | slow factor (e.g. 2.0 plays half as fast, spans 2 cycles) |
New pattern handle.
(pattern-slow p 2.0)
Since: TD4
pattern-stack
(pattern-stack [p1 :int p2 :int])
overlay two patterns (union of events from both).
| p1 | first pattern handle | |
| p2 | second pattern handle |
New pattern handle whose events are the union of both patterns.
(pattern-stack p1 p2)
Since: TD4
pattern-cat
(pattern-cat [p1 :int p2 :int])
concatenate end-to-end (cycle through one per cycle).
| p1 | first pattern handle | |
| p2 | second pattern handle |
New pattern handle that cycles between p1 (even cycles) and p2 (odd cycles).
(pattern-cat p1 p2)
Since: TD4
pattern-rev
(pattern-rev [p :int])
reverse event order within a cycle.
| p | pattern handle |
New pattern handle with events in reversed temporal order.
(pattern-rev p)
Since: TD4
pattern-every
(pattern-every [n :int f :int p :int])
apply a transformation every nth cycle.
| n | cycle period; the transformation fires when (cycle % n == 0) | |
| f | transformed pattern handle (used on matching cycles) | |
| p | base pattern handle (used on all other cycles) |
New pattern handle. Note: This is a structural approximation. A full Tidal-style pattern-every accepts a combinator function; here f must be a pre-built pattern handle representing the transformed result.
(let [fast-p (pattern-fast p 2.0)]
(pattern-every 4 fast-p p))
Since: TD4
pattern-degrade
(pattern-degrade [p :int prob :float])
randomly drop events with given probability.
| p | pattern handle | |
| prob | probability of dropping each event (0.0 = keep all, 1.0 = drop all) |
New pattern handle.
(pattern-degrade p 0.5)
Since: TD4
pattern-free
(pattern-free [p :int])
free a pattern handle created by a combinator.
| p | pattern handle |
(pattern-free p)
Since: TD4