home/ atoms/ tidal-applicative-structure-from-left

When two Tidal patterns are combined applicatively, the left pattern's structure is preserved and its events are matched with co-occurring right-hand events

Tidal patterns are applicative functors, so a binary function can be lifted to operate on values drawn from inside two patterns rather than on two bare values. The combination rule is asymmetric: it walks the events of the first (left) pattern and, for each, finds the events in the second pattern whose arcs contain that onset, then applies the function to each matched pair. Consequently the resulting pattern always maintains the structure (timing skeleton) of the left pattern; where a left event overlaps several right events, the count of results at that position multiplies. This asymmetry is a design choice a live coder must internalise: swapping operand order changes which pattern governs the rhythm of the result.

Examples

blend 0.5 <$> "[black grey white]" <> "red green" — structure follows the three-element left pattern; red matches the onsets of black and grey, green matches white.

Assessment

Given two patterns combined applicatively, predict which one determines the timing of the result and explain what happens when a left event overlaps two right events.

“the resulting pattern will always maintain the ‘struc- ture’ of the first pattern over time. However where an event in the left hand pattern matches w”
corpus · l3-l4-making-programming-languages-to-dance-to-live-coding-w · chunk 4