X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fmusicxml2ly.py;h=ac5bd787a5792881519a14bed87d555b0ea3585e;hb=18e208cc23af6fc7f7c400c52e3db253530f8b7a;hp=0a100d3932f55cb86bb1fd5a151d76170424e792;hpb=0387f04497978e37b335a8b99eec905499d6ad0f;p=lilypond.git diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 0a100d3932..ac5bd787a5 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -341,6 +341,10 @@ def extract_score_information (tree): if "Dolet 3.4 for Sibelius" in software: conversion_settings.ignore_beaming = True progress (_ ("Encountered file created by Dolet 3.4 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored")) + # ditto for Dolet 3.5 + if "Dolet 3.5 for Sibelius" in software: + conversion_settings.ignore_beaming = True + progress (_ ("Encountered file created by Dolet 3.5 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored")) if "Noteworthy Composer" in software: conversion_settings.ignore_beaming = True progress (_ ("Encountered file created by Noteworthy Composer's nwc2xml, containing wrong beaming information. All beaming information in the MusicXML file will be ignored")) @@ -1837,8 +1841,9 @@ def musicxml_note_to_lily_main_event (n): # treated like an ordinary note pitch rest = n.get_maybe_exist_typed_child (musicxml.Rest) event = musicexp.RestEvent () - pitch = musicxml_restdisplay_to_lily (rest) - event.pitch = pitch + if options.convert_rest_positions: + pitch = musicxml_restdisplay_to_lily (rest) + event.pitch = pitch elif n.instrument_name: event = musicexp.NoteEvent () @@ -2573,7 +2578,7 @@ If the given filename is -, musicxml2ly reads from the command line. p.version = ('''%prog (LilyPond) @TOPLEVEL_VERSION@\n\n''' + -_ ("""Copyright (c) 2005--2008 by +_ ("""Copyright (c) 2005--2009 by Han-Wen Nienhuys , Jan Nieuwenhuizen and Reinhold Kainhofer @@ -2628,6 +2633,12 @@ information.""") % 'lilypond') dest = "convert_directions", help = _ ("do not convert directions (^, _ or -) for articulations, dynamics, etc.")) + p.add_option ('--nrp', '--no-rest-positions', + action = "store_false", + default = True, + dest = "convert_rest_positions", + help = _ ("do not convert exact vertical positions of rests")) + p.add_option ('--no-beaming', action = "store_false", default = True,