[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vertical arrows next to note
From: |
Valentin Petzel |
Subject: |
Re: Vertical arrows next to note |
Date: |
Thu, 09 Feb 2023 21:12:30 +0100 |
Hello Jean,
One could even get rid of the direction parameter and instead abuse the
direction event property:
\version "2.24.0"
arrow =
-\tweak stencil #ly:text-interface::print
-\tweak text
#(lambda (grob)
(let* ((cause (ly:grob-property grob 'cause))
(dir (ly:event-property cause 'direction UP))
(start (car (ly:grob-property grob 'positions)))
(len (ly:grob-property grob 'length 3)))
#{
\markup \override #`((direction . ,dir) (baseline-skip . 0))
\dir-column {
\raise #start \draw-line #(cons 0 (* dir (+ 0.2 len)))
\vspace #-0.2
\arrow-head #Y #dir ##t
}
#}))
-\arpeggio
{
a'\arrow fis'\tweak padding 0 \tweak length 2.5 _\arrow
}
Am Donnerstag, 9. Februar 2023, 15:31:09 CET schrieb Jean Abou Samra:
> > Hello,
> >
> > It should be possible to use an Argpeggio with a custom stencil using
> > elements of arpeggioArrowDown and arpeggioBracket without protrusion.
> > This is beyond my current capabilities unfortunately.
>
> Something like this?
>
> ```
> \version "2.24.0"
>
> arrow =
> #(define-event-function (dir) (ly:dir?)
> #{
> \tweak stencil #ly:text-interface::print
> \tweak text
> #(lambda (grob)
> (let ((start (car (ly:grob-property grob 'positions)))
> (len (ly:grob-property grob 'length 3.0)))
> #{
> \markup \override #`(direction . ,dir) \dir-column {
> \raise #start \draw-line #(cons 0 (* dir len))
> \arrow-head #Y #dir ##t
> }
> #}))
> \arpeggio
> #})
>
> {
> a'\arrow #UP fis'\tweak padding 0 \tweak length 2.5 \arrow #DOWN
> }
> ```
>
> Best,
>
> Jean
signature.asc
Description: This is a digitally signed message part.