Am 17. September 2016 23:10:08 MESZ, schrieb Simon Albrecht 
<simon.albre...@mail.de>:
>And finally with a better user interface:
>

I'll have to look it up (and probably update it to handle current LilyPond),  
but Frescobaldi can display control points with the Layout Control Options tool 
(and this is of course based on code by Harm).

HTH
Urs




>%%%%%%%%%%%%%%%%%%%%%%%%
>\version "2.19.47"
>\language "deutsch"
>#(define (make-cross-stencil coord)
>    "Draw a cross-stencil at coord."
>    (let ((thick 0.1)
>          (sz 0.2))
>      (stencil-with-color
>       (ly:stencil-add
>        (make-line-stencil
>         thick
>         (- (car coord) sz)
>         (- (cdr coord) sz)
>         (+ (car coord) sz)
>         (+ (cdr coord) sz))
>        (make-line-stencil
>         thick
>         (- (car coord) sz)
>         (+ (cdr coord) sz)
>         (+ (car coord) sz)
>         (- (cdr coord) sz)))
>
>       cyan)
>      ))
>compoundSlur =
>#(define-event-function (contr-pts ann?) (list? boolean?)
>    (let ((proc (lambda (grob)
>                  (let*  (;; only here for reference:
>                           (cps (ly:slur::calc-control-points grob))
>                           (cps1 (first contr-pts))
>                           (cps2 (second contr-pts))
>                           (first-spline-stil
>                            (begin
>                           (ly:grob-set-property! grob 'control-points 
>cps1)
>                             (ly:slur::print grob)))
>                           (second-spline-stil
>                            (begin
>                           (ly:grob-set-property! grob 'control-points 
>cps2)
>                             (ly:slur::print grob)))
>                           ;; annotates all new control-points
>                           (crosses
>                            (if ann?
>                                (apply
>                                 ly:stencil-add
>                                 (map
>                                  (lambda (c)
>                                    (make-cross-stencil c))
>                                  (append cps1 cps2)))
>                                empty-stencil))
>                           )
>                    ;(pretty-print cps)
>                    ;; returns
>                    ;;  ((0.631380973009261 . 7.545004)
>                    ;;   (3.65053718406404 . 9.82511349243875)
>                    ;;   (53.1972252988833 . 16.0566485774538)
>                    ;;   (56.6869647738747 . 14.5951692170292))
>
>                    (ly:stencil-add
>                     first-spline-stil
>                     second-spline-stil
>                     crosses
>                     )))))
>      #{ -\tweak stencil $proc ( #}))
>cptsA = #'(((0.6 . 5.8)
>             (3.6 . 7.8)
>             (25.0 . 5.0)
>             (32 . 12))
>            ((32 . 12)
>             (39.0 . 17.5)
>             (53.1 . 16.0)
>             (55.5 . 12.5)))
>
>upper = \relative {
>   \key d \major
>   \clef bass
>   s2 r8 d,16 g h d g h
>   d8 r s2.
>   s4 \voiceTwo h8.(-- c16-- h2--)
>}
>lower = \relative {
>   \key d \major
>   \clef bass
>   r2
>   <d' h g=>~-^-\compoundSlur \cptsA ##t
>   <<
>     {
>       <d h g>4 <c g e> <h g> \voiceOne cis
>       \change Staff = upper
>       \clef treble \voiceOne d e fis2)
>       \fermata
>     }
>     \new Voice {
>       \voiceTwo
>       s2. <g,= e>4 \oneVoice
>       <fis h,> <g e> <fis dis>2\fermata
>     }
>   >>
>}
>\score {
>   <<
>     \new PianoStaff <<
>       \new Staff = upper \upper
>       \new Staff = lower \lower
>     >>
>   >>
>}
>%%%%%%%%%%%%%%%%%%%%%%%
>
>Thanks a lot!
>Simon
>
>
>On 17.09.2016 22:39, Thomas Morley wrote:
>> 2016-09-17 21:50 GMT+02:00 Simon Albrecht <simon.albre...@mail.de>:
>>
>>> Only one glitch: Is make-cross-stencil a private function of yours?
>> Aaarrrgh, forgot to include. Sorry for that.
>>
>> #(define (make-cross-stencil coord)
>>    "Draw a cross-stencil at coord."
>>    (let ((thick 0.1)
>>          (sz 0.2))
>>    (stencil-with-color
>>      (ly:stencil-add
>>        (make-line-stencil
>>          thick
>>          (- (car coord) sz)
>>          (- (cdr coord) sz)
>>          (+ (car coord) sz)
>>          (+ (cdr coord) sz))
>>        (make-line-stencil
>>          thick
>>          (- (car coord) sz)
>>          (+ (cdr coord) sz)
>>          (+ (car coord) sz)
>>          (- (cdr coord) sz)))
>>
>>    cyan)
>>    ))
>>
>> Cheers,
>>    Harm
>
>
>_______________________________________________
>lilypond-user mailing list
>lilypond-user@gnu.org
>https://lists.gnu.org/mailman/listinfo/lilypond-user

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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

Reply via email to