mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Sanitize broken syllabic information
This commit is contained in:
parent
fe39f675ba
commit
9ec2e9d50e
|
@ -219,6 +219,8 @@ void VLPlistVisitor::VisitChord(VLChord & c)
|
||||||
VLFraction at(0);
|
VLFraction at(0);
|
||||||
VLFraction tiedStart(0);
|
VLFraction tiedStart(0);
|
||||||
VLLyricsNote tiedNote;
|
VLLyricsNote tiedNote;
|
||||||
|
uint8_t prevKind[20];
|
||||||
|
memset(prevKind, 0, 20);
|
||||||
|
|
||||||
for (NSEnumerator * ne = [melody objectEnumerator];
|
for (NSEnumerator * ne = [melody objectEnumerator];
|
||||||
NSDictionary * ndict = [ne nextObject];
|
NSDictionary * ndict = [ne nextObject];
|
||||||
|
@ -262,6 +264,17 @@ void VLPlistVisitor::VisitChord(VLChord & c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sanitize syllabic information which was corrupt in early
|
||||||
|
// versions.
|
||||||
|
//
|
||||||
|
for (size_t i = 0; i<note.fLyrics.size(); ++i)
|
||||||
|
if (note.fLyrics[i].fText.size()) {
|
||||||
|
if (!(prevKind[i] & VLSyllable::kHasNext))
|
||||||
|
note.fLyrics[i].fKind &= ~VLSyllable::kHasPrev;
|
||||||
|
prevKind[i] = note.fLyrics[i].fKind;
|
||||||
|
}
|
||||||
|
|
||||||
tiedStart = at;
|
tiedStart = at;
|
||||||
tiedNote = note;
|
tiedNote = note;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user