"""Moonwater: the harp's third piece, for the island's housewarming (2026-10-14). F lydian, 4/4 at quarter = 72, eighths rolling up and back down like small waves; the raised fourth (B natural over F) keeps it floating instead of settling. Intro, A, B (higher, with glints), A ending home on F. ~90 s, cut into <30 s clips like the others. Claude Opus 5.5 (Tessel). local/hear-venv/Scripts/python.exe life/making/harp/harp_piece3.py OUTDIR """ import sys from pathlib import Path HERE = Path(__file__).resolve().parent sys.path.insert(0, str(HERE)) sys.path.insert(0, str(HERE.parent / "music")) import synth as S from pieces import Song import harp_piece CH = {"Fmaj7": "F2 C3 F3 A3 C4 E4", "G/F": "F2 D3 G3 B3 D4 G4", "Em7": "E2 B2 E3 G3 B3 D4", "Am7": "A1 E2 A2 C3 E3 G3", "Dm7": "D2 A2 D3 F3 A3 C4", "Cmaj7": "C2 G2 C3 E3 G3 B3"} PROG = ["Fmaj7", "G/F", "Em7", "Am7", "Dm7", "Cmaj7", "G/F", "G/F"] INTRO = 2 SECTIONS = [("A", 2), ("B", 10), ("Aend", 18)] BARS = 27 A = ("A4:3 C5:1 E5:4 D5:2 B4:2 G4:4 E5:3 D5:1 B4:2 G4:2 A4:6 C5:2 " "D5:3 F5:1 A5:2 F5:2 E5:4 G5:2 E5:2 D5:3 B4:1 D5:2 G5:2 B4:8") AEND = A.rsplit(" ", 1)[0] + " A4:8" B = ("C6:4 B5:2 A5:2 G5:6 D5:2 E5:2 G5:2 B5:4 A5:4 E5:4 " "F5:3 E5:1 D5:2 A4:2 G5:4 E5:2 C5:2 B4:2 D5:2 G5:2 B5:2 A5:4 G5:4") def chord(bar): if bar < INTRO or bar >= BARS - 2: return "Fmaj7" # intro, and the last melody bar + final chord: home return PROG[(bar - INTRO) % 8] def piece(): s = Song("Moonwater", "F lydian", 144, bars=BARS, bpb=8, seed=72, tail=4.5, tempo="4/4, quarter 72") s.cfg = {"harp": dict(gain=0, hp=60, hi=6000, send=0.5), "mel": dict(gain=2, hp=180, hi=7000, send=0.55), "sparkle": dict(gain=-9, hp=600, hi=8500, send=0.75)} s.reverb = {"rt60": 3.8, "wet": -7.5, "dark": 0.88} roll = [0, 2, 3, 4, 5, 4, 3, 2] # up to the top and back down: a small wave per bar for bar in range(BARS - 1): notes = CH[chord(bar)].split() for e, i in enumerate(roll): v = 0.64 if e == 0 else 0.46 if e == 4 else 0.34 s.play("harp", S.pluck, bar, e, notes[i], 8 if e == 0 else 3, v, pan=(i - 2.5) * 0.1, ring=4.2, bright=0.48) if 10 <= bar < 18: # moonlight glints over B s.play("sparkle", S.pluck, bar, 6, notes[5], 2, 0.28, pan=-0.3 if bar % 2 else 0.3, ring=3.2, bright=0.72) for name, bar in SECTIONS: ph = {"A": A, "B": B, "Aend": AEND}[name] s.line("mel", S.pluck, bar, ph, 0.6, pan=0.05, ring=3.6, bright=0.64) s.chord("harp", S.pluck, BARS - 1, 0, "F2 C3 F3 A3 C4 E4 G4 A4 C5", 16, 0.55, spread=0.08, ring=5.5, bright=0.5) return s if __name__ == "__main__": harp_piece.piece = piece harp_piece.main(sys.argv[1])