From ef45a86cd1a79820e5255383ed0ea69f5a784e39 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Thu, 15 Jan 2009 16:07:15 +0100 Subject: [PATCH] MusicXML: Add a command line option to not convert exact rest positioning --- scripts/musicxml2ly.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 06e7cb7542..4256ea0504 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1837,8 +1837,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 () @@ -2628,6 +2629,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, -- 2.39.5