diff --git a/Filters/VLMusicXMLType.reader b/Filters/VLMusicXMLType.reader index d9f141b..70340cd 100755 --- a/Filters/VLMusicXMLType.reader +++ b/Filters/VLMusicXMLType.reader @@ -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], diff --git a/Filters/VLMusicXMLType.writer b/Filters/VLMusicXMLType.writer index 882db26..612bfed 100755 --- a/Filters/VLMusicXMLType.writer +++ b/Filters/VLMusicXMLType.writer @@ -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')