lilypond-user
[Top][All Lists]
Advanced

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

Re: Re: best practices


From: Ian Hulin
Subject: Re: Re: best practices
Date: Sun, 29 Jun 2008 23:58:58 +0100
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Hi Kieran,

I really appreciate the spirit of the challenge, but can you correct it as the alto flute's in G?

I think only the lines with the text markup saying (in F) need changes, but can you repost the entire thing in case there's something I missed?

Cheers,

Ian



Kieren MacMillan wrote:
<div class="moz-text-flowed" style="font-family: -moz-fixed">Hello all,

For anyone who is interested in putting their 2ยข in on this discussion...

Here is a simple instrument-doubling-with-key-signature-changes challenge:

%%%%%%%%%%%%%%%%%%%%%
\version "2.11.49"
\include "english.ly"
#(set-global-staff-size 14)
\layout { \context { \Score printKeyCancellation =#f } }

global {
    \time 4/4    \key c \major s1*2 \bar "||"
    \key c \minor s1*2 \bar "||"
    \key d \major s1*4 \bar "||"
}

flute =relative
{
    c'4^\markup { flute (in C) } d e f | g1 | c,4 d ef f |
    g1^\markup { alto flute (in F) } | d4 e fs g | a1 |
    d,4^\markup { piccolo (in C') } e fs g | a1
}

\markup { C SCORE/PART }
\score { \new Staff =fl" << \global \flute >> }

\markup { TRANSPOSED SCORE/PART }
\score { \new Staff =fl" << \global \flute >> }

\markup { TRANSPOSED SCORE/PART SHOULD MATCH THE FOLLOWING: }
\score
{
    \relative
    {
\time 4/4 \key c \major c'4^\markup { flute (in C) } d e f | g1 \bar "||" \key c \minor c,4 d ef f | \key f \minor c'1^\markup { alto flute (in F) } \bar "||" \key g \major g4 a b c | d1 | \key d \major d,,4^\markup { piccolo (in C') } e fs g | a1 \bar "|."
    }
}
%%%%%%%%%%%%%%%%%%%%%%

The goal is to make this (i.e., the transposed score/part) happen with:
    1. a minimum of additional code;
2. a minimum of structural changes (e.g., if possible, we want to keep the key changes in a single variable, not break up the flute music variable, etc.);
    3. a maximum of code reusability.

In other words, something that can easily be put in a template for the average Lilypond user.

Good luck!
Kieren.

p.s. For the record, I haven't been able to find a way to use \tag and \transpose together to solve the problem -- it always requires code duplication or restructuring -- but my intuition currently says that's the best approach...






______________________________________________ This email has been scanned by Netintelligence http://www.netintelligence.com/email
</div>





reply via email to

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