lilypond-user
[Top][All Lists]
Advanced

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

Re: Using lyrics in a markup


From: jakob lund
Subject: Re: Using lyrics in a markup
Date: Sun, 23 Jan 2011 21:46:31 +0100

2011/1/23 Jan-Peter Voigt <address@hidden>:
> Hello and thank you Jakob, hello list,
>
> this piece is a great work. It compiles well in 2.13(.47 lilybuntu) and adds 
> a very useful function to lily!
> The .ly is attached again, because I think it is good to have it on the 
> devel-list.
> I would like to add it to LSR to have it in the main distro once. But it 
> doesn't compile in 2.12(.3) stable, so it can't be uploaded right now.
> What else should we do now?
>
> Lilypond 2.12 complains about these lines:
> ...
> #(define-markup-command (verse layout props lyrics) (ly:music?)
> #:properties ((display-nl #f)
> (make-line make-justify-markup))
> ...
>
> by the way: Is this #:properties(()) notation a new functionality in 2.13? I 
> haven't seen it before?

You're probably right about the #:properties syntax -- it should be
easy enough to swap make-line and display-nl with their default values
(make-justify-markup resp. #f) in the macro code to make it compile in
2.12 (which I don't have installed so I'm not gonna test it) ... ?

> And is there a tutorial on all those comma- and accent-notations like in 
> \override #`(make-line . ,make-wordwrap-markup) ?
> I haven't found it in my scheme-tutorials.

I  think it's mostly connected to macro definitions, as a shortcut to
insert references into lists. If you write
  \override #'(make-line . make-wordwrap-markup)
you get en error:
  Wrong type to apply: make-wordwrap-markup
because then the value of the property is set to the SYMBOL
make-wordwrap-markup rather than FUNCTION referred to by that symbol.

As far as I know, `(make-line . ,make-wordwrap-markup) is the same as
(cons 'make-line make-wordwrap-markup), just like '(this that
the-other) is the same as (list 'this 'that 'the-other). The backtick
` is called "quasiquote" an the comma is "unquote".


Btw in that last comment in the file, it should read "\verse #words"
instead of "\verse \words" of course, please correct that if you put
it on LSR


Regards
 Jakob.

>
> Best regards,
> Jan-Peter.
>
> Am 23.01.2011 um 14:15 schrieb jakob lund:
>
>> oops, forgot to reply to list (sorry about the extra spam Jan-Peter)
> I don't mind ;-)
>> 2011/1/23 jakob lund <address@hidden>:
>>> Hi again
>>>
>>> After fiddling some more with this, I came up with a simple solution.
>>> Instead of a string, a LineBreakEvent is inserted into the lyric --
>>> neither \lyricmode or \addlyrics complain about this, and the events
>>> doesn't seem to appear in the music output. This removes the need for
>>> the filter function.
>>>
>>> The lyrics->list function then recognizes the placeholders and
>>> replaces them with occurrences of the indicator string, which the
>>> verse command then uses to split the lines.
>>>
>>> It seems to work well, try it out.
>>>
>



reply via email to

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