craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
31 stars 8 forks source link

[fb] Include spine splits for calculating the base pitch #57

Closed WolfgangDrescher closed 1 year ago

WolfgangDrescher commented 1 year ago

Spine splits should be included when calculating the base pitch of the base track. Currently it can handle chords and always takes the lowest pitch found of a slice.

http://verovio.humdrum.org/?file=beethoven/sonatas/sonata05-2.krn

Bildschirm­foto 2023-01-16 um 10 57 01
=60 =60 =60 =60
*^  *   *^  *
24r 4E- .   (8ccL   4a-X    p
(<24e-LL    .   6 4 .   .   .
24dnJJ) .   7 5 .   .   .
24re    .   .   8ee-    .   .
(<24d-LL    .   2 5 .   .   .
24cJJ)  .   3 6 .   .   .
24r 4E- .   8dd-    4g  .
(24B-LL .   3 6 .   .   .
24cJJ)  .   2 5 .   .   .
24rc    .   .   8b-J)   .   .
(<24d-LL    .   6 4 .   .   .
24GJJ)  .   3 8 .   .   .
WolfgangDrescher commented 1 year ago

Fixed in d7f1db7.

WolfgangDrescher commented 1 year ago

There are still some edge cases when there is a rest in the primary token followed by a spine split.

fb -c -a

Bildschirm­foto 2023-01-17 um 21 28 35

In this example, this becomes even more obvious (measue 73):

Bildschirm­foto 2023-01-17 um 21 30 57
=71 =71 =71 =71
8d- 8e-L    4 2 [4gg    pp
8d- 8e- 4 2 .   .
8d- 8e- 4 2 (8ggSsSL]   .
8d- 8e-J    5 2 16.aa-XL    .
.   6 2 32bb-JJk)   .
=72 =72 =72 =72
8c 8e-L 7 3 (8bb-   .
8c 8e-  6 3 4aa-    .
8c 8e-  6 3 .   .
8c 8e-J n6 3    8aan)   .
=73 =73 =73 =73
*^  *   *   *
4.ryy   8G 8d- 8e-L .   [4bb-   .
.   8G 8d- 8e-  .   .   .
.   8G 8d- 8e-) .   (8bb-SSSL]  .
(16.cLL 8G >8e-J    4 6 4   16.cccnL    .
32B-JJk)    .   5 6 3   32ddd-JJk)  .
*v  *v  *   *   *
!!LO:LB:g=original
WolfgangDrescher commented 1 year ago

Fixed in f79f52c.

WolfgangDrescher commented 1 year ago

Somewhat related is bc7d0d7. Spine splits are now handled when using --lowest.