lilypond-user
[Top][All Lists]
Advanced

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

Re: Sizing noteheads in a chord construct?


From: Shamus
Subject: Re: Sizing noteheads in a chord construct?
Date: Fri, 23 Jun 2006 22:05:42 -0700
User-agent: Thunderbird 1.5.0.2 (X11/20060526)

Oops, this was supposed to go to the list... :-( Well, here it is. :-P

> Please see http://lilypond.org/doc/v2.8/Documentation/topdocs/NEWS.html.
> Somewhere in the middle you'll find the \tweak command.

Thanks for the pointer! :-)

That does what I want, albeit in quite a verbose way. I ended up using
that as a basis for writing a function with a compact name so I don't
have to sacrifice readability for the functionality I need. For example,
instead of having a bunch of

<c \tweak #'font-size #-3.0 e \tweak #'font-size #-3.0 g>

for each chord instead I have

<c \hn e \hn g>

which is about as compact as it gets. It also saves one from having to
change each and every occurrence of the font size by keeping it in a
central location (in the function). For those who are interested, here's
the function:

hn = #(define-music-function (parser location arg) (ly:music?)
;; Harmony Note: Set the tweaks property of the passed in note to use a
smaller font

  (set! (ly:music-property arg 'tweaks)
    (acons 'font-size -3.0 (ly:music-property arg 'tweaks))) arg)

I'm not convinced this is the best way to do it (please feel free to
point out a better way), but it'll do for now. :-)

-- Shamus




reply via email to

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