lilypond-user
[Top][All Lists]
Advanced

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

Re: dotted semicircle indicating harmonics


From: Orm Finnendahl
Subject: Re: dotted semicircle indicating harmonics
Date: Sat, 7 Jul 2018 15:35:19 +0200
User-agent: Mutt/1.10.0 (2018-05-17)

Hi List,

 for conciseness the example should be reduced even more (if someone
wants to post it to LSR I'd recommend this version).

%circled-pattern
#(define-markup-command
  (circled-pattern layout props radius angle num arg)
  (number? number? number? string?)
  (interpret-markup layout props
   (fold
    (lambda (i prev)
     (markup
      (#:combine
       (#:rotate
        (* i (/ angle num))
        (#:concat (#:null #:hspace radius arg)))
       prev)))
    (markup (#:null))
    (iota (1+ num))))))

% Test (markup a 180° circled pattern with radius 5 and 17 dots) :
\markup\circled-pattern #5 #180 #16 #"."

% an upside down pattern can be achieved with a negative angle:

\markup\circled-pattern #5 #-180 #16 #"."



reply via email to

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