[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Completion_heads_engraver and Completion_rests_engraver ignore picku
From: |
David Kastrup |
Subject: |
Re: Completion_heads_engraver and Completion_rests_engraver ignore pickup (Auftakt) |
Date: |
Tue, 24 Jan 2017 15:56:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Johannes Feulner <address@hidden> writes:
> Completion_heads_engraver and Completion_rests_engraver automatically
> split notes and rests at bar lines. However, they ignore notes and rests
> in pickups (Auftakt, partial bars).
>
> Here's an example demonstrating the behaviour for notes and rests. The
> current and the desired behavior are attached as PDF files.
>
> \version "2.18.0"
> \score {
> <<
> { \time 4/4 \partial 4 g1 g }
> { \time 4/4 \partial 4 r1 r }
> >>
> \layout {
> \context {
> \Voice
> \remove "Note_heads_engraver"
> \consists "Completion_heads_engraver"
> \remove "Rest_engraver"
> \consists "Completion_rest_engraver"
> }
> }
> }
>
> I made the following patches to produce the desired.pdf. The version can
> currently be tested on http://www.weblily.net
>
> However, I am not an expert on Lilypond to determine if this is a proper
> solution in general.
>
> index 34a985d..9f7a659 100644
> --- a/lily/completion-note-heads-engraver.cc
> +++ b/lily/completion-note-heads-engraver.cc
> @@ -116,7 +116,14 @@ Completion_heads_engraver::next_moment (Rational
> const ¬e_len)
> return Moment (0, 0);
> }
>
> - Moment result = *l - *e;
> + Moment result;
> + if (*e < 0) {
That looks ambiguous to me (if not to C++) since a Moment has both a
natural and a grace part.
--
David Kastrup