[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Voicename not recognised in music function
From: |
David Kastrup |
Subject: |
Re: Voicename not recognised in music function |
Date: |
Mon, 18 Oct 2010 23:35:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Marten Visser <address@hidden> writes:
>> I'm not top posting.
>
> A voicename not is recognised in a music function.
>
> In the example below, I'd expect to get two documents with the same
> content. However, in the "error" document, no lyrics are typeset, and
> an error is sent into the logfile. Why?
> \score {
> <<
> \new Voice = "melody" { \relative c'' { d cis b a } }
> \new Lyrics \lyricsto "melody" \lyricmode { An ex
> -- am -- ple. }
> >>
> }
vs.
> MusFunc = #(define-music-function (parser location) ()
> #{
> \new Voice = "melody" { \relative c'' { d cis b a } }
> \new Lyrics \lyricsto "melody" \lyricmode { An ex -- am --
> ple. }
> #} )
>
> \book {
> \bookOutputSuffix "Error"
> \score {
> <<
> \MusFunc
> >>
> }
Music functions return sequential music by default, not a sequence of
partial music expressions folded into an upper syntactical construct.
So the lower is the equivalent of
\score {
<< {
\new Voice = "melody" { \relative c'' { d cis b a } }
\new Lyrics \lyricsto "melody" \lyricmode { An ex
-- am -- ple. }
} >>
}
if I am not mistaken.
It is likely that you can return a parallel music expression explicitly
using Scheme.
Perhaps it would be nice to allow #<< instead of #{ as a shortcut for
creating a music expression returning parallel music.
--
David Kastrup