mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Distinguish MMA 82 vs 3
This commit is contained in:
parent
b47ecf36b8
commit
1615a3aa7b
|
@ -240,12 +240,24 @@ void VLNote::MMAName(std::string & name, VLFraction at, VLFraction dur, VLFracti
|
||||||
bool grouped = dur==nextDur ||
|
bool grouped = dur==nextDur ||
|
||||||
(prevPart!=0 ? dur==prevPart : dur==prevDur);
|
(prevPart!=0 ? dur==prevPart : dur==prevDur);
|
||||||
prop.PartialNote(at, dur, grouped, &part);
|
prop.PartialNote(at, dur, grouped, &part);
|
||||||
|
const char * durName;
|
||||||
for (int d=0; sMMADur[d].fName; ++d)
|
for (int d=0; sMMADur[d].fName; ++d)
|
||||||
if (part == sMMADur[d].fVal) {
|
if (part == sMMADur[d].fVal) {
|
||||||
|
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())
|
if (name.size())
|
||||||
name += '+';
|
name += '+';
|
||||||
name += sMMADur[d].fName;
|
name += durName;
|
||||||
}
|
|
||||||
prevPart = part;
|
prevPart = part;
|
||||||
dur -= part;
|
dur -= part;
|
||||||
at += part;
|
at += part;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user