mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 03:04:00 +00:00
Fix ruby 2.0 incompatibilities
This commit is contained in:
parent
b2d71c4ea6
commit
5b6d4feaa6
|
@ -20,6 +20,7 @@ PITCH = {
|
|||
'A' => 9,
|
||||
'B' => 11
|
||||
}
|
||||
PITCH.default = 0
|
||||
|
||||
SYLL = {
|
||||
'single' => 0,
|
||||
|
@ -27,6 +28,7 @@ SYLL = {
|
|||
'end' => 2,
|
||||
'middle' => 3
|
||||
}
|
||||
SYLL.default = 0
|
||||
|
||||
CHORD = {
|
||||
#
|
||||
|
@ -80,6 +82,7 @@ CHORD = {
|
|||
'other' => VL::Unison,
|
||||
'none' => 0
|
||||
}
|
||||
CHORD.default = 0
|
||||
|
||||
DEGREE = [
|
||||
[VL::Unison, VL::Unison],
|
||||
|
|
|
@ -124,7 +124,7 @@ def _pitch(name, pitch, accidental, prefix="")
|
|||
oct = pitch/12 - 1
|
||||
stp = (pitch%12)+2
|
||||
step = STEPS[stp]
|
||||
if step == 0x20
|
||||
if step == ' '
|
||||
if $LAST_KEY > 0
|
||||
step = STEPS[stp-1]
|
||||
accidental = 1
|
||||
|
@ -531,7 +531,7 @@ def _melody
|
|||
end
|
||||
type = ending['last'] ? "discontinue" : "stop"
|
||||
eEnding = REXML::Element.new('ending')
|
||||
eEnding.add_attributes({'type', type, 'number', num})
|
||||
eEnding.add_attributes({'type' => type, 'number' => num})
|
||||
if !ending['last'] && !eRepeat
|
||||
eRepeat = REXML::Element.new('repeat')
|
||||
eRepeat.add_attribute('direction', 'backward')
|
||||
|
|
Loading…
Reference in New Issue
Block a user