From: David Kastrup Date: Sat, 31 Aug 2013 12:11:32 +0000 (+0200) Subject: Issue 3648/1: Isolated durations in music sequences now stand for unpitched notes X-Git-Tag: release/2.19.0-1~151^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3dc88bc7db19bb06b89d8649d801f435f3bdd4d3;p=lilypond.git 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. --- 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: