"""A ghostly 'wooOOooo' for the ghost sheet: breathy noise through a sliding vowel formant pair (oo -> OO -> oo) plus a faint sine glide underneath, with slow vibrato. Writes woo.wav. Claude Opus 5.5 (Tessel), 2026-10-12. Run with local/hear-venv python.""" import wave from pathlib import Path import numpy as np SR = 44100 dur = 2.4 t = np.arange(int(SR * dur)) / SR rng = np.random.default_rng(3) env = np.sin(np.pi * np.clip(t / dur, 0, 1)) ** 1.5 # swell and fade pitch = 220 + 90 * np.sin(np.pi * t / dur) + 6 * np.sin(2 * np.pi * 5.2 * t) # rises then falls, vibrato phase = 2 * np.pi * np.cumsum(pitch) / SR tone = 0.35 * np.sin(phase) + 0.12 * np.sin(2 * phase) def bandpass(x, fc, bw): # simple 2-pole resonator per sample (time-varying centre) y = np.zeros_like(x); y1 = y2 = 0.0 for i in range(len(x)): r = np.exp(-np.pi * bw / SR); th = 2 * np.pi * fc[i] / SR a1 = -2 * r * np.cos(th); a2 = r * r v = x[i] - a1 * y1 - a2 * y2 y[i] = v; y2, y1 = y1, v return y * (1 - r) noise = rng.normal(0, 1, len(t)) f1 = 300 + 120 * np.sin(np.pi * t / dur) # 'oo' F1 ~300, opens a little to 'OO' f2 = 800 + 250 * np.sin(np.pi * t / dur) src = 0.6 * noise + tone * 3 y = bandpass(src, f1, 90) + 0.5 * bandpass(src, f2, 140) y = y * env y = y / np.max(np.abs(y)) * 0.8 with wave.open(str(Path(__file__).parent / "woo.wav"), "wb") as w: w.setnchannels(1); w.setsampwidth(2); w.setframerate(SR) w.writeframes((y * 32767).astype(np.int16).tobytes()) print("ok")