lilypond-user
[Top][All Lists]
Advanced

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

Re: Transposing instruments in orchestra score


From: David Kastrup
Subject: Re: Transposing instruments in orchestra score
Date: Thu, 08 May 2014 17:50:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Orm Finnendahl <address@hidden> writes:

> Hi David,
>
>  below is a minimal example. One of the disadvantages of this notation
> is obvious, if you render the file: Both parts are in the wrong
> octave. The "\relative c'" has to get moved inside the brackets of the
> \bclarinet and \eb-clarinet calls in order to correct this. I'd much
> prefer not having to enclose the music of the different instruments by
> brackets in the score section at all.
>
> Is there any clean workaround?

I did mention make-relative in the last reply and provided a full
example.  It's equally applicable to this case.

\version "2.19.0"

bclarinet =
#(define-music-function (parser location music)
   (ly:music?)
   (make-relative (music) music
                  #{
                    \instrumentSwitch "b-clarinet"
                    \transpose c d $music
                  #}))

ebclarinet =
#(define-music-function (parser location music)
   (ly:music?)
   (make-relative (music) music
                  #{
                    \instrumentSwitch "eb-clarinet"
                    \transpose es c $music
                  #}))

\addInstrumentDefinition #"eb-clarinet"
  #`((instrumentTransposition . ,(ly:make-pitch 0 3 -1))
     (shortInstrumentName . "Es-Kl")
     (clefGlyph . "clefs.G")
     (middleCPosition . -6)
     (clefPosition . -2)
     (instrumentCueName . "Es-Kl")
     (midiInstrument . "clarinet"))

\addInstrumentDefinition #"b-clarinet"
  #`((instrumentTransposition . ,(ly:make-pitch -1 7 -1))
     (shortInstrumentName . "Kl")
     (clefGlyph . "clefs.G")
     (middleCPosition . -6)
     (clefPosition . -2)
     (instrumentCueName . "Kl")
     (midiInstrument . "clarinet"))

\score {
  \relative c' {
    \clef G
    \ebclarinet { c d e f }
    \bclarinet { c d e f }
  }
}

-- 
David Kastrup

reply via email to

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