lilypond-user
[Top][All Lists]
Advanced

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

Re: Drawing an Oval around a group of notes


From: Robin Bannister
Subject: Re: Drawing an Oval around a group of notes
Date: Mon, 31 Oct 2016 00:30:43 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

John Zeweniuk wrote:
Can anybody give me some suggestions  of how I would draw an oval around a 
group of notes on the staff?


For the special case of a single chord, see the german thread
http://www.lilypondforum.de/index.php?topic=378


The 2.18 version of this would read
%%%%%%%%%%
kringel =
\once \override NoteColumn.stencil = #(lambda (grob)
  (let* ((xext (ly:grob-extent grob grob X))
             (yext (ly:grob-extent grob grob Y))
         (xpos (interval-index xext CENTER))
         (ypos (interval-index yext CENTER))
             (yrad (* 0.8 (interval-length yext)))
         (xrad (min (interval-length xext) 2))
         (thickness 0.05))
    (ly:stencil-add
     (ly:stencil-translate
      (ly:make-stencil (list 'ellipse xrad yrad thickness #f))
      (cons xpos ypos)) )))
%%%%%%%%%%


Cheers,
Robin

Attachment: kringel218.png
Description: PNG image


reply via email to

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