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