lilypond-user
[Top][All Lists]
Advanced

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

Re: transpositions within a global key setting.


From: Urs Liska
Subject: Re: transpositions within a global key setting.
Date: Tue, 10 Dec 2019 07:41:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1


Am 09.12.19 um 15:24 schrieb N. Andrew Walsh:
Hi List,

let us say I have a piece where I want to specify the key signature once for all instruments. I have something like the following:

\version = 2.19.82
global= {
 \key f \minor
 \time 4/8
  }
%% (and whatever other settings I want)

oDAMusic = \transpose a c {
  \relative c''' {
    \key as \minor
    {{MUSIC}}
  }
}


What this code is trying to convey (different from your intentions) that MUSIC is some music in as minor that is then transposed to f minor.

What you *need* to say is that the music is in f minor (because that is your key signature) but transposed *for display* to as minor. It should immediately strike you as odd when you seem to need to write \key as \minor when you are not actually having polytonality.

So the key signature in your music should be the f minor specified in the global variable (note BTW that it is not ideal practice naming a variable "global"), and you can simply include that *within* the music _expression_ rather than in teh staff definition.

You define the music in the original key and then transpose it to the key you want it displayed in. If you are dealing with MIDI output (and even if not you should consider it) you can then use \transposition to re-transpose the MIDI output without affecting the engraved key and pitches (see http://lilypond.org/doc/v2.19/Documentation/notation/displaying-pitches#instrument-transpositions (which is where you should have looked at)).

This is what you want to do:

\version  "2.19.82"
global= {
  \key f \minor
  \time 4/8
}

oDAMusic = 
\transpose f as 
\relative c' {
  \transposition a
  \global
  f g as
}

\score {
  \new Staff = "Staff_oboeDA" <<
    \oDAMusic 
  >>
}

HTH
Urs


\score {
\new Staff = "Staff_oboeDA" <<
      \global \oDAMusic 
    >>
}

I've omitted other variables, instrument blocks, and settings. My question is what to do about this instrument, the oboe d'amore, which transposes. According to the NR, here:

http://lilypond.org/doc/v2.19/Documentation/notation/changing-multiple-pitches#transpose

I would need to format the block like this to print the correct key signature. When I do this, however, Lily throws an error about "Two simultaneous key-change events" and that one will be junked. Score output, however, looks fine, with the transposition and key-signature correct. 

As a general question, how should I be formatting this so that I don't get an error? 

Cheers,

A


reply via email to

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