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 #"."

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to