audiveris
audiveris copied to clipboard
recognition of complex triole types (partely 8th notes)
These are 2 examples of complex trioles where a part of the notes are 8th within a triole consisting of 4th. Maybe it is possible to extend the calculation for trioles that it is able to handle such "complex" types, too?
This is not obvious to implement. Current policy is to link a triplet to either:
- 3 chords of identical duration
- or 2 chords in such configuration that one chord duration is the double of the other (e.g. an 1/8 and a 1/4)
If you manually move a triplet sign over a staff, you'll be able to see this policy at work, as you pass over the candidate chords.
We could change this policy for manual triplets to address your cases. I think it's doable. My main concern is about candidate triplets (those detected by OMR engine). They are often false positives, and the policy is here to reject these mistakes.
In both cases (engine vs manual), we don't know where to stop inspection abscissawise. In case you wonder, the horizontal brackets around a tuplet are meant to provide such information, but the engine is currently unable to retrieve them (most of the time they get caught by the OCR, before being considered as symbol candidates, this is bad luck!).
Currently, the engine searches incrementally the candidate chords that surround the tuplet sign, beginning by the closest ones in Euclidian distance. And it stops whenever a "legal" configuration has been found, or when the number of considered candidates gets too high (>3 I think for a triplet and 6 for a sixplet). In the case at hand, we should accept to consider up to 4 candidates around the triplet.
Question: How could we test if a sequence of chords is acceptable for a tuplet? My first idea is to compute their total duration and check if the (reduced?) rational value exhibits a numerator which is multiple of 3:
- 1/4 + 1/4 + 1/4 -> 3/4: OK (current policy)
- 1 + 1/2 -> 3/2: OK (current policy)
- 1/4 + 1/8 + 1/8 + 1/4 -> 6/8 = 3/4: OK (new policy) Your first case, left side of staves
- 3/8 + 1/8 + 1/4 -> 6/8 = 3/4: OK (new policy) Your second case, right side of staves
But look at this:
- 1/4 + 1/8 -> 3/8: OK, even though this might be the beginning of 1/4 + 1/8 + 1/8 + 1/4.
Fortunately, we can expect that the tuplet sign will be located between the middle chords abscissawise, hence the list of candidates being built should grow as follows:
- 1/8 not OK, hence we continue
- 1/8 + 1/8 -> 1/4: still not OK
- 1/8 + 1/8 + 1/4 (or 1/4 + 1/8 + 1/8) -> 2/4 still not OK
- 1/4 + 1/8 + 1/8 + 1/4 -> 3/4: OK !!!!!
I will try an implementation...
From my point of view it is not absolutely necessary to get an automatic detection of the above. But it would be fine to have the possibility to add triplets for the described cases manually. Maybe this could be done using the lasso: mark the concerned chords and assign the triplet sign to it. Might be easier to implement than the actual - very comfortable - way.