Hi Michael,
nice work! I just think that the name modal transposition is a little
misleading in this case. At first I thought that I could change the
mode of a tune with your function e.g. transpose music from c\major
to c\minor or something like that.
I just had the idea that it might be useful to add some more scales
to the standard LP mode names (\ionian, \dorian ...) such as e.g.
\majorPenta, \minorPenta. Maybe there's a way to extend your code and/
or the function of the existing \transpose-command to also be able to
do real modal transpositions such as e.g.
<pseudo-code>
\transpose c\ionian c\locrian \mymusic %or
\transpose c\majorPenta c\minorPenta \mymusic % etc.
\transpose c a \pentatonicmusic %or
</pseudo-code>
This way users wouldn't have to declare scales and when no modal
change is intended we could just use \transpose.
just my 2 cents...
Thanks,
patrick
Am 23.01.2011 um 00:45 schrieb Michael Ellis:
On Sat, Jan 22, 2011 at 12:09 AM, Daniel
<basso.ridicul...@gmail.com> 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><modaltranspose.ly>___________________________
____________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user