Tidal's pipe arithmetic operators (|+, |-, |*, |/) modify control values relative to an existing pattern value
Beyond |> (replace), Tidal provides |+, |-, |*, and |/ for arithmetic on control pattern values. |+ speed "1" adds 1 to the current speed value; combined with every 2, it doubles speed every other cycle without discarding the base value. The | symbol always goes on the side whose structure dominates. Combining arithmetic operators enables modulating parameters over time: every 3 (|- note "3") $ every 2 (|+ up "5") $ sound "arpy*4" |> note "0 2 4 5" creates a melody that shifts pitch by different intervals on different cycles.
Examples
// add 1 to speed every other cycle:
d1 $ every 2 (|+ speed "1") $ sound "arpy*4" |> speed "1"
// multiply speed by 1.5 every other cycle:
d1 $ every 2 (|* speed "1.5") $ sound "arpy*4" |> speed "1"
Assessment
Write a pattern where a sound plays at normal speed for 3 cycles, then at 3x speed on the 4th cycle, using arithmetic pipe operators. Avoid hardcoding the target speed.