time-modification needs to precede notations

This commit is contained in:
Matthias Neeracher 2011-09-02 17:12:00 +02:00
parent 951d003ccf
commit f86615677c

View File

@ -168,7 +168,7 @@ def _accidental(visual)
accidental accidental
end end
def _note(pitch, dur, visual, tuplet, tied) def _note(pitch, dur, visual, tuplet, timeMod, tied)
accidental = _accidental(visual) accidental = _accidental(visual)
note = REXML::Element.new('note') note = REXML::Element.new('note')
if pitch == VL::NoPitch if pitch == VL::NoPitch
@ -203,6 +203,9 @@ def _note(pitch, dur, visual, tuplet, tied)
end end
notations.add_element 'tuplet', {'type' => (tuplet>0 ? 'start' : 'stop')} notations.add_element 'tuplet', {'type' => (tuplet>0 ? 'start' : 'stop')}
end end
if timeMod
note.add_element timeMod
end
if notations if notations
note.add_element notations note.add_element notations
end end
@ -484,10 +487,11 @@ def _melody
m.add_element(bk) m.add_element(bk)
tempAt = noteAt tempAt = noteAt
end end
n = _note(note['pitch'], dur, note['visual'], note['tuplet'], note['tied'] || 0) timeMod = nil
if note['actualNotes'] if note['actualNotes']
n.add_element _timeMod(note) timeMod = _timeMod(note)
end end
n = _note(note['pitch'], dur, note['visual'], note['tuplet'], timeMod, note['tied'] || 0)
stanza = 1 stanza = 1
note['lyrics'].each do |syll| note['lyrics'].each do |syll|
if syll['text'] if syll['text']