[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Markup-Command shortcut
From: |
Aaron Hill |
Subject: |
Re: Markup-Command shortcut |
Date: |
Thu, 09 Apr 2020 12:25:40 -0700 |
User-agent: |
Roundcube Webmail/1.4.2 |
On 2020-04-09 11:56 am, foxfanfare wrote:
But I don't understand, why is that shortcut also not working then?
#(define-markup-command (subUp layout props f1 f2)
(string? string?)
(interpret-markup layout props
#{
\markup {
\overtie \line { \concat { #f1 \hspace #0.15 #f2 } }
}
#}))
subst = \finger \markup \subUp \etc
\relative c' {
c1\finger \markup \subUp "1" "2"
c\subst "1" "2"
}
David K. would have to explain the idiosyncrasies of \etc, but it seems
not to like the two arguments.
All you need to do is define your own music function without the \etc
shorthand. You could eliminate the need for the markup command as well:
%%%%
\version "2.20.0"
#(define-markup-command (subUp layout props f1 f2) (markup? markup?)
(interpret-markup layout props
#{ \markup \overtie \concat { #f1 \hspace #0.15 #f2 } #}))
subst = #(define-music-function (f1 f2) (markup? markup?)
#{ \finger \markup \subUp #f1 #f2 #})
substII = #(define-music-function (f1 f2) (markup? markup?)
#{ \finger \markup \overtie \concat { #f1 \hspace #0.15 #f2 } #})
\relative c' {
c1\finger \markup \subUp "1" "2"
c\subst "1" "2"
c\substII \markup \with-color #red "1" \markup \circle "2"
}
%%%%
NOTE: In general, prefer markup? to string? for markup-related
arguments. You never know when you might want to provide more than just
simple text as demonstrated above.
-- Aaron Hill