lilypond-user
[Top][All Lists]
Advanced

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

Re: Survey: Large scores


From: H. S. Teoh
Subject: Re: Survey: Large scores
Date: Mon, 20 Apr 2015 11:42:27 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Apr 20, 2015 at 09:18:39AM -0400, Kieren MacMillan wrote:
> Hi,
> 
> > This is not hard to implement at all, you just have to set things up
> > appropriately.
> 
> You give a perfect example of why we need to improve Lilypond’s
> implementation. The method
> 
> >     clarinetIPart = \relative c'' {
> >             ... % clarinet music here
> >     }
> > 
> >     clarinetIIPart = \relative c'' {
> >             ... % clarinet music here
> >     }
> > 
> >     clarinets = new Staff {
> >             set Staff.instrumentName = #"Clarinets in B\flat I, II"
> >             \transposition bes
> >             \transpose bes c' \partcombine
> >                     \clarinetIPart \clarinetIIPart
> >     }
> 
> not only requires too much overhead/effort, it requires extra
> workarounds when key signatures are triggered externally (i.e., in a
> global variable).

Actually, I do put key signatures in a global variable too. To get it to
take effect correctly (i.e. correctly transposed to the instrument's
pitch), I do this:

        clarinets = new Staff {
                set Staff.instrumentName = #"Clarinets in B\flat I, II"
                \transposition bes
                \transpose bes c' <<
                        \global
                        \partcombine \clarinetIPart \clarinetIIPart
                >>
        }


> Rather, one should simply be able to say [something
> like]
> 
>    clarinets = {
>     \takeInstrument #”clar.Bf”
>     %%  Bb clarinet music here
>     \takeInstrument #“clar.A”
>     %%  A clarinet music here
>   }
> 
> and all scores (transposing and concert-pitch) should Do The Right
> Thing™, with perhaps a few parameters/switches to help as necessary.

I agree that the current implementation could be improved. I was just
pointing out that Lilypond does give you the facilities to put most of
these workarounds in macros that would alleviate the need to worry about
fiddling with the dirty details every time. Ostensibly, these could be
included as part of the standard \include files shipped with Lilypond so
that users don't have to do this manually.


> Having engraved at least a hundred multi-instrumentalist movements
> from my own music (for both classical and musical theatre orchestras),
> I can report with great confidence that Lily’s current built-in
> implementation is frustrating to the point of insufficiency.
[...]

To support switching between instruments of different transpositions, I
wonder if we could cook up a Scheme function that postprocesses a music
expression and wrap sub-expressions within the appropriate \transpose
blocks based on a running state associated with the Staff (or Voice).
For example, we might make it so that you could write:

        clarinetPart = {
                \set Staff.autoTransposition = bes
                ... % concert pitch music here

                \markup "Switch to A clarinet"
                \set Staff.autoTransposition = a
                ... % more concert pitch music here

                \markup "Switch to B\flat clarinet"
                \set Staff.autoTransposition = bes
                ... % yet more concert pitch music here
        }

        clarinetMusic = \autoTranspose \clarinetPart

I think something like these would be a valuable addition to the
standard \include library.


T

-- 
Век живи - век учись. А дураком помрёшь.



reply via email to

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