Small pieces of code for Synesthesia.
A 0→1 ramp that resets exactly on a musical bar boundary, the backbone of seamless tempo-synced loops.