[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pentatonic Diatonic Transposition?
From: |
Michael Ellis |
Subject: |
Re: Pentatonic Diatonic Transposition? |
Date: |
Sat, 22 Jan 2011 18:45:10 -0500 |
On Sat, Jan 22, 2011 at 12:09 AM, Daniel <address@hidden> wrote:
> Lilypond is awesome!
I agree! This topic was interest to me, so here's a cut at a working
solution based on my earlier post. The attached file,
modaltranspose.ly defines a new music function, \modalTranspose that
works almost like the normal chromatic \transpose but takes one extra
argument: the scale to use for the transposition. Here's the usage
example from the file
%% ---------- Demo ------------------------------
%% Just to show it works with normally transposed music, too:-)
dPentScale = \transpose c d { c'4 d' e' g' a'1 }
mymotive = \transpose c d { c'4 c' e' d' c'1}
%% And here's an octatonic example
cOctatonicScale = {c'4 d' ees' f' ges' aes' a' b'}
octamotive = {c'4 ees' ges' a' b' aes' f' d' }
\score {
\new Staff {
\tempo "" 2=120
\mark "Pentatonic"
\dPentScale
\mymotive
\modalTranspose d' e' \dPentScale \mymotive
\mymotive
\break
\mark "Octatonic"
\cOctatonicScale
\octamotive
\modalTranspose c' a' \cOctatonicScale \octamotive
\octamotive
{ees'1} %% Can't stand not resolving :-)
}
\layout {}
\midi {}
}
%% -------------------------------------------------------------------
Seems to work with arbitrary scales, but be aware that the code will
(intentionally) throw an error if any pitch in what you're transposing
is not in the scale. I'm not sure what other result is reasonable for
arbitrary scales.
The code Probably has some other bugs, too :-) I'm open to
suggestions for improvement before I submit it to LSR.
Cheers,
Mike
modalTranspose.png
Description: PNG image
modaltranspose.ly
Description: Binary data