%%%%%%%%%%%%%%%%%%%
\version "2.20.0"
#(define (make-bend x)
(make-music 'BendAfterEvent 'delta-step x))
bend =#(define-music-function
(delta)
(integer?)
(make-bend (* -1 delta)))
bendBefore = #(define-music-function
(argument)
(integer?)
#{
\once \override BendAfter.rotation = #'(-180 -1 -1)
\bend $argument
#}
)
{
c'1\bendAfter #4 e'1 d' \bendBefore #5 e'
}
%%%%%%%%%%%%%%%%%%%
This fixes the GUILE-Error by removing the extra “#” before “$argument”, but
now I get this error:
warning: Unattached BendAfterEvent
c'1\bendAfter #4 e'1 d'
\bendBefore #5 e'
It is probably looking for a note to attach the “bend” to, but I do not know
lilypond and scheme well enough to be able to fix it.
One temporary solution would be to use a \bendAfter command and just manually
tweak the rotation via “\once \override BendAfter.rotation = #'(Rotation X Y)”.
Von: lilypond-user
<[email protected]> Im Auftrag von
Mogens Lemvig Hansen
Gesendet: Donnerstag, 26. März 2020 20:40
An: Lilypond User <[email protected]>
Betreff: Bend before
Hi,
The bendBefore code at
<http://lilypond.1069038.n5.nabble.com/bends-before-notes-how-to-td22214.html>
http://lilypond.1069038.n5.nabble.com/bends-before-notes-how-to-td22214.html
does not work for me (version 2.20.0).
error: GUILE signaled an error for the expression beginning here
\bend #
$argument
Does anyone have a solution?
Regards,
Mogens