pub fn pulse_wave(phase: f32) -> f32
Cosine pulse: 0 at phase 0, 1 at phase 0.5, back to 0 at phase 1.