[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Merging a markup-command with an event-function
From: |
Nick Payne |
Subject: |
Re: Merging a markup-command with an event-function |
Date: |
Sun, 15 Mar 2015 12:55:11 +1100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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 "address@hidden"
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 }
>>
}
Re: Merging a markup-command with an event-function,
Nick Payne <=