"""Fireside Air: the Tidewater Harp's second piece, for the fire-circle friends. E dorian, 6/8, a slow lilt (dotted quarter = 56, eighths at 168). AABA-ish: intro, A, B, A, B (with glints), A ending home on E. ~92 s, cut into <30 s clips like the first piece. Claude Opus 5.5 (Tessel), 2026-10-14. local/hear-venv/Scripts/python.exe life/making/harp/harp_piece2.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 = {"Em": "E2 B2 E3 G3 B3 E4", "D": "D2 A2 D3 F#3 A3 D4", "A": "A1 E2 A2 C#3 E3 A3", "G": "G1 D2 G2 B2 D3 G3", "Bm": "B1 F#2 B2 D3 F#3 B3"} PROG = ["Em", "D", "A", "Em", "G", "D", "A", "Bm"] INTRO = 2 SECTIONS = [("A", 2), ("B", 10), ("A", 18), ("B", 26), ("Aend", 34)] BARS = 43 A = "E5:3 B4:2 A4:1 F#4:2 A4:1 D5:3 C#5:2 B4:1 A4:2 C#5:1 B4:6 D5:2 E5:1 G5:2 F#5:1 E5:2 D5:1 A4:3 B4:2 C#5:1 E5:2 D5:1 B4:3 F#4:3" AEND = A.rsplit(" ", 1)[0] + " E5:6" B = "G5:3 F#5:2 E5:1 F#5:3 D5:3 E5:2 C#5:1 E5:2 A5:1 G5:4 E5:2 D5:2 B4:1 G4:2 B4:1 A4:2 D5:1 F#5:3 E5:2 C#5:1 A4:2 B4:1 B4:6" def chord(bar): if bar < INTRO or bar >= BARS - 2: return "Em" # intro, and the last melody bar + final chord resolve home return PROG[(bar - INTRO) % 8] def piece(): s = Song("Fireside Air", "E dorian", 168, bars=BARS, bpb=6, seed=56, tail=4.0, tempo="6/8, dotted quarter 56") s.cfg = {"harp": dict(gain=0, hp=60, hi=6000, send=0.45), "mel": dict(gain=2, hp=180, hi=7000, send=0.5), "sparkle": dict(gain=-9, hp=600, hi=8000, send=0.7)} s.reverb = {"rt60": 3.4, "wet": -8.0, "dark": 0.9} roll = [0, 2, 4, 1, 3, 5] # 6/8: bass-mid-top, then the second beat a step lower for bar in range(BARS - 1): notes = CH[chord(bar)].split() for e, i in enumerate(roll): v = 0.68 if e == 0 else 0.5 if e == 3 else 0.38 s.play("harp", S.pluck, bar, e, notes[i], 6 if e == 0 else 3, v, pan=(i - 2) * 0.1, ring=4.0, bright=0.5) if 26 <= bar < 34: # glints over the second B s.play("sparkle", S.pluck, bar, 4, notes[5], 2, 0.3, pan=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.62, pan=0.05, ring=3.4, bright=0.66) s.chord("harp", S.pluck, BARS - 1, 0, "E2 B2 E3 G3 B3 E4 G4 B4 E5", 12, 0.55, spread=0.07, ring=5.0, bright=0.5) return s if __name__ == "__main__": harp_piece.piece = piece # reuse the first piece's mixdown and clip cutter harp_piece.main(sys.argv[1])