lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lilypond include scripts


From: David Fedoruk
Subject: lilypond include scripts
Date: Wed, 13 Feb 2008 23:08:55 -0800

Hello:

I have some music in which the number of repeated commands
dramatically dwarfs the number of notes. For exacple, this is one bar:

%%%%

                \override Beam #'auto-knee-gap = #6
                r2 r4 \mf d''16[  d' \change Staff = "lh" \override Beam
#'auto-knee-gap = #6 \override Stem #'direction = #UP  c'
bf      ]                                               |       % bar 11
        fs16[ \change Staff = "rh" \override Stem #'direction = #DOWN
ef' \change Staff = "lh"  \override Stem #'direction = #UP c' a ]
                fs16[ \change Staff = "rh" \override Stem #'direction = #DOWN c'
\change Staff = "lh" \override Stem #'direction = #UP  bf g ]
                g16[ bf g ef] \change Staff = "rh" \override Stem #'direction =
#DOWN a'[ ef' \change Staff = "lh" \override Stem #'direction = #UP d'
c' ] |
                % bar 12
%%%%

I don't think I can put the ovrrides and change Staff commands into a
variable. However it must be possible to build a function for some of
these commands which would reduce the amount of typing and make the
code clearer. I can guess at how to do this but I don't yet know where
to look for all the ingrediants.

each of the commands which changes staff to "upper" or in this case
"rh" also has a stem direction change. So it should be possilbe to
combine both of those commands into something like

set! chRHDn to ( \change Staff = "rh" \override Stem #'direction = #DOWN)
and
set! chLHUp to ( \change Sraff = "lh" \override Stem #'direction = #UP)

and save it to  UpDown.ly  and  add \include UpDown.ly in my main
code. I  just don't know how to construct such a script.

Am I on the right or the wrong track here?

Cheers
David


-- 
David Fedoruk
B.Mus. UBC,1986
Certificate in Internet Systems Administration, UBC, 2003


http://recordjackethistorian.wordpress.com
"Music is enough for one's life time, but one life time is not enough
for music" Sergei Rachmaninov




reply via email to

[Prev in Thread] Current Thread [Next in Thread]