I found a couple of typos in my previous patch, a patched patch is
included below.
> > The greatest news in this patch, however, is the support for
> > major and minor keys (easily extendible to dorian a.s.o.).
> > Just write \major or \minor to indicate if all following
> > \key commands are given in \major or \minor, respectively.
> > Note that a \major or \minor doesn't change the key directly,
> > just influences the coming \key commands.
>
> I'm wondering if this is really the best way to do this. It struck me
> as somewhat roundabout. There is a property called keymodality that
> is set to shift the interpretation of keys. This creates a kind of
> unnatural context dependent behavior.
>
> What about simply having a second optional argument to the \key
> keyword.
>
> So you could write
>
> \key a 3;
>
> in order to obtain A-minor. Then identifiers "minor" and "major" can
> be created that are simply equal to 3 and 0 respectively, so you can
> then do "\key a \minor;"
Yes, that's the second alternative I was considering. Being lazy, I
chose the easiest one to implement.
What do you say, do you prefer Adrian's alternative?
> What is the behavior of \key with keymodality nonzero when the
> specified key is not sharp or flat? How does it decide whether to use
> sharps or flats?
That's a good question. It should give the key with fewest sharps or
flats, respectively. If you don't want this, rewrite enharmonically,
e.g. 'eis' instead of 'f'. I hope this is what happens at the moment.
/Mats
--------
The patch for the files ps-lookup.hh and tex-lookup.hh should have
been (false replaced by true):
diff -urN ../lilypond-1.0.16/lily/include/ps-lookup.hh ./lily/include/ps-lookup.hh
--- ../lilypond-1.0.16/lily/include/ps-lookup.hh Mon Oct 12 14:10:55 1998
+++ ./lily/include/ps-lookup.hh Sat Oct 17 01:22:03 1998
@@ -19,7 +19,7 @@
Ps_lookup (Symtables const& s);
virtual ~Ps_lookup ();
- virtual Atom afm_find (String s) const;
+ virtual Atom afm_find (String s, bool warn=true) const;
virtual Atom* atom_p (String, int, Box) const;
virtual String character_str (int i) const;
virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
diff -urN ../lilypond-1.0.16/lily/include/tex-lookup.hh ./lily/include/tex-lookup.hh
--- ../lilypond-1.0.16/lily/include/tex-lookup.hh Mon Oct 12 14:10:55 1998
+++ ./lily/include/tex-lookup.hh Sat Oct 17 01:21:50 1998
@@ -20,7 +20,7 @@
Tex_lookup (Symtables const& s);
virtual ~Tex_lookup();
- virtual Atom afm_find (String s) const;
+ virtual Atom afm_find (String s, bool warn=true) const;
virtual String character_str (int i) const;
virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
virtual Atom* atom_p (String, int, Box) const;