mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Fix relative pitch
This commit is contained in:
parent
9a9ca22d9a
commit
2ac1ed067c
|
@ -62,6 +62,12 @@ def lyPitch(pitch, base=-1)
|
||||||
p += base
|
p += base
|
||||||
elsif $RELPITCH > 0
|
elsif $RELPITCH > 0
|
||||||
while $RELPITCH-p > 5
|
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
|
p += 12
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -69,6 +75,7 @@ def lyPitch(pitch, base=-1)
|
||||||
end
|
end
|
||||||
pitch.scan(/'/) {|c| p += 12}
|
pitch.scan(/'/) {|c| p += 12}
|
||||||
pitch.scan(/,/) {|c| p -= 12}
|
pitch.scan(/,/) {|c| p -= 12}
|
||||||
|
puts "#{pitch}<>#{$RELPITCH} -> #{p}" if $DEBUG
|
||||||
if base == -1 && $RELPITCH > 0
|
if base == -1 && $RELPITCH > 0
|
||||||
$RELPITCH = p
|
$RELPITCH = p
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user