Open Bacchushlg opened 6 years ago
Yes @Bacchushlg this is due to the short vertical gap between beam and stem. The gap is 7 pixels high with an interline value of 18 pixels. In BeamsBuilder class, the maxStemBeamGapY is set as 0.8 (which means 14 pixels for a 18-pixel interline). So, the actual vertical gap is about half of the maximum allowed gap.
Poor-quality scores often exhibit such vertical gaps between beam and stem. Here, we have a good-quality scan of a good-quality score (though not synthetic), for which the allowed vertical gap turns out to be too large.
In that precise case, we could use the fact that the candidate stem is on the opposite side of the other stems with respect to the beam and is very close (abscissa-wise) to another (opposite) stem. In that case, we could be much more strict on connection quality.
Stay tuned, I can see some additional lines of code coming... :-)
Done with commit 31398921da02e2c61cf380e608ee636e10fc4000
works perfect!
The problem came up again with this score: Your Song2.zip
Maybe the limits need to be adjusted a bit more?
In measure 10 the beams of the top piano staff connect to the bottom staff, too. This leads to fault rhythm analysis.