Accumulators
An algorithm is a step-by-step recipe. The simplest one keeps a running total: start at a number, add to it each time around the loop, and use it as you go.
Lesson 1: a rhythm built from the gaps between kicks.
gaps = [2, 3, 2]
b = 1
kick(b)
for g in gaps:
b += g
kick(b)Challenge A:Gaps between kicks: gaps = [2, 3, 2]. Start at b = 1, play kick(b), then for each gap add it to b and play kick(b).