[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diatonic transposition within a key
From: |
Tim McNamara |
Subject: |
Re: Diatonic transposition within a key |
Date: |
Mon, 28 Apr 2014 19:19:15 -0500 |
On Apr 28, 2014, at 6:38 PM, David Kastrup <address@hidden> wrote:
> Tim McNamara <address@hidden> writes:
>
>> I’ve been hunting around (without success) for a method to transpose a
>> melody up or down an interval diatonically. It’s easy to transpose
>> into a new key to deal with transposing instruments, but I want to
>> shift a melody up a third within the original key to create a harmony
>> line. Does Lilypond have that capability to save me having to do it
>> manually?
>
> <URL:http://www.lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches.html#modal-transformations>
Thank you! Unfortunately I can’t figure out how to make it work based on
what’s in the docs (musician here rather than having any competence at all in
writing code).
Perhaps the scenario will help along with a snippet. The chart I am trying to
generate is a trumpet chart. It is already transposed from the concert key
using \transpose to account for the Bb transposition of the horn. Now I want
to lift the melody up a third to place the trumpet in a harmony line with a
tenor sax playing the original melody. Does that make sense so far?
Can I put \modalTranspose inside the existing \transpose? Or should it go
outside? Or will the two hopelessly disagree? My head hurts trying to figure
this sort of thing out...
Here’s a snippet of the modified melody, hopefully this will be sufficient (the
way the file is laid out, there is a \paper block, a block for chords, a block
for melody and then they are put together in a \score block at the end of the
document).
melody = \transpose c d \relative c' {
\numericTimeSignature
\time 4/4
\clef treble
\key g \major
\partial 4*2 \times 2/3 { r4 e4 fis4}
% 1
\bar "|:"
g1~
g4. b8 a8 g8 r8 a16 g16
fis1~
fis2 \times 2/3 { r4 e4 g4 }
}