lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] includeGraceNotes: lyrics syllables of grace notes


From: Richard Gay
Subject: Re: [PATCH] includeGraceNotes: lyrics syllables of grace notes
Date: Sat, 10 Apr 2010 12:41:55 +0200

Thanks for all your help. Find attached a third version of my patch for
syllables under grace notes. Compared to the patch dated March 31, the
following has been done:

 * 2 regression tests added (a basic test and a lyric extender test),
 * different wording in the docs (according to the hints by Graham
   Percival),
 * few code formatting fix-ups and a simplification (thanks, Neil).

Currently I am facing a problem which I could not yet find a solution
to: In order to have syllables put under grace notes, I need to "\set
includeGraceNotes = ##t" before the syllable *preceding* the "grace
syllable" -- which might be counterintuitive and is a problem if the
grace note is the very first of a piece of music. Example:

  \relative c'' {
    \time 2/4
%    c2
    \grace { cis8 } d2
    \grace { dis8 } e2
  }
  \addlyrics {
    \set ignoreMelismata = ##t 
    \set includeGraceNotes = ##t
%    x
    foo bar
    fuu ba
  }

Here, the "foo" does not get put under the "cis8" grace note, but under
"d2". If one uncomments "c2" and "x", then the syllable assignment is
as expected ("x" under "c2", "foo" under "cis8").

Does anybody have a solution or a pointer to another lilypond construct
whose implementation I should have a look at?

Cheers,
Richard



On Sat, 3 Apr 2010 23:04:06 +0100, Neil Puttock <address@hidden>
wrote:
> Here are a few more comments on your patch:
> 
> address@hidden keine Silben zugeordnet. Dieses Verhalten kann
> 
> Two spaces following a full stop.
done

> +    \grace { f'16 [a'16] } c''2
> 
> +    \afterGrace c''2 { f'16 [a'16] }
> 
> f'16[
done

>               /* read */
>               "extendersOverRests ",
> +             "includeGraceNotes "
> 
> comma follows "includeGraceNotes "
done

> +Grob *get_current_note_head (Context *voice, bool includeGraceNotes);
> 
> bool include_grace_notes
done

> +      if (((end_mom->main_part_ > now.main_part_) ||
> +         (includeGraceNotes && (bool)now.grace_part_
> +          && end_mom->main_part_ == now.main_part_
> +          && end_mom->grace_part_ > now.grace_part_))
> 
> I think
> 
> (includeGraceNotes &&
>  end_mom->grace_part_ > now.grace_part_)
> 
> would be OK here
agree; done

> +           to_boolean (get_property ("includeGraceNotes")));
> 
> fix indent
done

> I think something similar to your docs example would be fine as a
> test case.
> 
> I'd add a separate test for extenders; perhaps something like the
> following snippet:
> 
> \version "2.13.18"
> 
> \relative c' {
>   c2 \grace { c16([ d e f] } g2)
> }
> \addlyrics {
>   \set includeGraceNotes = ##t
>   _ Ah __
> }
added exactly this example as regression test - thanks a lot!

Attachment: includeGraceNotes-lyrics-syllables-of-grace-notes.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]