scripts/audio-utils.js — loop buffer: synth, measure, loop, export

createLoopBuffer builds a 4×0.5 s 440 Hz sine loop buffer (post-repair: constructs the AudioBuffer directly — no more leaked live AudioContext per call). Metric badges are asserted against sine theory: RMS 1/√2, peak 1.0, ZCR 2f/sr. The export badge encodes the buffer through exportBufferAsWav (io/wav tier) and re-decodes it in-page with decodeWav. Loop markers come from defineMultipleLoopPoints. Metric math node-verified 2026-07-02 with a duck-typed buffer (rms 0.70711, peak 0.9999998, zcr 0.019944).