"""The Waypost: the harp's fifth piece, after a morning in the halflings' land (Asguld, 2026-10-15), where an old wanderer sat by a signpost to dragons and a witch's house and offered me a pouch that wasn't mine. A traveller's lilt: G mixolydian (the flat seventh makes it a road song rather than a hymn), 3/4 at quarter = 76. A walking A that stops on a question (the D chord), a B that climbs as if over a hill, then both again and A coming home. Intro, A, B, A, B, A-home. ~100 s, cut into <30 s clips like the others. My own tune. Claude Opus 5.5 (Tessel). local/hear-venv/Scripts/python.exe life/making/harp/harp_piece5.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 = {"G": "G2 D3 B3 D4 G4 B4", "C": "C2 G2 E3 G3 C4 E4", "F": "F2 C3 A3 C4 F4 A4", "Am7": "A2 E3 G3 C4 E4 G4", "D": "D2 A2 F#3 A3 D4 F#4"} PROG = ["G", "C", "G", "F", "C", "G", "Am7", "D"] INTRO = 2 SECTIONS = [("A", 2), ("B", 10), ("A", 18), ("B", 26), ("Aend", 34)] BARS = 43 # durations in eighths (bpb = 6) A = ("D4:2 G4:2 A4:2 C5:4 B4:2 G4:2 F4:2 G4:2 A4:6 " "B4:2 C5:2 D5:2 C5:2 A4:4 C5:2 B4:2 G4:2 A4:6") AEND = A.rsplit(" ", 1)[0] + " G4:6" B = ("D5:4 B4:2 C5:2 E5:2 D5:2 B4:4 G4:2 A4:2 C5:2 F5:2 " "E5:4 D5:2 B4:2 D5:2 G5:2 E5:2 D5:2 C5:2 A4:6") def chord(bar): if bar < INTRO or bar >= BARS - 2: return "G" return PROG[(bar - INTRO) % 8] def piece(): s = Song("The Waypost", "G mixolydian", 152, bars=BARS, bpb=6, seed=1975, tail=5.0, tempo="3/4, quarter 76") s.cfg = {"harp": dict(gain=0, hp=55, hi=5800, send=0.5), "mel": dict(gain=2, hp=170, hi=7000, send=0.5), "sparkle": dict(gain=-11, hp=600, hi=8000, send=0.75)} s.reverb = {"rt60": 3.6, "wet": -7.5, "dark": 0.84} # a lilt per bar: bass on one, then a rocking figure up and back pattern = [(0, 0, 0.60), (2, 2, 0.36), (3, 3, 0.33), (4, 4, 0.31), (5, 3, 0.25)] for bar in range(BARS - 1): notes = CH[chord(bar)].split() for beat, i, v in pattern: s.play("harp", S.pluck, bar, beat, notes[i], 6 if i == 0 else 3, v, pan=(i - 2.5) * 0.12, ring=4.2, bright=0.45) if 26 <= bar < 34 and bar % 2 == 1: # a little light on the second hill s.play("sparkle", S.pluck, bar, 4.5, notes[5], 2, 0.22, pan=0.3 if bar % 4 == 1 else -0.3, ring=3.0, bright=0.7) for name, bar in SECTIONS: ph = {"A": A, "B": B, "Aend": AEND}[name] s.line("mel", S.pluck, bar, ph, 0.58, pan=0.05, ring=3.6, bright=0.6) s.chord("harp", S.pluck, BARS - 1, 0, "G2 D3 B3 F4 G4 B4 D5 G5", 12, 0.5, spread=0.1, ring=5.5, bright=0.48) return s if __name__ == "__main__": harp_piece.piece = piece harp_piece.main(sys.argv[1])