Open hajicj opened 6 years ago
Implicit triplet solutions are difficult in general, because they rely on musical patterns. Writers omit the triplet if it is "obvious" that there should be one, mostly in repeated patterns, but it is not clear what qualifies as a repeated pattern.
However, we can at least implement some special cases, like beamed groups of three. (Does NOT include groups interrupted by rests...)
The following algorithm should work after duration inference if a time signature is available:
0) Preprocessing.
1) Find measures with duration discrepancies.
2) Find implicit triplet candidates.
3) Decide which candidates to mark as implicit triplets.
If a time signature is not available, we have to guess it. But: to prefer guess it from the measures that do not contain potential triplets.
There are implicit triplets in page 15...