From 13bdae7ad6eff3833e14e7c5b92fadf871e59d57 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 24 May 2010 16:05:31 +0000 Subject: [PATCH] Further refine triplet/swing distinction --- Resources/Info.plist | 40 ++++++++++++++++++++-------------------- Sources/VLModel.cpp | 7 +++++-- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Resources/Info.plist b/Resources/Info.plist index e74f009..2325265 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -2,25 +2,6 @@ - UTExportedTypeDeclarations - - - UTTypeDescription - VocalEasel song - UTTypeConformsTo - - public.content - com.apple.package - - UTTypeIdentifier - org.aereperennius.vocaleasel-song - UTTypeTagSpecification - - public.filename-extension - vlsong - - - CFBundleDevelopmentRegion English CFBundleDocumentTypes @@ -256,10 +237,29 @@ CFBundleSignature VçEz CFBundleVersion - 1.2 + 1.3a1 NSMainNibFile MainMenu NSPrincipalClass NSApplication + UTExportedTypeDeclarations + + + UTTypeConformsTo + + public.content + com.apple.package + + UTTypeDescription + VocalEasel song + UTTypeIdentifier + org.aereperennius.vocaleasel-song + UTTypeTagSpecification + + public.filename-extension + vlsong + + + diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index ae98f19..58ee351 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -449,6 +449,9 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose while (i!=e) { VLNoteList::const_iterator n = i; ++n; + VLNoteList::const_iterator n2 = n; + if (n2 != e) + ++n2; VLLyricsNote c = *i; // Current note, remaining duration VLLyricsNote p = c; // Next partial note @@ -536,8 +539,8 @@ void VLMeasure::DecomposeNotes(const VLProperties & prop, VLNoteList & decompose if ((p.fDuration == sw6 && (at % grid4 == 0)) || (swing16 && p.fDuration == sw12 && (at % grid8 == 0)) ) { - if (p.fDuration == c.fDuration && n!=e - && n->fDuration == p.fDuration + if (p.fDuration == c.fDuration && n2!=e + && n->fDuration == p.fDuration && n2->fDuration >= p.fDuration ) { ; // Triplet, not swing note } else {