[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
utility: \interpolate
From: |
Erik Sandberg |
Subject: |
utility: \interpolate |
Date: |
Wed, 22 Feb 2006 20:33:42 +0100 |
User-agent: |
KMail/1.8.3 |
Hi all,
I have written a command that interpolates music between notes; this might be
useful in music that contains many scales. For example,
\relative \interpolate { c8 c' }
=>
\relative { c8 d e f g a b c }
\relative \interpolate { c8 c'4 c,2 }
=>
\relative { c8 d e f g a b c4 b a g f e d c2 }
The command recognises time signatures: the pitches of all newly created notes
are set to comply to the key signature. For example:
\relative { \key d\major \interpolate { d f' } }
=>
\relative { \key d\major { d e fis g a b cis d e f } }
You can also create exceptions by adding music within {}:
\relative \interpolate { c8 c'4 {e} g8 c }
=>
\relative { c8 d e f g a b c4 {e} g8 f e d c }
The command handles \relative nicely: It will do what you expect, regardless
of whether you call it inside or outside a \relative block.
Comments and suggestions for improvements are welcome. I will probably upload
the file to lsr pretty soon.
--
Erik
interpolate.ly
Description: Text document