>From 7a18b8451f94efe722e6b446b9702f80eb391793 Mon Sep 17 00:00:00 2001 From: Richard Gay Date: Tue, 30 Mar 2010 16:56:00 +0200 Subject: [PATCH] includeGraceNotes: lyrics syllables of grace notes --- Documentation/notation/vocal.itely | 27 +++++++++++++++++++++++++++ lily/lyric-combine-music-iterator.cc | 3 +-- scm/define-context-properties.scm | 1 + 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index 34f6cc4..0182c7b 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -1152,6 +1152,33 @@ not work if prefixed with @code{\once}. It is necessary to use @code{\set} and @code{\unset} to bracket the lyrics where melismata are to be ignored. address@hidden Adding syllables to grace notes + +By default, grace notes (e.g. via @code{\grace}) do not get assigned +syllables when using @code{\lyricsto}. This behavior can be changed by +setting @code{includeGraceNotes} in the Lyrics context. + address@hidden,ragged-right,quote] +<< + { + f'4 \appoggiatura b'32 c''4 + \grace { f'16 [a'16] } c''2 + } + \addlyrics { + foo + \set includeGraceNotes = ##t + bar, + foo -- hoo bar + } +>> address@hidden lilypond + address@hidden +Even in cases when syllables are placed correctly, address@hidden causes warnings (@code{warning: Lyric +syllable does not have note.}) to be printed for syllables under grace +notes. + @subsubheading Switching to an alternative melody More complex variations in text underlay are possible. It is possible diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 7b304cf..ddf7fd1 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -293,14 +293,13 @@ Lyric_combine_music_iterator::process (Moment /* when */) set_music_context (0); } - if (music_context_ && (start_new_syllable () || (busy_moment_ >= pending_grace_moment_)) && lyric_iter_->ok ()) { Moment now = music_context_->now_mom (); - if (now.grace_part_) + if (!to_boolean (lyrics_context_->get_property ("includeGraceNotes")) && now.grace_part_) { pending_grace_moment_ = now; pending_grace_moment_.grace_part_ = Rational (0); diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 16b2538..e413aa8 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -267,6 +267,7 @@ string selector for tablature notation.") printed as numbers, but only as extender lines.") (implicitTimeSignatureVisibility ,vector? "break visibility for the default time signature.") + (includeGraceNotes ,boolean? "Do not ignore graces for @rinternals{Lyrics}.") (instrumentCueName ,markup? "The name to print if another instrument is to be taken.") (instrumentEqualizer ,procedure? "A function taking a string -- 1.6.4.4