Le 25/04/2022 à 11:30, Martín Rincón Botero a écrit :
> Dear list,
>
> compare:
>
> {
> c'4->-.
> }
>
>
> with:
>
> {
> c'4->--
> }
>
>
>
> This last compound articulation is wrong. In the first example the
> staccato (even though it was typed after the accent) is correctly
> printed first (immediately below the note-head) and then the accent.
> With tenuto-accent, apparently Lilypond expects you to type both
> articulations in the right order, which indeed prints a correct
> articulation:
>
> {
> c'4--->
> }
>
>
> /Enhancement request:/ tenuto-accents should be printed correctly
> independently of the order of input, just like staccato-accents.
Well, an enhancement request sounds like a topic that could be
raised on the bug-lilypond mailing list.
Meanwhile, you can play with script-priority:
\version "2.22.2" % also works in 2.23.8
#(use-modules (ice-9 match))
#(define (nested-alist-set! alist path value)
(match path
(()
value)
((head . rest)
(assq-set! alist head (nested-alist-set! (assoc-get head alist '())
rest
value)))))
overrideForScriptType =
#(let ((script-type? (if (ly:version? >= '(2 23 6))
symbol?
string?)))
(define-music-function (type property value) (script-type? symbol?
scheme?)
(applyContext
(lambda (context)
(let* ((orig (ly:context-property context 'scriptDefinitions))
(new (nested-alist-set! orig
(list type property)
value)))
(ly:context-set-property! context 'scriptDefinitions new))))))
\new Voice {
\overrideForScriptType tenuto script-priority 0
\overrideForScriptType accent script-priority 100
c'4---> 4->--
}
Best,
Jean