Represent 5/24 as 1/8 + 1/8 triplet, not 1/4 triplet + 1/16 triplet

This commit is contained in:
Matthias Neeracher 2017-11-24 06:19:29 +01:00
parent 8cdf61cf07
commit aabd4facc1

View File

@ -5,7 +5,7 @@
// //
// (MN) Matthias Neeracher // (MN) Matthias Neeracher
// //
// Copyright © 2005-2011 Matthias Neeracher // Copyright © 2005-2017 Matthias Neeracher
// //
#include "VLModel.h" #include "VLModel.h"
@ -129,9 +129,11 @@ void VLNote::MakeRepresentable()
fDuration = part; fDuration = part;
return; return;
} else if (fVisual > kWhole && !nonTriplet && fDuration >= triplet) { } else if (fVisual > kWhole && !nonTriplet && fDuration >= triplet) {
if (fDuration == triplet || (fDuration-triplet) >= VLFraction(1,16)) {
fDuration = triplet; fDuration = triplet;
fVisual |= kTriplet; fVisual |= kTriplet;
return; return;
}
} }
part /= 2; part /= 2;
triplet /= 2; triplet /= 2;