Commit 4ce19b9
committed
fix: tuplet detection, nested polyrhythm migration, and staff notation layout
Migration (ArrangementMigrator.ts):
- Reduce actual/normal by greatestCommonDivisor before tuplet check so
ratios like 9:12 (gcd=3 → 3∉{2}) are correctly marked as tuplets.
- Detect nested polyrhythms (pr.start.polyrhythm !== undefined) in
collectMeasureSubdivisions and countMeasureVisibleSteps so they are
no longer lost due to incorrect global-position calculation.
Staff notation (App.scss, print.scss, StaffBarViewer.tsx,
StaffNoteViewer.tsx, StaffPrefixViewer.tsx, NoteImage.tsx, note.svg,
SelectionView.ts):
- Align staff-line offsets between prefix and note viewer rows.
- Reposition tuplet brackets, accent marks, and note-head stems for
consistent vertical alignment across the staff.
- Fix beam/tuplet hit-testing: individual note hits now take priority
over beam-group hits within the same row.
- Replace &-suffix SCSS selectors with full class names so grep can
find them, and nest child selectors under the parent scope.
- Add --note-flag-offset CSS variable support to SVG note flags.
- Increase oval stem stroke-width and final-barline thickness for
better visibility.
Test (O-Break-Salgueiro.spec.ts):
- Add migration test for "O-Break Salgueiro 2007" bar 4 covering all
nine tracks, including the Repinique's nested 2:1 inside a 3:4.
Signed-off-by: Mike Lischke <mike@lischke-online.de>1 parent c228b16 commit 4ce19b9
10 files changed
Lines changed: 344 additions & 100 deletions
File tree
- src
- assets/images/notes
- components/ui
- Bar/Staff
- Note
- framework
- core/serialisation/migration
- ui
- tests/core/serialisation/migration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | 498 | | |
500 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| |||
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
516 | | - | |
| 517 | + | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
| |||
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
| 556 | + | |
560 | 557 | | |
561 | 558 | | |
562 | 559 | | |
| |||
566 | 563 | | |
567 | 564 | | |
568 | 565 | | |
| 566 | + | |
569 | 567 | | |
570 | 568 | | |
571 | 569 | | |
| |||
577 | 575 | | |
578 | 576 | | |
579 | 577 | | |
| 578 | + | |
580 | 579 | | |
581 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
582 | 585 | | |
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
586 | | - | |
587 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
588 | 592 | | |
589 | 593 | | |
590 | 594 | | |
591 | 595 | | |
592 | | - | |
| 596 | + | |
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
| |||
646 | 650 | | |
647 | 651 | | |
648 | 652 | | |
649 | | - | |
| 653 | + | |
650 | 654 | | |
651 | 655 | | |
652 | 656 | | |
| |||
659 | 663 | | |
660 | 664 | | |
661 | 665 | | |
662 | | - | |
| 666 | + | |
663 | 667 | | |
664 | 668 | | |
665 | 669 | | |
| |||
683 | 687 | | |
684 | 688 | | |
685 | 689 | | |
686 | | - | |
687 | | - | |
| 690 | + | |
| 691 | + | |
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
| |||
738 | 742 | | |
739 | 743 | | |
740 | 744 | | |
741 | | - | |
| 745 | + | |
742 | 746 | | |
743 | 747 | | |
744 | 748 | | |
| |||
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
778 | | - | |
| 782 | + | |
779 | 783 | | |
780 | 784 | | |
781 | 785 | | |
| |||
802 | 806 | | |
803 | 807 | | |
804 | 808 | | |
| 809 | + | |
805 | 810 | | |
806 | 811 | | |
807 | 812 | | |
| |||
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
823 | | - | |
| 828 | + | |
824 | 829 | | |
825 | 830 | | |
826 | 831 | | |
| |||
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
837 | | - | |
| 842 | + | |
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
841 | 846 | | |
842 | 847 | | |
843 | | - | |
| 848 | + | |
844 | 849 | | |
845 | 850 | | |
846 | 851 | | |
847 | 852 | | |
848 | 853 | | |
849 | | - | |
850 | | - | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
851 | 857 | | |
852 | 858 | | |
853 | | - | |
854 | | - | |
| 859 | + | |
| 860 | + | |
855 | 861 | | |
856 | 862 | | |
857 | 863 | | |
858 | | - | |
| 864 | + | |
859 | 865 | | |
860 | 866 | | |
861 | 867 | | |
| |||
868 | 874 | | |
869 | 875 | | |
870 | 876 | | |
871 | | - | |
| 877 | + | |
872 | 878 | | |
873 | 879 | | |
874 | 880 | | |
| |||
917 | 923 | | |
918 | 924 | | |
919 | 925 | | |
920 | | - | |
| 926 | + | |
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
| |||
944 | 950 | | |
945 | 951 | | |
946 | 952 | | |
947 | | - | |
948 | | - | |
949 | | - | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
950 | 956 | | |
951 | 957 | | |
952 | | - | |
953 | 958 | | |
954 | 959 | | |
955 | 960 | | |
| |||
968 | 973 | | |
969 | 974 | | |
970 | 975 | | |
971 | | - | |
| 976 | + | |
972 | 977 | | |
973 | 978 | | |
974 | 979 | | |
| |||
1130 | 1135 | | |
1131 | 1136 | | |
1132 | 1137 | | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1137 | 1142 | | |
1138 | 1143 | | |
1139 | 1144 | | |
1140 | | - | |
| 1145 | + | |
1141 | 1146 | | |
1142 | 1147 | | |
1143 | 1148 | | |
1144 | | - | |
| 1149 | + | |
1145 | 1150 | | |
1146 | 1151 | | |
1147 | 1152 | | |
1148 | | - | |
| 1153 | + | |
1149 | 1154 | | |
1150 | 1155 | | |
1151 | 1156 | | |
| |||
1165 | 1170 | | |
1166 | 1171 | | |
1167 | 1172 | | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1168 | 1177 | | |
1169 | 1178 | | |
1170 | 1179 | | |
| |||
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| |||
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
459 | 469 | | |
460 | | - | |
461 | 470 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
471 | 481 | | |
472 | 482 | | |
473 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments