lilypond-user
[Top][All Lists]
Advanced

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

Re: Chords with smaller note heads


From: Marc Hohl
Subject: Re: Chords with smaller note heads
Date: Sun, 21 Aug 2011 20:38:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11

Am 21.08.2011 20:19, schrieb Alberto Simões:
Hello
Hello Alberto,

I use the following definition:

opt = #(define-music-function (parser location note) (ly:music?)
   (set! (ly:music-property note 'tweaks)
                   (acons 'font-size -2 (ly:music-property note 'tweaks)))
       note)

< c \opt e g >4 < c  e \opt g > < \opt c e \opt g >

You'll have to mark every note you want to be smaller, though.

HTH,

Marc



I was looking into a way to write chords with some note heads smaller than others. I found a snippet with some lisp code (see bellow) that works great if only one note of the chord needs to be smaller.

The odds is that I need some chords with two normal heads, and a small head, two small heads, and a normal head, and so on.

Is there a better way than defining a different command (using that lisp code as a base) for all combinations I need? :)

Thank you
Alberto

The code I am using is:

t =
#(define-music-function (parser location x) (ly:music?)
  (music-map (lambda (x)
              (if (eq? (ly:music-property x 'name) 'EventChord)
               (let ((copy (ly:music-deep-copy x)))
(let ((elements (cdr (ly:music-property copy 'elements))))
                 (while (pair? elements)
                  (ly:music-set-property! (first elements) 'tweaks
                   (acons 'font-size -2 (ly:music-property (car elements)
                                         'tweaks)))
                  (set! elements (cdr elements))))
                copy) x))
   x))





reply via email to

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