Am Mo., 25. Feb. 2019 um 12:04 Uhr schrieb Urs Liska <li...@openlilylib.org>: > > Hi, > > I'm in need of an idea how to approach this: I need to print a slur over a > single note. > > More concretely there already is a markup with a certain width above the note > (see attached image), and I need to print a slur over that markup (see second > attached image). > > It should be possible (I think) to hook into the stencil callback, take the > markup stencil and produce a new slur stencil from scratch. But until now I > have only taken an existing slur stencil and worked with that, so I'm at a > loss as to how I can add a new slur stencil to the existing one. > > I've come to the point where I can access the markup as a stencil in the > "stencil" override. From here I want to add an additional slur stencil, > aligned to that markup stencil and add it to the whole resul. > > Any pointers would be welcome > Urs > > \version "2.21.0" > > #(define (tremulo-type? obj) > (and (symbol? obj) > (memq obj '(slow accel fast)))) > > tremulo = > #(define-event-function (type)(tremulo-type?) > (let* > ((markups > `((accel . > ,#{ > \markup \concat { > \fontsize #1 > \musicglyph "scripts.prall" > \fontsize #-1 > \musicglyph "scripts.prallprall" > } > #}))) > ;; store the actually used markup in a closure > (use-markup (assq-ref markups type))) > #{ > \tweak stencil > #(lambda (grob) > (let* > ((tremulo-stencil (grob-interpret-markup grob use-markup)) > ) > ; TODO: > ; Create slur stencil and add/align it above the tremulo > tremulo-stencil > )) > ^\markup "" > #} > )) > > { > c''1 \tremulo accel > }
Hi Urs, can't look deeper into it, have to run for my regular job... Though, there are the under/overtie-markup-commands, customizable like the tie-markup.command. Probably better to use tie-markup directly, it respects 'direction from parent-grob. Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user