From: Mats Bengtsson [mailto:[EMAIL PROTECTED] 
> Sven Axelsson wrote:
> > As far as I understand, the above should be
> > the same as putting
> > 
> > \override Score.KeySignature #'print-function = ##f
> > \set Score.extraNatural = ##f
> > \set Staff.keySignature = #'((0 . 2) (3 . 2))
> > 
> > in the score. But, no, it isn't. Anyone know why?
> 
> For the keySignature, I have already provided the explanation, namely
> that the default keySignature is hard-coded into the program 
> and cannot be changed in the \layout{...} block. Why the program 
> is designed that way is a completely different question, though.

I'm sorry to keep on harping about this, but I have an almost good 
solution now, and I want to get it just right.

I now put this in my include file (bagpipe.ly)

% Bagpipe music is written in something like D major. If we use
% flattened notes, the flat should be shown on all instances.

hideKeySignature = {
  % We normally don't want to show the key signature.
  \override Score.KeySignature #'print-function = ##f
  \set Score.extraNatural = ##f
  \set Staff.keySignature = #'((0 . 2) (3 . 2))
  #(set-accidental-style 'forget)
}
showKeySignature = {
  % Show the key signature e.g. for BMW compatibility.
  \override Score.KeySignature #'print-function =
#'Key_signature_interface::print
  \set Score.extraNatural = ##f
  \set Staff.keySignature = #'((0 . 2) (3 . 2))
  #(set-accidental-style 'forget)
}

Well, in 99.9% of all cases, the user wants to use hideKeySignature. 
Is there any way at all to automatically apply this function without 
explicitly writing it in the score? Perhaps using a Scheme music function
that injects this function at the start of every new staff? Anything?

Otherwise, I guess I have to live with always specifying hideKeySignature,
but I really, really want to avoid that.

-- 
Sven Axelsson



_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to