lilypond-user
[Top][All Lists]
Advanced

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

Re: how to reuse common header attributes


From: Xavier Noria
Subject: Re: how to reuse common header attributes
Date: Mon, 10 Dec 2012 00:31:38 +0100

Awesome reply, thanks very much Keith.


On 10 Dec 2012, at 00:13, Keith OHara <address@hidden> wrote:

> Xavier Noria <fxn <at> hashref.com> writes:
> 
>> I am transcribing a song in C, and would like the same document to
>> include its transposition in E flat.
> [...]
>> 1) The structure and variable usage are idiomatic?
> I think so, mostly. Maybe put an extra set of {} around \addlyrics,
> just in case you forget how \addlyrics works (like I often do).
> 
>> 2) Is there a clean way to factor those common header attributes out somehow?
> You can put a \header{} at the beginning, see below, and those items are 
> repeated for each book part.  (But if someday you *don't* want the title 
> repeated, you need  \paper { bookTitleMarkup = "" } in each \bookpart after 
> the first.)
> 
>> I store one melody in concert pitch in
>> a variable, and then reuse that variable for the original and
>> transposed scores. But the docs of \transposition say " \transposition
>> should only be used if the pitches are not being entered in concert
>> pitch.", so apparently it is not intended for my use case.
> 
> "\transposition bes" would tell LilyPond: "in the following music, what 
> is written as concert C sounds as concert B-flat."  LilyPond uses the 
> distinction between written and sounding pitches for midi, and for writing 
> "cue notes" when one instrument listens for cues from another.
> 
> In your case, you *could* tell LilyPond the truth by writing
> "\transposition c" but that will probably not help anything in your score.
> (It would make midi pitches come out in concert pitch, even if you
> use "\transpose es, c \melody" in the score with midi output.)
> 
> \version "2.16.1"
> \include "english.ly"
> melody = {
>  \relative c' {
>  \transposition c % probably not needed
>  \key fs\major fs gs as b }
>  \addlyrics { do re mi fa } 
> }
> \header {
>  title    = "title"
>  composer = "composer"
>  tagline  = "tagline"
> }
> \bookpart {
>  \header {
>    subtitle = "Score in C"
>  }
>  \score {
>    \melody
>  }
> }
> \bookpart {
>  \header {
>    subtitle = \markup { "Part for" \concat{"E"\flat} "saxaphone"}
>  }
>  \score { % enharmonic transposition, due to the key of f-sharp
>    \transpose ds, c \melody
>  }
> }
> 
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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