This repository was archived by the owner on Aug 11, 2026. It is now read-only.
Commit 4ff9fc4
fix: correct hierarchical position calculation in multi-cycle meters (#36)
- Fix bug where hierarchical position calculation pointed to pulses after query time
- Add pulse time validation and correction logic in get_musical_time()
- Implement _pulse_index_to_hierarchical_position() for reverse calculation
- Add comprehensive test for Issue #36 scenario
- Ensure fractional_beat values are calculated correctly for trajectory analysis
Resolves fractional_beat=0.0 clamping issue that affected musical time analysis
and trajectory curve visualization in multi-cycle meters with timing variations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4c4a16b commit 4ff9fc4
2 files changed
Lines changed: 85 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
475 | 505 | | |
476 | 506 | | |
477 | 507 | | |
| |||
550 | 580 | | |
551 | 581 | | |
552 | 582 | | |
553 | | - | |
| 583 | + | |
554 | 584 | | |
555 | 585 | | |
556 | 586 | | |
| |||
572 | 602 | | |
573 | 603 | | |
574 | 604 | | |
575 | | - | |
| 605 | + | |
576 | 606 | | |
577 | 607 | | |
578 | 608 | | |
579 | 609 | | |
580 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
581 | 625 | | |
582 | 626 | | |
583 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
0 commit comments