[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fw: Pentatonic Diatonic Transposition?
From: |
Trevor Daniels |
Subject: |
Fw: Pentatonic Diatonic Transposition? |
Date: |
Sun, 23 Jan 2011 11:03:55 -0000 |
The code below seems to satisfy a request
seen several times on -user. Assuming the code
is good I'd prefer to see this added to the LP
distribution rather than the LSR.
What do you think?
Trevor
----- Original Message -----
From: "Michael Ellis" <address@hidden>
To: "Daniel" <address@hidden>
Cc: <address@hidden>
Sent: Saturday, January 22, 2011 11:45 PM
Subject: Re: Pentatonic Diatonic Transposition?
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
--------------------------------------------------------------------------------
_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user
modalTranspose.png
Description: PNG image
modaltranspose.ly
Description: Text Data
- Fw: Pentatonic Diatonic Transposition?,
Trevor Daniels <=