From 54ccf65947f97b82dd53b98c33a14f430230caee Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Wed, 25 Apr 2007 05:11:13 +0000 Subject: [PATCH] Fix transposition --- Sources/VLModel.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index 4790305..5b5c715 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -1122,6 +1122,15 @@ bool VLSong::IsNonEmpty() const void VLSong::Transpose(int semi) { + for (size_t measure=0; measurefPitch, semi); + TransposePinned(i->fRootPitch, semi); + } + } for (int pass=0; pass<2 && semi;) { int8_t low = 127; int8_t high = 0; @@ -1138,21 +1147,12 @@ void VLSong::Transpose(int semi) } } if (low < VLNote::kMiddleC-6 && high < VLNote::kMiddleC+7) - semi += 12; // Transpose an Octave up + semi = 12; // Transpose an Octave up else if (low > VLNote::kMiddleC+7 && high > VLNote::kMiddleC+16) - semi -= 12; // Transpose an Octave down + semi = -12; // Transpose an Octave down else break; // Looks like we're done } - for (size_t measure=0; measurefPitch, semi); - TransposePinned(i->fRootPitch, semi); - } - } } size_t VLSong::CountStanzas() const