[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: custom markup for \tempo
From: Wilbert Berendsen <wbsoft () xs4all ! nl>
Date: 2014-04-04 9:13:54
Message-ID: 20140404111354.4220ab6e () sweelinck
[Download RAW message or body]
Op Fri, 4 Apr 2014 10:19:40 +0200
Simon Bailey <simon@bailey.at> schreef:
> hello, the list!
>
> i have constructed the following:
>
> %%% SNIP %%%
> #(define-markup-command
> (nbTempo layout props expression beat tempo)
> (markup? string? markup?)
> (interpret-markup layout props
> #{
> \markup {
> \override #'(baseline-skip . 2)
> \column {
> \concat { \teeny { \raise #0.5 { \note #beat #UP } }
> \normal-text { " = " #tempo } }
> \normal-text #expression
> }
> }
> #}
> )
> )
>
> \relative c' {
> \tempo \markup \nbTempo "a tempo" #"4" "90"
> c1 c1
> }
> %%% SNAP %%%
>
> however, I would like to replace the convoluted call "\tempo \markup
> \nbTempo" with just "\nbTempo".
>
> How would I go about this? As an added bonus, the midi tempo could
> also be set in this function.
Make nbTempo a music function that accepts the arguments and calls the
markup command (which I renamed to nbTempomkup). Like this:
%%% SNIP %%%
#(define-markup-command
(nbTempomkup layout props expression beat tempo)
(markup? string? markup?)
(interpret-markup layout props
#{
\markup {
\override #'(baseline-skip . 2)
\column {
\concat {
\teeny { \raise #0.5 { \note #beat #UP } } \normal-text
{ " = " #tempo }
}
\normal-text #expression
}
}
#}))
nbTempo = #
(define-music-function
(parser location expression beat tempo)
(markup? string? markup?)
#{
\tempo \markup \nbTempomkup #expression #beat #tempo
#})
\relative c' {
\nbTempo "a tempo" #"4" "90"
c1 c1
}
%%% SNAP %%%
Best!
Wilbert
--
Wilbert Berendsen
(http://www.wilbertberendsen.nl)
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic