From 1615a3aa7ba0e338f11146b383c6918071bf64fd Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Thu, 17 May 2007 06:40:54 +0000 Subject: [PATCH] Distinguish MMA 82 vs 3 --- Sources/VLModel.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index f71ad68..352cacf 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -240,12 +240,24 @@ void VLNote::MMAName(std::string & name, VLFraction at, VLFraction dur, VLFracti bool grouped = dur==nextDur || (prevPart!=0 ? dur==prevPart : dur==prevDur); prop.PartialNote(at, dur, grouped, &part); + const char * durName; for (int d=0; sMMADur[d].fName; ++d) if (part == sMMADur[d].fVal) { - if (name.size()) - name += '+'; - name += sMMADur[d].fName; + durName = sMMADur[d].fName; + break; } + if (!strcmp(durName, "82")) { + // + // Distinguish 2nd pair of swing 8ths from regular triplet + // + const VLFraction kBeat(1, prop.fTime.fDenom); + VLFraction withinBeat = at % kBeat; + if (withinBeat != 2*kBeat/3) + durName = "3"; + } + if (name.size()) + name += '+'; + name += durName; prevPart = part; dur -= part; at += part;