lilypond-user
[Top][All Lists]
Advanced

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

Re: dotted semicircle indicating harmonics


From: Pierre Perol-Schneider
Subject: Re: dotted semicircle indicating harmonics
Date: Sat, 7 Jul 2018 16:18:23 +0200

But of course !! Thanks very much Orm !
Cheers,
Pierre

2018-07-07 16:15 GMT+02:00 Orm Finnendahl <address@hidden>:
Hi Pierre,

Am Samstag, den 07. Juli 2018 um 15:54:41 Uhr (+0200) schrieb Pierre
Perol-Schneider:
> Plus : any idea why 'testTwo does not work ?

 because the argument type of "arg" was string?. Below is the updated
version:

--
Orm


%circled-pattern
#(define-markup-command
  (circled-pattern layout props radius angle num arg)
  (number? number? number? markup?)
  (interpret-markup layout props
   (let ((rep (abs num)))
    (cond
     ((= num 0) (markup ""))
     ((= num 1) (markup arg))
     (#t (markup
          (#:combine
           (#:null)
           (fold
            (lambda (i prev)
             (markup
              (#:combine
               (#:rotate
                (* i (/ angle rep))
                (#:concat (#:null #:hspace radius arg)))
               prev)))
            (markup (#:null))
            (iota (1+ rep))))))))))

testOne = \markup "."
testTwo = \markup { \rotate #45 "!" }

\markup\circled-pattern #5 #180 #15 \testOne
\markup\circled-pattern #5 #-180 #15 \testOne
\markup\circled-pattern #5 #180 #2 \testOne
\markup\circled-pattern #5 #180 #1 \testOne
\markup\circled-pattern #5 #180 #0 \testOne

\markup\circled-pattern #5 #360 #5 \testTwo



reply via email to

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