From 0dbdfe02cbd014dca3bc920164ee94b69e44cd3d Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Sat, 14 Mar 2026 03:24:04 +0100 Subject: [PATCH] Start target range from first chord average - Target now begins at average cents of starting chord - Progress adds target_octaves on top of starting position - More accurate register targeting --- src/graph.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/graph.py b/src/graph.py index 79f64bf..30bf276 100644 --- a/src/graph.py +++ b/src/graph.py @@ -362,8 +362,11 @@ class PathFinder: max_path = config.get("max_path", 50) target_cents = target_octaves * 1200 + start_avg_cents = sum(p.to_cents() for p in path[0].pitches) / len( + path[0].pitches + ) progress = len(path) / max_path - current_target = progress * target_cents + current_target = start_avg_cents + (progress * target_cents) current_chord = path[-1] current_avg_cents = sum(p.to_cents() for p in current_chord.pitches) / len(