|
From: | David Nalesnik |
Subject: | Re: Merging a markup-command with an event-function |
Date: | Sat, 14 Mar 2015 13:03:49 -0500 |
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):
%%%%%%%%%%%%%%%%%
\version "2.18.2"
Prefix = \markup {
%% uncomment/comment these lines for C, C slashed, B or B slashed prefix :
\roman C
%\combine \roman C \translate #'(0.65 . -0.25) \override #'(thickness . 1.2) \draw-line #'(0 . 1.8)
%\roman B
%\combine \roman B \translate #'(0.65 . -0.25) \override #'(thickness . 1.2) \draw-line #'(0 . 1.8)
%%%%%%%%%%%%
\hspace #0.2
}
#(define-markup-command (prefix layout props string-qty) (integer?)
(interpret-markup layout props
(case string-qty
((2) #{
\markup {
\override #'(font-family . typewriter)
\concat {
\raise #.15
\fontsize #-6
{
\raise #.5 "1"
\hspace #-.2
\raise #.2 "/"
\hspace #-.2
"3"
}
\Prefix
}
}
#})
((3) #{
\markup {
\override #'(font-family . typewriter)
\concat {
\raise #.15
\fontsize #-6
{
\raise #.5 "1"
\hspace #-.2
\raise #.2 "/"
\hspace #-.2
"2"
}
\Prefix
}
}
#})
((4) #{
\markup {
\override #'(font-family . typewriter)
\concat {
\raise #.15
\fontsize #-6
{
\raise #.5 "2"
\hspace #-.2
\raise #.2 "/"
\hspace #-.2
"3"
}
\Prefix
}
}
#})
((5) #{
\markup {
\override #'(font-family . typewriter)
\concat {
\raise #.15
\fontsize #-6
{
\raise #.5 "5"
\hspace #-.2
\raise #.2 "/"
\hspace #-.2
"6"
}
\Prefix
}
}
#})
(else
#{ \markup\Prefix #}))))
startBarre =
#(define-event-function (parser location arg-string-qty fret-nbr) (integer? markup?)
;; here's the problem ??
(define string-qty arg-string-qty)
;; hereunder should be fine:
(let* ((mrkp (markup #:upright #:concat (prefix fret-nbr))))
(let* ((mrkp (markup #:upright #:concat (#:lower 0.08 prefix #:lower 0.05 fret-nbr #:hspace 0.3))))
[Prev in Thread] | Current Thread | [Next in Thread] |