From f86615677ce880b2c57bd2991384aa1c14a649d5 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Fri, 2 Sep 2011 17:12:00 +0200 Subject: [PATCH] time-modification needs to precede notations --- Filters/VLMusicXMLType.writer | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Filters/VLMusicXMLType.writer b/Filters/VLMusicXMLType.writer index da015c9..882db26 100755 --- a/Filters/VLMusicXMLType.writer +++ b/Filters/VLMusicXMLType.writer @@ -168,7 +168,7 @@ def _accidental(visual) accidental end -def _note(pitch, dur, visual, tuplet, tied) +def _note(pitch, dur, visual, tuplet, timeMod, tied) accidental = _accidental(visual) note = REXML::Element.new('note') if pitch == VL::NoPitch @@ -203,6 +203,9 @@ def _note(pitch, dur, visual, tuplet, tied) end notations.add_element 'tuplet', {'type' => (tuplet>0 ? 'start' : 'stop')} end + if timeMod + note.add_element timeMod + end if notations note.add_element notations end @@ -484,10 +487,11 @@ def _melody m.add_element(bk) tempAt = noteAt end - n = _note(note['pitch'], dur, note['visual'], note['tuplet'], note['tied'] || 0) + timeMod = nil if note['actualNotes'] - n.add_element _timeMod(note) + timeMod = _timeMod(note) end + n = _note(note['pitch'], dur, note['visual'], note['tuplet'], timeMod, note['tied'] || 0) stanza = 1 note['lyrics'].each do |syll| if syll['text']