mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Check minimal length triplets for swing notes
This commit is contained in:
parent
d8fd57b94a
commit
7086678c38
|
@ -471,7 +471,7 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose
|
||||||
// Don't try to further shrink a minimal note
|
// Don't try to further shrink a minimal note
|
||||||
//
|
//
|
||||||
if (p.fDuration == kMinDuration)
|
if (p.fDuration == kMinDuration)
|
||||||
goto haveDuration;
|
goto checkTriplets;
|
||||||
//
|
//
|
||||||
// Prefer further triplets
|
// Prefer further triplets
|
||||||
//
|
//
|
||||||
|
@ -522,6 +522,7 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose
|
||||||
else
|
else
|
||||||
p.AlignToGrid(inBeat, kQuarterDur); // Align all others
|
p.AlignToGrid(inBeat, kQuarterDur); // Align all others
|
||||||
}
|
}
|
||||||
|
checkTriplets:
|
||||||
if (p.fVisual & VLNote::kTriplet) {
|
if (p.fVisual & VLNote::kTriplet) {
|
||||||
//
|
//
|
||||||
// Distinguish swing 8ths/16ths from triplets
|
// Distinguish swing 8ths/16ths from triplets
|
||||||
|
@ -552,12 +553,13 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose
|
||||||
// Second swing note (8th triplet -> 8th)
|
// Second swing note (8th triplet -> 8th)
|
||||||
//
|
//
|
||||||
p.fVisual &= ~VLNote::kTriplet;
|
p.fVisual &= ~VLNote::kTriplet;
|
||||||
} else if ((at % p.fDuration != 0)
|
} else if ((p.fDuration > kMinDuration) &&
|
||||||
|
((at % p.fDuration != 0)
|
||||||
|| (p.fDuration != c.fDuration
|
|| (p.fDuration != c.fDuration
|
||||||
&& 2*p.fDuration != c.fDuration)
|
&& 2*p.fDuration != c.fDuration)
|
||||||
|| (n!=e && n->fDuration != c.fDuration
|
|| (n!=e && n->fDuration != c.fDuration
|
||||||
&& n->fDuration != 2*c.fDuration
|
&& n->fDuration != 2*c.fDuration
|
||||||
&& 2*n->fDuration != c.fDuration)
|
&& 2*n->fDuration != c.fDuration))
|
||||||
) {
|
) {
|
||||||
//
|
//
|
||||||
// Get rid of awkward triplets
|
// Get rid of awkward triplets
|
||||||
|
|
Loading…
Reference in New Issue
Block a user