mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Further sanity checks against bad triplets
This commit is contained in:
parent
1eb64d2e55
commit
3c4bf6eeb6
|
@ -460,7 +460,9 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose
|
|||
// Prefer further triplets
|
||||
//
|
||||
if (prevTriplets) {
|
||||
if (p.fDuration >= 2*prevTripDur) {
|
||||
if (p.fDuration > 3*prevTripDur) {
|
||||
; // Not part of triplets
|
||||
} else if (p.fDuration >= 2*prevTripDur) {
|
||||
p.fDuration = 2*prevTripDur;
|
||||
if (prevTriplets == 1) {
|
||||
p.fVisual = prevVisual-1;
|
||||
|
@ -539,6 +541,9 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose
|
|||
} else if ((at % p.fDuration != 0)
|
||||
|| (p.fDuration != c.fDuration
|
||||
&& 2*p.fDuration != c.fDuration)
|
||||
|| (n!=e && n->fDuration != c.fDuration
|
||||
&& n->fDuration != 2*c.fDuration
|
||||
&& 2*n->fDuration != c.fDuration)
|
||||
) {
|
||||
//
|
||||
// Get rid of awkward triplets
|
||||
|
@ -1204,10 +1209,11 @@ static VLNoteList Realign(const VLNoteList & notes,
|
|||
}
|
||||
at += n.fDuration;
|
||||
}
|
||||
if (lastAt == at)
|
||||
if (lastAt == at) {
|
||||
alignedNotes.pop_back();
|
||||
else
|
||||
} else {
|
||||
alignedNotes.back().fDuration = at-lastAt;
|
||||
}
|
||||
|
||||
return alignedNotes;
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue
Block a user