lilypond-user
[Top][All Lists]
Advanced

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

Re: Cue notes with lyrics?


From: Rutger Hofman
Subject: Re: Cue notes with lyrics?
Date: Sun, 15 Feb 2015 15:37:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/14/2015 02:48 PM, Thomas Morley wrote:
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,
       }


Thanks Harm!

I will (also) study your code, there is a lot that will be instructive in any context.

Rutger





reply via email to

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