mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Fix Sibelius/Dolet divisions and title
This commit is contained in:
parent
0658dada8e
commit
3bc7561152
|
@ -111,7 +111,7 @@ class MusicXMLListener
|
||||||
when 'score-timewise'
|
when 'score-timewise'
|
||||||
$stderr.puts "Can't read timewise MusicXML files yet"
|
$stderr.puts "Can't read timewise MusicXML files yet"
|
||||||
exit 1
|
exit 1
|
||||||
when 'work-title'
|
when 'work-title', 'movement-title'
|
||||||
@kind = 'textProp'
|
@kind = 'textProp'
|
||||||
@key = 'title'
|
@key = 'title'
|
||||||
when 'creator'
|
when 'creator'
|
||||||
|
@ -277,6 +277,17 @@ class MusicXMLListener
|
||||||
return volta
|
return volta
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def saneDivisions(props)
|
||||||
|
#
|
||||||
|
# Dolet for Sibelius is using something like 768 divisions per quarter
|
||||||
|
#
|
||||||
|
props.each do |prop|
|
||||||
|
if prop['divisions'] > 12
|
||||||
|
prop['divisions'] = 2 # Should do this a lot smarter
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def tag_end(tag)
|
def tag_end(tag)
|
||||||
#
|
#
|
||||||
# Interesting text nodes have @kind set
|
# Interesting text nodes have @kind set
|
||||||
|
@ -426,7 +437,7 @@ class MusicXMLListener
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when 'part'
|
when 'part'
|
||||||
OUTPUT['properties'] = @props unless @part == 'HARM'
|
OUTPUT['properties'] = saneDivisions(@props) unless @part == 'HARM'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user