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
This commit is contained in:
Michael Winter 2026-03-14 03:24:04 +01:00
parent cc3c1ab971
commit 0dbdfe02cb

View file

@ -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(