lilypond-user
[Top][All Lists]
Advanced

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

Re: Programming question


From: Thomas Morley
Subject: Re: Programming question
Date: Tue, 25 Nov 2014 18:54:03 +0100

2014-11-25 15:49 GMT+01:00 Jay Vara <address@hidden>:
> Trying to force the lyric in David's program to associate with the
> Staff/Voice, I added a name "jun" to the voice and see if that worked.
>
> noteNameToLyric =
>
> #(define-void-function (parser location lst) (list?)
>
> (let* ((str (t lst))
>
> (str (string-append "{ " str "}")))
>
> (display str) (newline)
>
> (ly:parser-include-string
>
> parser
>
> (string-append " \\new Lyrics \\lyricsto \"jun\" " str))))
>
> music = \relative c' { c4 d e f g a b c }
>
> \new Staff
>
> <<
>
> \new Voice = "jun" \music
>
> \noteNameToLyric \extractPitches \music
>
>>>
>
>
>
> In this case, the lyrics, that is the pitch numbers, did not show up at all!
> Wonder why?


Hi,

I couldn't get David's code to work either, would have been very elegant.
Though, attached my own attempt using Davids work and some recyceled
own codings.

Several comments inline.
And you'll still find some TODOs

HTH,
  Harm

Attachment: note-name-to-lyric.ly
Description: Text Data


reply via email to

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