[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New try with lyric extender
From: |
David Kastrup |
Subject: |
Re: New try with lyric extender |
Date: |
Thu, 13 Feb 2014 15:52:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Yann <address@hidden> writes:
> 2014-02-13 15:36 GMT+01:00 David Nalesnik <address@hidden>:
>> Hi Yann,
>>
>> Looks to be simply a problem with too many parentheses.
>> Try this:
>>
>> \version "2.18.0"
>> correctionAlignement = ##t
>> aligner = \relative c' { g'4. g8 c,4( c) | }
>> lyric = \lyricmode { Glo -- ri -- a __ }
>>
>> <<
>> \new Staff <<
>> \new Voice = "melodie" \relative c'{ \voiceOne g'4. g8 c,2 | | }
>> \new Voice = "alto" \relative c' { \voiceTwo c4 bes c2 | }
>> #(cond ((eq? correctionAlignement #t)
>> #{ \new NullVoice = "aligner" \aligner #}))
>> >>
>> #(if (eq? correctionAlignement #t)
>> #{ \new Lyrics \lyricsto "aligner" $lyric #}
>> #{ \new Lyrics \lyricsto "melodie" $lyric #})
>> >>
>>
>> HTH,
>> David
>
> Hi David, thank you very much for your almost instant answer :)
>
> Ah yes, it works. I didn't think too much parentheses could harm... Is
> it because they have some special meaning in scheme (evaluate this
> expression, or something like this) ?
Yes. When an expression is read, () enclose a list. When a list is
evaluated, its first element is the function to call and the remaining
elements (after evaluation for functions, before evaluation for macros)
are the arguments.
So + is a function, and (+) is 0, namely the addition function called on
zero arguments. And ((+)) tries calling 0 as a function, but since it
is not a function, you get an error.
--
David Kastrup
- New try with lyric extender, Yann, 2014/02/03
- Re: New try with lyric extender, Yann, 2014/02/03
- Re: New try with lyric extender, David Nalesnik, 2014/02/04
- Re: New try with lyric extender, Yann, 2014/02/11
- Re: New try with lyric extender, Yann, 2014/02/12
- Re: New try with lyric extender, Yann, 2014/02/13
- Re: New try with lyric extender, David Nalesnik, 2014/02/13
- Re: New try with lyric extender, Yann, 2014/02/13
- Re: New try with lyric extender,
David Kastrup <=
- Re: New try with lyric extender, Yann, 2014/02/13