[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get and print current clef
From: |
David Kastrup |
Subject: |
Re: get and print current clef |
Date: |
Sat, 31 May 2014 16:30:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Paul Morris <address@hidden> writes:
> David Kastrup wrote
>> I am leaning towards redefining
>>
>> clef =
>> #(define-music-function (parser location type) ((string?))
>> (_i "Set the current clef to @var{type} if specified,
>> or force a repetition of the current clef when @code{\\default}
>> is given instead.")
>> (if type
>> (make-clef-set type)
>> #{ \set Staff.forceClef = ##t #}))
>>
>> which then would allow using \clef \default.
>
> Good idea. Thinking about the wording, what about \clef \current
> instead?
Not negotiable:
> I see that \default already works here, although I don't know why. (I
> couldn't find \default in the manuals.)
<URL:http://www.lilypond.org/doc/v2.18/Documentation/extending/scheme-function-usage>
Yes, it's underrepresented in pretty much _all_ manuals.
> One reason \current is clearer is that the "default" clef when a clef
> is not specified is always the treble clef. Anyway, just something to
> consider.
We already have \key \default for a similar purpose.
> Here's something else to consider. Should the following display the second
> bass clef?
>
> {
> \clef bass
> c1
> \clef bass
> c1
> }
>
> For example, I can see users asking "Why do I have to use \clef \default?
> Why can't I just enter \clef bass again? Why doesn't \clef always display a
> clef?"
>
> Hmmm... are there any cases where you'd want to enter \clef ... but
> not display a clef? (I realize that changing this behavior would
> entail more significant code changes than \clef \default.)
\clef treble ... \repeat unfold 2 { \clef treble ... \clef bass ... }
You don't want to see the treble clef in the first unfold of the
repetition.
Also instrument definitions may contain a clef. When invoking a
particular instrument that happens to use the same clef as previously,
you don't want to see a clef repetition.
--
David Kastrup