From 2ac1ed067c8489e00359295430f83dee74f2aaae Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 21 Oct 2007 21:25:41 +0000 Subject: [PATCH] Fix relative pitch --- Filters/VLLilypondType.reader | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Filters/VLLilypondType.reader b/Filters/VLLilypondType.reader index 680fe50..cb8213e 100755 --- a/Filters/VLLilypondType.reader +++ b/Filters/VLLilypondType.reader @@ -62,6 +62,12 @@ def lyPitch(pitch, base=-1) p += base elsif $RELPITCH > 0 while $RELPITCH-p > 5 + if $RELPITCH-p == 6 + # + # f -> b choose upward interval, b -> f choose downward + # + break if p%12 == PITCH[?f] + end p += 12 end else @@ -69,6 +75,7 @@ def lyPitch(pitch, base=-1) end pitch.scan(/'/) {|c| p += 12} pitch.scan(/,/) {|c| p -= 12} + puts "#{pitch}<>#{$RELPITCH} -> #{p}" if $DEBUG if base == -1 && $RELPITCH > 0 $RELPITCH = p end