[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Align scores in markup
From: |
Michael Gerdau |
Subject: |
Re: Align scores in markup |
Date: |
Fri, 14 Aug 2015 16:15:29 +0200 |
User-agent: |
KMail/4.14.10 (Linux/4.1.4-1-ARCH; KDE/4.14.10; x86_64; ; ) |
> the custom function helps for readability and reuse of score snippets.
Hmm....let's see.
Your preferred version:
%%%%%%%%%%
\version "2.19.24"
%=============================================
% WRITE SCORE
%
%=============================================
#(define-markup-command (writeScore layout props music) (ly:music?)
(let ((score (ly:make-score music))
(score-layout (ly:output-def-clone $defaultlayout)))
;; possibly, change some settings in the \layout block
%(ly:output-def-set-variable! score-layout 'indent 0)
;; add the \layout block to the score
(ly:score-add-output-def! score score-layout)
(interpret-markup layout props (markup #:score score) )
))
musicA = { c' d' e' }
musicB = { c'''' d'''' e'''' }
\markup {
"this should be aligned" \writeScore #musicA
"with this " \writeScore #musicB
}
%%%%%%%%%%
My preferred version:
%%%%%%%%%%
\version "2.19.24"
\paper { indent = 0 }
musicA = { c' d' e' }
musicB = { c'''' d'''' e'''' }
\markup {
"this should be aligned" \score { \musicA }
"with this " \score { \musicB }
}
%%%%%%%%%%
I don't see any benefit in terms of readability in the version with the
custom function. Reuse of score snippets is identical. No gain either.
I'm not able to attribute being more concise to either version.
The whole argument is somewhat nitpicking though. If you prefer your
custom function that's fine.
Kind regards,
Michael
--
Michael Gerdau email: address@hidden
GPG-keys available on request or at public keyserver
signature.asc
Description: This is a digitally signed message part.