From 3dc88bc7db19bb06b89d8649d801f435f3bdd4d3 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 31 Aug 2013 14:11:32 +0200 Subject: [PATCH] Issue 3648/1: Isolated durations in music sequences now stand for unpitched notes This allows for things like \new RhythmicStaff { 4 4. 8 4 | 4 \tuplet 3/2 { 2 4 } 4 } "unpitched" simply means that this is rendered as a normal NoteEvent, but the pitch information is missing and has to be filled in by some other means. The example using RhythmicStaff is not actually commendable as the MIDI rendition still requires a pitch or drum type. It's just that as of this patch, there are no immediately useful applications. The rhythmic shorthand { c4 4. 8 4 } is introduced by a later patch. --- lily/parser.yy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lily/parser.yy b/lily/parser.yy index cd8f999141..dfc961d6ae 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1081,6 +1081,18 @@ music_embedded: { $$ = $3; } + | multiplied_duration post_events + { + Music *n = MY_MAKE_MUSIC ("NoteEvent", @$); + + parser->default_duration_ = *unsmob_duration ($1); + n->set_property ("duration", $1); + + if (scm_is_pair ($2)) + n->set_property ("articulations", + scm_reverse_x ($2, SCM_EOL)); + $$ = n->unprotect (); + } ; music_embedded_backup: -- 2.39.5