Naturally, but a music function like that misses the point. The current
way isn't cumbersome because it's verbose, it's cumbersome because it
requires breaking music into separate blocks using braces. What I'd like
to be able to do is change the transposition like a context property, so
that I could write something like:
clarinet = \relative c' {
\transposing bf
c4 d e d
\tag #'score \transposing a
c d e d
\tag #'parts \transposing a
\tag #'score \transposing c'
c d e d
}
Obviously, this is a contrived situation, but you see what I'm getting
at. Breaking music expressions into separate blocks also necessitates
breaking spanners, etc.
Saul
On 05/08/2014 01:18 AM, David Kastrup wrote:
Shevek <s...@saultobin.com> writes:
If I understand correctly, what Orm wants is to be able to write something
like this:
clarinet = \relative c' {
\transposing bf
c4 d e d |
\transposing a
c d e d
}
And get the output to show d e fs e ef f g f (using English spelling).
Currently, in order to enter music in concert pitch and have it display
transposing, one needs to do the following:
clarinet = {
\transposition bf
\transpose bf c' {
\relative c' {
c4 d e d
}
}
\transposition a
\transpose a c' {
\relative c' {
c4 d e d
}
}
}
This is cumbersome. It becomes a particular pain if one wants to do multiple
editions with different transpositions. It would be much, much easier IMO if
this could be accomplished with a single line command, like in the first
snippet.
"Much much easier"? Hardly. You can, of course, write something like
transposing =
#(define-music-function (parser location p m) (ly:pitch? ly:music?)
(make-relative (m) m
#{ \transposition #p
\transpose #p c' #m #}))
(or leave out the call to make-relative if you don't care about an outer
\relative working "as expected") and use it like
clarinet = \relative c' {
\transposing bf {
c4 d e d | }
\transposing a {
c d e d }
}
But I don't see that this is really all that much of a winning
proposition.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user