bug-lilypond
[Top][All Lists]
Advanced

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

Documentation clarification for variables


From: Joseph Austin
Subject: Documentation clarification for variables
Date: Thu, 25 Jan 2018 09:19:39 -0500

In LM 2.4.1 the discussion of variables leaves out essential information, the 
"entry mode" of the data.

In response to a question I submitted to the User Forum, 
Noeck <address@hidden> gave a much clearer explanation based on the "lead 
sheet" example
from section 2.4.1 Songs.

================================
% You started with the simplest form: [based on Lead Sheet Example LM 2.1.4]

<<
 \chords { a4:m }
 \relative c' { a b }
 \addlyrics { a }
>>
---------------------------------
Attempted conversion to  variables per LM 2.4.1:

harmony =  { a4:m }
melody = { a b }
words =  { a }
<<
 \chords \harmony
 \relative c' \melody
 \addlyrics \words
>>
================================
Noeck <address@hidden>  suggested correction:

% Lilypond does many things behind the scenes there. To make it more
% explicit, you could also write the following lines.
<<
 \new ChordNames \chordmode { a4:m }
 \new Staff \new Voice = "voice" \relative c' { a b }
 \new Lyrics \lyricmode { a }  % or \new Lyrics \lyricsto "voice" { a }
>>

% Now, you are ready to replace the content of each context with
% variables. You need to tell Lilypond the entry mode for your
% variables and the context in your score setup:

harmony = \chordmode {a4:m }
melody = \relative c' { a b }
words = \lyricmode { a }
<<
 \new ChordNames \harmony
 \new Staff \new Voice = "voice" \melody
 \new Lyrics \lyricsto "voice" \words
>>

% Please note, that this example is identical with the one before, if
% you replace the variables with their right hand side again.

=========
Joe Austin

reply via email to

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