[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: lilypond include scripts
From: |
Trevor Daniels |
Subject: |
RE: lilypond include scripts |
Date: |
Thu, 14 Feb 2008 10:00:49 -0000 |
Hi David
There is a (brief) new section in the Learning Manual at 4.6.2 which introduces
you to using variables for tweaking. See
http://kainhofer.com/~lilypond/Documentation/user/lilypond-learning/Using-variables-for-tweaks.html#Using-variables-for-tweaks
. Might help, as your overrides seem to occur in pairs and could be combined
into one variable.
Trevor D
> -----Original Message-----
> From: address@hidden
> [mailto:lilypond-user-bounces+t.daniels=treda.co.u
> address@hidden Behalf Of
> David Fedoruk
> Sent: 14 February 2008 07:09
> To: Lilypond mailing list
> Subject: lilypond include scripts
>
>
> 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
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>