lilypond-user
[Top][All Lists]
Advanced

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

Transposing instruments in orchestra score


From: Orm Finnendahl
Subject: Transposing instruments in orchestra score
Date: Thu, 8 May 2014 17:39:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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?

--
Orm

\version "2.19.5"

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

ebclarinet = #(define-music-function
     (parser location music)
     (ly: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 }
  }
}


--
Orm



reply via email to

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