lilypond-user
[Top][All Lists]
Advanced

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

Chords with smaller note heads


From: Alberto Simões
Subject: Chords with smaller note heads
Date: Sun, 21 Aug 2011 19:19:40 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:6.0) Gecko/20110812 Thunderbird/6.0

Hello

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))

--
Alberto Simoes
CEHUM



reply via email to

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