From: Reinhold Kainhofer Date: Tue, 18 Nov 2008 20:49:46 +0000 (+0100) Subject: MusicXML: Fix single-note tuplets (e.g. on tremolo notes) X-Git-Tag: release/2.11.65-1~42 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7abe47776b2e33a8dd341cb5d15531baf897bd35;p=lilypond.git MusicXML: Fix single-note tuplets (e.g. on tremolo notes) Also remove duplicate code block --- diff --git a/input/regression/musicxml/12c-Tuplet-Styles.xml b/input/regression/musicxml/12c-Tuplet-Styles.xml new file mode 100644 index 0000000000..c8e063c2a2 --- /dev/null +++ b/input/regression/musicxml/12c-Tuplet-Styles.xml @@ -0,0 +1,957 @@ + + + + + + Different tuplet styles: + default, none, x:y, x:y-note; Each with bracket, slur and none. + Finally, non-standard 4:3 and 17:2 tuplets are given. + + + + + MusicXML Part + + + + + + + 408 + + 0 + major + + + + G + 2 + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + begin + + + + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + continue + + + + C + 5 + + 136 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + 114 + + + + + C + 5 + + 153 + 1 + eighth + + 4 + 3 + + begin + + + + + + + C + 5 + + 153 + 1 + eighth + + 4 + 3 + + continue + + + + C + 5 + + 153 + 1 + eighth + + 4 + 3 + + continue + + + + C + 5 + + 153 + 1 + eighth + + 4 + 3 + + end + + + + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + begin + + + + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + continue + + + + C + 5 + + 36 + 1 + eighth + + 17 + 3 + + end + + + + + + + C + 5 + + 204 + 1 + eighth + begin + + + + C + 5 + + 204 + 1 + eighth + end + + + light-heavy + + + + + diff --git a/input/regression/musicxml/12d-Tremolo-Tuplets.xml b/input/regression/musicxml/12d-Tremolo-Tuplets.xml new file mode 100644 index 0000000000..7a7792dfdd --- /dev/null +++ b/input/regression/musicxml/12d-Tremolo-Tuplets.xml @@ -0,0 +1,461 @@ + + + + + + Tremolo tuplets are tuplets on + single notes with a tremolo ornament. The application shall correctly + import these notes with 2/3 or their time... + + + + + MusicXML Part + + + + + + + 36 + + 0 + major + + + + G + 2 + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + begin + + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + continue + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + begin + + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + continue + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + begin + + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + continue + + + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + + + + G + 4 + + 36 + 1 + quarter + + + 3 + 2 + eighth + + + + + + 1 + + + + + + G + 4 + + 36 + 1 + quarter + + + 3 + 2 + eighth + + + + + + 1 + + + + + + G + 4 + + 36 + 1 + quarter + + + 3 + 2 + eighth + + + + + + 1 + + + + + + + + + G + 4 + + 72 + 1 + half + + + 6 + 4 + eighth + + + + + + 1 + + + + + + G + 4 + + 36 + 1 + quarter + + + 3 + 2 + eighth + + + + + + 1 + + + + + + + + + F + 4 + + 12 + 1 + eighth + + 3 + 2 + + begin + + + + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + continue + + + + A + 4 + + 12 + 1 + eighth + + 3 + 2 + + end + + + + + + + + + + + + + + A + 4 + + 72 + 1 + half + + + 6 + 4 + eighth + + + + + + 1 + + + + + + + + + G + 4 + + 72 + 1 + half + + + 6 + 4 + eighth + + + + + + 1 + + + + + + G + 4 + + 36 + 1 + quarter + + + 3 + 2 + eighth + + + + + + 1 + + + + + light-heavy + + + + + diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 08f2dc97ba..4a04cb4af8 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -618,7 +618,7 @@ def group_tuplets (music_list, events): new_list = [] last = 0 for (i1, i2, frac) in indices: - if i1 >= i2: + if i1 > i2: continue new_list.extend (music_list[last:i1]) @@ -2109,14 +2109,6 @@ def musicxml_voice_to_lily_voice (voice): is_beamed = True elif beam_ev.span_direction == 1: # beam and thus melisma ends here is_beamed = False - - if tuplet_event: - mod = n.get_maybe_exist_typed_child (musicxml.Time_modification) - frac = (1,1) - if mod: - frac = mod.get_fraction () - - tuplet_events.append ((ev_chord, tuplet_event, frac)) # Extract the lyrics if not rest and not ignore_lyrics: