Found the problem with generated chord numbers and fixed it. Code could stand some factoring, though.
Wrote an approach that would reduce the complexity of limiting note traversal compared to simple list-based iteration that always restarts, but the code in ann.py is too unwieldy. Need to make it more elegant.