[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to shift music up/down a semi tone without changing key signatur
From: |
Xavier Scheuer |
Subject: |
Re: How to shift music up/down a semi tone without changing key signature |
Date: |
Sun, 27 Nov 2011 11:38:47 +0100 |
On 27 November 2011 11:21, James <address@hidden> wrote:
> It's because of the \relative I think; the Notation Reference does actually
> talk about this - I don't think of 'transposing' without thinking about the
> changing of the key signature, which I don't want to do. Hence I didn't even
> think to use \transpose!
> So it seems I have to define the transposition within the 'Music' expression
> itself:
> Music = {
> \key d \major
> \transpose b c { a b c d | a b c d | a b c d }
> }
> Which keeps the key signature and does indeed shift the notes, great!
> But then I cannot (seem to) use \relative and this becomes absolute octave
> entry exercise.
> Unless I have misread the NR?
You could use a "global" variable containing the key changes.
%%%%
\version "2.14.1"
Music = {
% \key d \major
a b c d | a b c d |
% \key d \minor
a bes c d | a bes c d |
}
global = {
\key d \major
s1*2 |
\key d \minor
s1*2 |
}
\score {
<<
\new Staff {
% without altering the key signature
<<
\global
\transpose b c' \relative c ' { \Music }
>>
}
\new Staff {
% altering the key signature
\transpose b c' {
<<
\global
\relative c ' { \Music }
>>
}
}
>>
}
%%%%
Personally, I would use the \relative within the "Music".
Music = \relative c' {
% etc.
}
and then, in \score , simply \Music (without the \relative c' ).
Cheers,
Xavier
--
Xavier Scheuer <address@hidden>