lilypond-user
[Top][All Lists]
Advanced

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

Re: Cue notes with lyrics?


From: Thomas Morley
Subject: Re: Cue notes with lyrics?
Date: Sat, 14 Feb 2015 14:48:50 +0100

2015-02-14 13:27 GMT+01:00 Rutger Hofman <address@hidden>:
> Good morning list,
>
> I would like to create cue notes with lyrics. I added lyric-event to the
> Score.quotedCueEventTypes but that gave me no lyrics. How should I go about
> this?
>
> Thanks,
>
> Rutger Hofman
> Amsterdam
>

Hi,

best I can currently think of is the code below.
Though, there is a _big_ drawback with it: You have to specify the
durations of the lyrics. Using \lyricsto will not work, as far as I
can tell.

\version "2.18.2"

cueLyr =
#(define-music-function
   (parser location what main-music) (string? ly:music?)
   (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
in Lyrics oriented by @var{dir}.")
   (make-music 'QuoteMusic
           'element main-music
           'quoted-context-type 'CueLyrics
           'quoted-context-id "cue-lyr"
           'quoted-music-name what
           ))

\layout {
  \context {
    \Score
    \accepts "CueLyrics"
    quotedCueEventTypes =
      #'(note-event rest-event tie-event
         beam-event tuplet-span-event
         dynamic-event slur-event lyric-event)
  }
  %% maybe other contexts have to accept "CueLyrics" as well!
  \context {
    \ChoirStaff
    \accepts "CueLyrics"
  }
  \context{
   \Lyrics
   \name CueLyrics
   \alias Lyrics
   fontSize = #-4
  }
}

oboeNotes = \relative c'' {
  c2 r8 d16\f f e g f a
  g8 g16 g g2.
}
\addQuote "oboe" { \oboeNotes }

lyr = \lyricmode {
  xy2 \skip8
  a16 b c d e f g8 a16 h i

}
\addQuote "lyr" { \lyr }


<<
  \new Staff \oboeNotes
  \new Lyrics \lyr

  \new Staff
    \new Voice
      \relative c'' {
        c2
        <<
        \cueDuring #"oboe" #UP { r2 }
        \cueLyr #"lyr" { r2 }
        >>
        g2 c,
      }
>>

HTH a bit,
  Harm



reply via email to

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