lilypond-user
[Top][All Lists]
Advanced

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

Re: Book building help


From: David Kastrup
Subject: Re: Book building help
Date: Thu, 15 Jul 2021 08:15:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Mark Probert <mark@archsys.net> writes:

> Hi, again.
>
> The task I'm attempting is to create an equivalent of a fake book. I'm 
> creating a tune in concert (C) and then collating it with other tunes 
> using \bookpart. That works fine for the most part. The problem is when 
> I want to have the fake book transposed (say for Ees). I end up with a 
> structure like:
>
> %%%
> \include "tune_a.ily"
> \include "tune_b.ily"
>
> \book {
>   \bookpart {
>     \score {
>        \transpose c a { \tune_a }
>     }
>   \bookpart {
>     \score {
>        \transpose c a { \tune_b }
>     }
>    % etc.
>   }
> }
> %%--
>
> Which is a pain if I have a lot of tunes, I'm repeating this for each 
> key (for jazz it is common to have C, Bes, and Ees versions) and a mess 
> if I want to reorder tunes, make edits, and so on. 
>
> Is there a better and cleaner way to approach this problem?

Well, disregarding "cleaner"...

untransposed-music-functions = #toplevel-music-functions

toplevel-music-functions =
#(cons #{ \transpose c a \etc #} untransposed-music-functions)

\score { { \key c \major  c'4 e' g' c'' | c'1 } }

-- 
David Kastrup

reply via email to

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