On 15/03/2015 04:42, Pierre Perol-Schneider wrote:
Hi,

In order to make a new guitar barré function, I'm trying to merge the attached markup-command with an event-function (without success - problem is on line #90)

Not to answer your question, but why not do it like this, which seems a lot simpler. If you want to preface the Roman numeral fret number with "C", just add "C" as the first thing after the opening brace for the markup.

\version "2.18.2"

beginBarre = #(define-event-function (parser location fretnum partial)
                (number? number?)
                #{
                  \tweak bound-details.left.text
                  \markup\small\bold\concat { #(format #f "~@r" fretnum)
\sub #(number->string partial) }
                  \tweak style #'line
                  \tweak font-shape #'upright
\tweak bound-details.right.text \markup { \draw-line #'(0 . -1) }
                  \tweak bound-details.left.stencil-align-dir-y #0.35
                  \tweak bound-details.left.padding #-0.25
                  \tweak bound-details.right.padding #-1
                  \tweak bound-details.right-broken.padding #0.5
                  \tweak bound-details.left-broken.padding #2
                  \tweak bound-details.left-broken.text ##f
                  \tweak bound-details.right-broken.text ##f
                  \startTextSpan
                #})
endBarre = \stopTextSpan

{
  \clef "G_8"
  \key d\minor
  <<
    { \voiceOne a'16[ \beginBarre 3 4 bes d' bes f'8] \endBarre }
    \\
    { \voiceTwo d2 }
  >>
}

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

Reply via email to