]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/ambitus.ly: move file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 19 Jan 2003 12:58:18 +0000 (12:58 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 19 Jan 2003 12:58:18 +0000 (12:58 +0000)
* lily/include/pitch.hh (class Pitch): make Pitch objects immutable.

* lily/event.cc (transpose): add tonic property to Key_change_req
and to Key_engraver.

33 files changed:
ChangeLog
Documentation/user/tutorial.itely
input/regression/ambitus.ly [new file with mode: 0644]
input/regression/finger-chords.ly
input/template/piano-melody-lyrics.ly
input/test/ambitus.ly [deleted file]
input/test/fingering.ly
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/ambitus.cc
lily/chord.cc
lily/completion-note-heads-engraver.cc
lily/event.cc
lily/include/event.hh
lily/include/pitch.hh
lily/key-engraver.cc
lily/key-performer.cc
lily/new-accidental-engraver.cc
lily/new-chord-name-engraver.cc
lily/new-fingering-engraver.cc
lily/note-head.cc
lily/parser.yy
lily/pitch.cc
lily/rest-collision.cc
lily/staff-symbol-engraver.cc
lily/stem-engraver.cc
lily/thread-devnull-engraver.cc
lily/timing-engraver.cc
scm/double-plus-new-chord-name.scm
scm/grob-property-description.scm
scm/music-property-description.scm
scm/music-types.scm
scm/translator-property-description.scm

index fdc6a70021ff7cc46b16be2a6ba37c1f15744c03..8ebd6e252168c39adf44f748653445b80c2f9745 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-01-19  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * input/regression/ambitus.ly:  move file.      
+
+       * lily/include/pitch.hh (class Pitch): make Pitch objects immutable.
+
+       * lily/event.cc (transpose): add tonic property to Key_change_req
+       and to Key_engraver.
+
 2003-01-17  Heikki Junes  <hjunes@cc.hut.fi>
 
        * Documentation/user/refman.itely: fix typo.
index a90fada776f41833309ff6a88328477319fe76f2..b7d81bee1942354cb42694234291ded2e85d8e69 100644 (file)
@@ -752,7 +752,10 @@ demonstrated here:
 
 In this example, @code{staffA} and @code{staffB} are names that are
 given to the staves.  It doesn't matter what names you give, as long
-as each staff has a different name.
+as each staff has a different name. If you give them the same name,
+LilyPond will assume that you only want one staff, and will but both
+pieces of music on the same staff.
+
 
 @separate
 
@@ -1457,8 +1460,6 @@ The convention for naming @code{LyricsVoice} and @code{Voice} must
 also be used to get melismata on rests correct.
 
 
-@c    I think we need to change the name of this section, but that
-@c    would probably involve a lot of changes in other places too.
 @node More movements 
 @section More movements
 
@@ -1468,16 +1469,6 @@ you need to use @code{ly2dvi}, which comes with LilyPond.  @code{ly2dvi}
 creates the title, then calls @code{lilypond} to format the sheet music.
 In this section, we show you how to create titles like this:
 
-@c    Old version of the above paragraph.
-@c LilyPond only produces sheet music; it doesn't concern itself with
-@c producing titles.  Titles are produced using a simply wrapper program
-@c This is the jobs of a simple wrapper
-@c program called ly2dvi. @code{ly2dvi} calls LilyPond to do the
-@c sheet music formatting. Then it produces titles, and ties together all
-@c inputs into a single @file{dvi} file.  In this section, we show some of
-@c the options  for titling.  We will show how you can produce a file
-@c that looks like this:
-
 @center @strong{Two miniatures}
 @flushright
 Opus 1.
@@ -1566,7 +1557,7 @@ versions using old print-outs.
 @cindex tag line
 
 Many people find the default tagline (``Lily was here'') too droll.  
-If that is the case, you can change @code{tagline} to somethign else,
+If that is the case, you can change @code{tagline} to something else,
 as shown above.
 
 @separate
diff --git a/input/regression/ambitus.ly b/input/regression/ambitus.ly
new file mode 100644 (file)
index 0000000..775ed18
--- /dev/null
@@ -0,0 +1,50 @@
+\header {
+    texidoc = "Ambituses indicate pitch ranges for voices."
+}
+
+\version "1.7.6"
+
+upper = \notes \relative c {
+       \clef "treble"
+       \key c \minor
+       as'' c e bes f cis d e f g f e d f d e
+       f d e e d f d e e d f d e e d f d e
+       f d e e d f d e e d f d e e d f d e
+}
+
+lower = \notes \relative c {
+       \clef "treble"
+       \key e \major
+       e'2 b4 g a c es fis a cis b a g f e d
+       f e d e f g f e d e f g f e d e f g
+       f e d e f g f e d e f g f e d e f g
+}
+
+\score { \context ChoirStaff {
+       <
+               \context Staff = one { \upper }
+               \context Staff = three { \lower }
+       > }
+       \paper {
+              \translator {
+                       \ScoreContext
+                       breakAlignOrder = #'(
+                               instrument-name
+                               left-edge
+                               ambitus
+                               span-bar
+                               breathing-sign
+                               clef
+                               key-signature
+                               staff-bar
+                               time-signature
+                               custos
+                       )
+               }
+               \translator {
+                       \VoiceContext
+                       \consists Ambitus_engraver
+               }
+       }
+}
+%% new-chords-done %%
index c09c095782b63ee86a54caad00acefb7637c75b3..4df28235faeb3fc40bf946ed2969a43954805173 100644 (file)
@@ -21,6 +21,8 @@ easier to process."
        << c-1  es-3 g-5 >> 4
        \property Voice.fingerHorizontalDirection = #RIGHT
        << c-1  e-2 g-3 b-5 >> 4-\arpeggio
+       \property Voice.fingerHorizontalDirection = #LEFT
+       << c_1  e-2 g-3 b^5 >> 4
        
 }
 
index 8c48c08a0809691ed62698d6b6534eb97bc75d55..31d1348c7de966fffd336ebc1835ca86327de9f5 100644 (file)
@@ -1,7 +1,8 @@
 \version "1.7.6"
 
 \header {
-  texidoc ="Classical song format: one staff with melody and lyrics, and piano accompaniment."
+  texidoc ="Classical song format: one staff with melody and lyrics,
+and piano accompaniment."
   
 }
 
diff --git a/input/test/ambitus.ly b/input/test/ambitus.ly
deleted file mode 100644 (file)
index 775ed18..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-\header {
-    texidoc = "Ambituses indicate pitch ranges for voices."
-}
-
-\version "1.7.6"
-
-upper = \notes \relative c {
-       \clef "treble"
-       \key c \minor
-       as'' c e bes f cis d e f g f e d f d e
-       f d e e d f d e e d f d e e d f d e
-       f d e e d f d e e d f d e e d f d e
-}
-
-lower = \notes \relative c {
-       \clef "treble"
-       \key e \major
-       e'2 b4 g a c es fis a cis b a g f e d
-       f e d e f g f e d e f g f e d e f g
-       f e d e f g f e d e f g f e d e f g
-}
-
-\score { \context ChoirStaff {
-       <
-               \context Staff = one { \upper }
-               \context Staff = three { \lower }
-       > }
-       \paper {
-              \translator {
-                       \ScoreContext
-                       breakAlignOrder = #'(
-                               instrument-name
-                               left-edge
-                               ambitus
-                               span-bar
-                               breathing-sign
-                               clef
-                               key-signature
-                               staff-bar
-                               time-signature
-                               custos
-                       )
-               }
-               \translator {
-                       \VoiceContext
-                       \consists Ambitus_engraver
-               }
-       }
-}
-%% new-chords-done %%
index 82bcebc90bb1801ba69faeb46db1f0377ea5ee06..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,10 +0,0 @@
-\version "1.7.6"
-
-
-
-\score {
-\notes \context Voice = VA \relative c'' {
-       \grace {[b8^1 c^2]} d4^3
-}
-\paper {linewidth = -1.  }}
-%% new-chords-done %%
index a50b5cf404b93c4e075c0cc46e54a51359b24bf2..fd26acd16c1c3251243f829c828878f586ade08d 100644 (file)
@@ -124,9 +124,9 @@ static int
 number_accidentals (SCM sig, Music * note, Pitch *pitch, SCM curbarnum, SCM lazyness, 
                    bool ignore_octave_b)
 {
-  int n = pitch->notename_;
-  int o = pitch->octave_;
-  int a = pitch->alteration_;
+  int n = pitch->get_notename ();
+  int o = pitch->get_octave();
+  int a = pitch->get_alteration ();
   int curbarnum_i = gh_scm2int (curbarnum);
   int accbarnum_i = 0;
 
@@ -300,7 +300,7 @@ Accidental_engraver::process_acknowledged_grobs ()
              announce_grob (a, SCM_EOL);
 
              
-             SCM accs = gh_cons (scm_int2num (pitch->alteration_), SCM_EOL);
+             SCM accs = gh_cons (scm_int2num (pitch->get_alteration ()), SCM_EOL);
              if (num == 2 && extra_natural_b)
                accs = gh_cons (scm_int2num (0), accs);
 
@@ -346,9 +346,9 @@ Accidental_engraver::process_acknowledged_grobs ()
          */
          
 
-         int n = pitch->notename_;
-         int o = pitch->octave_;
-         int a = pitch->alteration_;
+         int n = pitch->get_notename ();
+         int o = pitch->get_octave ();
+         int a = pitch->get_alteration ();
          SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
 
          /*
index a184776174a275d30a5b46bb6285fa5d73b65973..20cff55c0e447bd89c921ae4c8169b2182985c11 100644 (file)
@@ -54,7 +54,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a)
 
   Pitch *p= unsmob_pitch (mcause->get_mus_property ("pitch"));
 
-  int n = p->notename_;
+  int n = p->get_notename ();
 
   SCM accs = me->get_grob_property ("accidental-grobs");
   SCM key = scm_int2num (n);
index b71a2620fd883f1d285304c6162a27bbf91039ea..2a3a29f23b0f4e8cbd011fa17a07ede79d1c76e8 100644 (file)
  */
 
 /**
- * Given a pitch and a key_signature, decide what accidentals to show.
- *
- * Possible return values:
- *
- * 0: do not show any accidental
- * 1: show pitch->alteration_ only
- * 2: show pitch->alteration_, preceded by a natural sign
+  Given a pitch and a key_signature, decide what accidentals to show.
+  Possible return values:
+  0: do not show any accidental
+  1: show pitch->alteration_ only
+  2: show pitch->get_alteration, preceded by a natural sign
+
+  UGH: code duplication! See accidental-engraver.
  */
 static int
 number_accidentals (SCM key_signature, Pitch *pitch,
                    bool ignore_octave_b, bool force_accidental)
 {
-  int notename = pitch->notename_;
-  int octave = pitch->octave_;
-  int alteration = pitch->alteration_;
+  int notename = pitch->get_notename ();
+  int octave = pitch->get_octave();
+  int alteration = pitch->get_alteration();
 
   if (force_accidental) // ignore key signature
     return 1;
 
+  
 #if DEBUG_AMBITUS
   scm_display (key_signature, scm_current_output_port ());
 #endif
@@ -101,12 +105,12 @@ add_accidentals (Item *me, Molecule *head, int num_acc,
 {
   if (!num_acc)
     return;
-  if (pitch->alteration_)
+  if (pitch->get_alteration())
     {
       Molecule accidental (Font_interface::get_default_font (me)->
                           find_by_name (String ("accidentals-") +
                                         accidentals_style +
-                                        to_string (pitch->alteration_)));
+                                        to_string (pitch->get_alteration())));
       accidental.translate_axis (yoffs, Y_AXIS);
       head->add_at_edge (X_AXIS,  LEFT, accidental, 0.1, 0);
     }
index 024c54833a3b17083db734d11a5ea9f4a986dfb7..9248bad895fce049ddab0d9919ab4ffc792692e4 100644 (file)
@@ -81,8 +81,8 @@ Chord::member_notename (SCM p, SCM pitches)
            Urg, eindelijk gevonden: () != #f, kan maar niet aan wennen.
            Anders kon iets korter...
           */
-         if (unsmob_pitch (p)->notename_
-             == unsmob_pitch (ly_car (i))->notename_)
+         if (unsmob_pitch (p)->get_notename ()
+             == unsmob_pitch (ly_car (i))->get_notename ())
            {
              member = ly_car (i);
              break;
@@ -104,10 +104,10 @@ Chord::member_pitch (SCM p, SCM pitches)
     {
       for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
        {
-         if (unsmob_pitch (p)->notename_
-             == unsmob_pitch (ly_car (i))->notename_
-             && unsmob_pitch (p)->alteration_
-             == unsmob_pitch (ly_car (i))->alteration_)
+         if (unsmob_pitch (p)->get_notename ()
+             == unsmob_pitch (ly_car (i))->get_notename ()
+             && unsmob_pitch (p)->get_alteration()
+             == unsmob_pitch (ly_car (i))->get_alteration())
            {
              member = ly_car (i);
              break;
@@ -123,10 +123,10 @@ SCM
 Chord::step_scm (SCM tonic, SCM p)
 {
   /* De Pitch intervaas is nog beetje sleutelgat? */
-  int i = unsmob_pitch (p)->notename_
-    - unsmob_pitch (tonic)->notename_
-    + (unsmob_pitch (p)->octave_
-       - unsmob_pitch (tonic)->octave_) * 7;
+  int i = unsmob_pitch (p)->get_notename ()
+    - unsmob_pitch (tonic)->get_notename ()
+    + (unsmob_pitch (p)->get_octave ()
+       - unsmob_pitch (tonic)->get_octave ()) * 7;
   while (i < 0)
     i += 7;
   i++;
@@ -165,10 +165,10 @@ Chord::missing_thirds (SCM pitches)
       SCM p = ly_car (i);
       int step = gh_scm2int (step_scm (tonic, p));
       
-      if (unsmob_pitch (last)->notename_ == unsmob_pitch (p)->notename_)
+      if (unsmob_pitch (last)->get_notename () == unsmob_pitch (p)->get_notename ())
        {
-         int third = (unsmob_pitch (last)->notename_
-                      - unsmob_pitch (tonic)-> notename_ + 7) % 7;
+         int third = (unsmob_pitch (last)->get_notename ()
+                      - unsmob_pitch (tonic)-> get_notename () + 7) % 7;
          last = ly_pitch_transpose (last, scm_vector_ref (thirds, scm_int2num (third)));
        }
       
@@ -177,8 +177,8 @@ Chord::missing_thirds (SCM pitches)
          while (step > gh_scm2int (step_scm (tonic, last)))
            {
              missing = gh_cons (last, missing);
-             int third = (unsmob_pitch (last)->notename_
-                          - unsmob_pitch (tonic)->notename_ + 7) % 7;
+             int third = (unsmob_pitch (last)->get_notename ()
+                          - unsmob_pitch (tonic)->get_notename () + 7) % 7;
              last = ly_pitch_transpose (last, scm_vector_ref (thirds,
                                                      scm_int2num (third)));
            }
@@ -241,10 +241,13 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
       */
       if (p->get_octave ()  == -100)
         {
-          p->octave_ = 0;
+         dim_b = true;
+         Pitch t (0, p->get_notename(), p->get_alteration());
+         gh_set_car_x (i, t.smobbed_copy());
          dim_b = true;
        }
     }
+  
   add = transpose_pitches (tonic, add);
   add = lower_step (tonic, add, scm_int2num (7));
   add = scm_sort_list (add, Pitch::less_p_proc);
index 676c39a6ef483a61ecb6f33cf3927325394f3429..62cc6fec340a113e54fd4104d74829c5ba34487b 100644 (file)
@@ -309,9 +309,9 @@ Completion_heads_engraver::Completion_heads_engraver()
 }
 
 ENTER_DESCRIPTION(Completion_heads_engraver,
-/* descr */       "This engraver replaces
-@code{Note_heads_engraver}. It plays some trickery to
-break long notes and automatically tie them into the next measure.",
+/* descr */       "This engraver replaces "
+"@code{Note_heads_engraver}. It plays some trickery to "
+"break long notes and automatically tie them into the next measure.",
 /* creats*/       "NoteHead Dots",
 /* accepts */     "busy-playing-event note-event",
 /* acks  */      "",
index ad736eb79433fb6c3c6d243b95a1d4e5fc8ace52..199c85eb454d5f442eba8969817fde63f1586e1e 100644 (file)
@@ -37,12 +37,11 @@ Event::transpose (Pitch delta)
   if (!p)
     return ;
 
-  Pitch np = *p;
-  np.transpose (delta);
+  Pitch np = p->transposed (delta);
   
-  if (abs (np.alteration_) > 2)
+  if (abs (np.get_alteration ()) > 2)
     {
-       warning (_f ("Transposition by %s makes accidental larger than two",
+       warning (_f ("Transposition by %s makes alteration larger than two",
          delta.string ()));
     }
 
@@ -50,13 +49,13 @@ Event::transpose (Pitch delta)
 }
 
 Pitch
- Event::to_relative_octave (Pitch last)
+Event::to_relative_octave (Pitch last)
 {
   Pitch *old_pit = unsmob_pitch (get_mus_property ("pitch"));
   if (old_pit)
     {
       Pitch new_pit = *old_pit;
-      new_pit.to_relative_octave (last);
+      new_pit = new_pit.to_relative_octave (last);
       set_mus_property ("pitch", new_pit.smobbed_copy ());
   
       return new_pit;
@@ -112,6 +111,9 @@ LY_DEFINE(music_duration_compress, "ly:music-duration-compress", 2, 0,0,
 /*
   This is hairy, since the scale in a key-change event may contain
   octaveless notes.
+
+
+  TODO: this should use ly:pitch. 
  */
 LY_DEFINE(transpose_key_alist, "ly:transpose-key-alist",
          2, 0,0, (SCM l, SCM pitch),
@@ -127,24 +129,24 @@ LY_DEFINE(transpose_key_alist, "ly:transpose-key-alist",
       if (gh_pair_p (key))
        {
          Pitch orig (gh_scm2int (ly_car (key)),
-                             gh_scm2int (ly_cdr (key)),
-                             gh_scm2int (alter));
+                     gh_scm2int (ly_cdr (key)),
+                     gh_scm2int (alter));
 
-         orig.transpose (*p);
+         orig =orig.transposed (*p);
 
          SCM key = gh_cons (scm_int2num (orig.get_octave ()),
-                            scm_int2num (orig.notename_));
+                            scm_int2num (orig.get_notename ()));
 
-         newlist = gh_cons (gh_cons (key, scm_int2num (orig.alteration_)),
+         newlist = gh_cons (gh_cons (key, scm_int2num (orig.get_alteration ())),
                             newlist);
        }
       else if (gh_number_p (key))
        {
          Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
-         orig.transpose (*p);
+         orig = orig.transposed (*p);
 
-         key =scm_int2num (orig.notename_);
-         alter = scm_int2num (orig.alteration_);
+         key =scm_int2num (orig.get_notename ());
+         alter = scm_int2num (orig.get_alteration());
          newlist = gh_cons (gh_cons (key, alter), newlist);
        }
     }
@@ -152,14 +154,16 @@ LY_DEFINE(transpose_key_alist, "ly:transpose-key-alist",
 }
 
 void
-Key_change_req::transpose (Pitch p)
+Key_change_ev::transpose (Pitch p)
 {
   SCM pa = get_mus_property ("pitch-alist");
 
   set_mus_property ("pitch-alist", transpose_key_alist (pa, p.smobbed_copy()));
+  Pitch tonic = *unsmob_pitch (get_mus_property ("tonic"));
+  set_mus_property ("tonic",
+                   tonic.smobbed_copy ());
 }
 
-
 bool
 alist_equal_p (SCM a, SCM b)
 {
@@ -177,16 +181,4 @@ alist_equal_p (SCM a, SCM b)
     }
   return true;
 }
-
-bool
-Key_change_req::do_equal_b (Event const * m )const
-{
-  Key_change_req const * kc =dynamic_cast<Key_change_req const*> (m);
-
-  if(!kc)
-    return false;
-  return alist_equal_p (get_mus_property ("pitch-alist"),
-                       kc->get_mus_property ("pitch-alist"));
-}
-
-ADD_MUSIC (Key_change_req);
+ADD_MUSIC (Key_change_ev);
index 0d1823c8a5d3dce29ef2817bb767def7758663b6..ee60c1e9e32637ca0b3f75d018e4677c8fd1d1ae 100644 (file)
@@ -37,14 +37,13 @@ public:
 /**
     Handle key changes.
 */
-class Key_change_req  : public Event
+class Key_change_ev  : public Event
 {
 public:
   SCM pitch_alist ();
   
 protected:
   VIRTUAL_COPY_CONS (Music);
-  bool do_equal_b (Event const * ) const;
   void transpose (Pitch  d);
 };
 
index 613d45cf0568ab72a64e1c54e0049833e18f675a..a3c63fb25b64b6ceeb5414e262510799c9451736 100644 (file)
 #include "lily-proto.hh"
 #include "smobs.hh"
 
-/** A "tonal" pitch. This is a pitch as it figures in diatonal western
-   music (12 semitones in an octave), as opposed to a frequence in Hz
+/** A "tonal" pitch. This is a pitch used in diatonal western
+   music (12 semitones in an octave), as opposed to a frequency in Hz
    or a integer number of semitones.
-   
+
+  Pitch is lexicographically ordered by (octave, notename,
+    alteration).    
+  
+
+   TODO:
+
+   - add indeterminate octaves, so it can be used as a key in keySigature
+
+   - abstract out the representation of alteration_, so we can
+   put micropitches (quartertones, etc.) in the Pitch object
 */
 class Pitch
 {
-public:                                // fixme
+private:                               // fixme
   /*
-    TODO: use SCM -- (make private?)
+    TODO: use SCM
    */
 
     /// 0 is c, 6 is b
@@ -33,28 +43,23 @@ public:                             // fixme
 
   /// 0 is central c
   int octave_;
-  /*
-    mutators, so JUNKME.
-   */
   void transpose (Pitch);
   void up_to (int);
   void down_to (int);
+  void normalise ();
 
 public:
-
+  
   int get_octave () const;
   int get_notename () const;
   int get_alteration () const;
 
-  void normalise ();
-  /*
-    Pitch is lexicographically ordered by (octave, notename,
-    alteration).    
-   */
   Pitch (int octave, int notename,int accidental);
   Pitch ();
 
-  Pitch to_relative_octave (Pitch);
+  Pitch transposed (Pitch) const;
+  Pitch to_relative_octave (Pitch) const;
 
   static int compare (Pitch const&,Pitch const&);
   /// return large part of interval from central c
index cb28955a16eb32ef9992adae10d461729c4ffe91..ec5b4054b2214e7ac6833820dd52438ed9bca16c 100644 (file)
 #include "protected-scm.hh"
 #include "clef.hh"
 
+/*
+  TODO: The representation  of key sigs is all fucked.
+ */
+
 /**
   Make the key signature.
  */
 class Key_engraver : public Engraver
 {
   void create_key (bool);
-  void read_req (Key_change_req const * r);
-  Key_change_req * keyreq_;
+  void read_ev (Key_change_ev const * r);
+  Key_change_ev * key_ev_;
   Item * item_;
 
 public:
@@ -34,7 +38,7 @@ public:
 protected:
   virtual void initialize ();
   virtual void finalize ();
-  virtual bool try_music (Music *req);
+  virtual bool try_music (Music *ev);
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
   virtual void process_music ();
@@ -50,7 +54,7 @@ Key_engraver::finalize ()
 
 Key_engraver::Key_engraver ()
 {
-  keyreq_ = 0;
+  key_ev_ = 0;
   item_ = 0;
 }
 
@@ -69,7 +73,7 @@ Key_engraver::create_key (bool def)
       item_->set_grob_property ("old-accidentals", get_property ("lastKeySignature"));
       item_->set_grob_property ("new-accidentals", get_property ("keySignature"));
 
-      announce_grob(item_, keyreq_ ? keyreq_->self_scm() : SCM_EOL);
+      announce_grob(item_, key_ev_ ? key_ev_->self_scm() : SCM_EOL);
     }
 
   if (!def)
@@ -82,18 +86,18 @@ Key_engraver::create_key (bool def)
 
 
 bool
-Key_engraver::try_music (Music * req)
+Key_engraver::try_music (Music * ev)
 {
-  //  if (Key_change_req *kc = dynamic_cast <Key_change_req *> (req))
-  if (req->is_mus_type ("key-change-event"))
+  //  if (Key_change_ev *kc = dynamic_cast <Key_change_ev *> (ev))
+  if (ev->is_mus_type ("key-change-event"))
     {
-      if (!keyreq_)
+      if (!key_ev_)
        {
          /*
            do this only once, just to be on the safe side.
            */      
-         keyreq_ = dynamic_cast<Key_change_req*> (req); // UGH.
-         read_req (keyreq_);
+         key_ev_ = dynamic_cast<Key_change_ev*> (ev); // UGH.
+         read_ev (key_ev_);
        }
       
       return true;
@@ -124,7 +128,7 @@ Key_engraver::acknowledge_grob (Grob_info info)
 void
 Key_engraver::process_music ()
 {
-  if (keyreq_ ||
+  if (key_ev_ ||
       get_property ("lastKeySignature") != get_property ("keySignature"))
     create_key (false);
 }
@@ -142,7 +146,7 @@ Key_engraver::stop_translation_timestep ()
 
 
 void
-Key_engraver::read_req (Key_change_req const * r)
+Key_engraver::read_ev (Key_change_ev const * r)
 {
   SCM p = r->get_mus_property ("pitch-alist");
   if (!gh_pair_p (p))
@@ -164,19 +168,16 @@ Key_engraver::read_req (Key_change_req const * r)
     if (gh_scm2int (ly_cdar (s)))
       accs = gh_cons (ly_car (s), accs);
 
-#if 0
-  daddy_trans_->set_property ("lastKeySignature",
-                               get_property ("keySignature"));
-#endif
-  
   daddy_trans_->set_property ("keySignature", accs);
+  daddy_trans_->set_property ("tonic" ,
+                             r->get_mus_property ("tonic"));
 }
 
 
 void
 Key_engraver::start_translation_timestep ()
 {
-  keyreq_ = 0;
+  key_ev_ = 0;
   daddy_trans_->set_property ("lastKeySignature", get_property ("keySignature"));
 }
 
@@ -186,6 +187,10 @@ Key_engraver::initialize ()
 {
   daddy_trans_->set_property ("keySignature", SCM_EOL);
   daddy_trans_->set_property ("lastKeySignature", SCM_EOL);
+
+  Pitch p(0,0,0);
+  daddy_trans_->set_property ("tonic", p.smobbed_copy ());
+
 }
 
 
@@ -195,4 +200,4 @@ ENTER_DESCRIPTION(Key_engraver,
 /* accepts */     "key-change-event",
 /* acks  */      "bar-line-interface clef-interface",
 /* reads */       "keySignature lastKeySignature explicitKeySignatureVisibility createKeyOnClefChange keyAccidentalOrder keySignature",
-/* write */       "lastKeySignature");
+/* write */       "lastKeySignature tonic keySignature");
index e67c68f27dd5170040700c090183e022538786be..8836930bb4908ac7813095a6203bdc8b1f7e309e 100644 (file)
@@ -25,7 +25,7 @@ protected:
   virtual void stop_translation_timestep ();
 
 private:
-  Key_change_req* key_req_;
+  Key_change_ev* key_req_;
   Audio_key* audio_;
 };
 
@@ -61,8 +61,8 @@ Key_performer::create_audio_elements ()
                   (7 - gh_scm2int (ly_caar (pitchlist))) % 7,
                   -gh_scm2int (ly_cdar (pitchlist)));
 
-      my_do.transpose (to_c);
-      to_c.alteration_ -= my_do.alteration_;
+      my_do = my_do.transposed (to_c);
+      to_c = my_do.transposed (Pitch(0,0,- my_do.get_alteration ()));
 
       SCM c_pitchlist = transpose_key_alist (pitchlist, to_c.smobbed_copy());
       SCM major = gh_call1 (proc, c_pitchlist);
@@ -87,7 +87,7 @@ Key_performer::stop_translation_timestep ()
 bool
 Key_performer::try_music (Music* req)
 {
-  if (Key_change_req *kc = dynamic_cast <Key_change_req *> (req))
+  if (Key_change_ev *kc = dynamic_cast <Key_change_ev *> (req))
     {
       if (key_req_)
        warning (_ ("FIXME: key change merge"));
index b9452f77cdaf227b6cc7eee9b7a44dd3cacff94a..aa03965df4b1baf1e064f03a15c7fb5958d9878d 100644 (file)
@@ -185,9 +185,9 @@ static int
 number_accidentals (SCM sig, Music * note, Pitch *pitch, SCM curbarnum, SCM lazyness, 
                    bool ignore_octave_b)
 {
-  int n = pitch->notename_;
-  int o = pitch->octave_;
-  int a = pitch->alteration_;
+  int n = pitch->get_notename ();
+  int o = pitch->get_octave ();
+  int a = pitch->get_alteration (); 
   int curbarnum_i = gh_scm2int (curbarnum);
   int accbarnum_i = 0;
 
@@ -324,9 +324,9 @@ New_accidental_engraver::process_grobs_first_pass ()
       for (int j = 0; j < ties_.size (); j++)
        if (support == Tie::head (ties_[j], RIGHT))
          tie_changes = accidentals_[i].different_;
-      int n = pitch->notename_;
-      int o = pitch->octave_;
-      int a = pitch->alteration_;
+      int n = pitch->get_notename ();
+      int o = pitch->get_octave ();
+      int a = pitch->get_alteration ();
       SCM o_s = gh_int2scm (o);
       SCM n_s = gh_int2scm (n);
       SCM on_s = gh_cons (o_s,n_s);
@@ -434,7 +434,7 @@ New_accidental_engraver::process_grobs_second_pass ()
          announce_grob (a, SCM_EOL);
          
          
-         SCM accs = gh_cons (gh_int2scm (pitch->alteration_), SCM_EOL);
+         SCM accs = gh_cons (gh_int2scm (pitch->get_alteration ()), SCM_EOL);
          if (num == 2 && extra_natural_b)
            accs = gh_cons (gh_int2scm (0), accs);
          
index 49e728306f9be19b4b356bccc08a2fca677e74a4..d76e288fc4d12e8c82045cd86032d62c78e4e5c1 100644 (file)
@@ -74,6 +74,7 @@ New_chord_name_engraver::process_music ()
 
   pitches = scm_sort_list (pitches, Pitch::less_p_proc);
 
+
   SCM name_proc = get_property ("chordNameFunction");
   SCM exceptions = get_property ("chordNameExceptions");
   SCM markup = scm_call_4 (name_proc, pitches, bass, inversion, exceptions);
index 822808358575283d50781e1e3d6ef46ddc6f2ee8..1018d465a82fa42c61ba7f081dc3de07cc58b011 100644 (file)
@@ -169,6 +169,8 @@ New_fingering_engraver::position_scripts ()
     {      
       fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_grob_property( "staff-position"));
     }
+
+  SCM fhd = get_property ("fingerHorizontalDirection");
   
   Array<Finger_tuple> up, down, horiz;
   for (int i = fingerings_.size(); i--;)
@@ -187,15 +189,18 @@ New_fingering_engraver::position_scripts ()
     }
   
   fingerings_.sort (&Finger_tuple::compare);
-  SCM fhd = get_property ("fingerHorizontalDirection");
   
   if (ly_dir_p (fhd))
     {
-      up.push (fingerings_.pop());
-      down.push (fingerings_[0]);
-      fingerings_.del(0);
+      if (!up.size())
+       up.push (fingerings_.pop());
+      if (!down.size())
+       {
+         down.push (fingerings_[0]);
+         fingerings_.del(0);
+       }
 
-      horiz = fingerings_;
+      horiz.concat (fingerings_);
     }
   else
     {
index bbce8333531d01701b91ed850b73a24c09451781..a703d13db5a3c75e76f87f567ae6fb19998d4408 100644 (file)
@@ -196,7 +196,7 @@ Note_head::brew_ez_molecule (SCM smob)
   Pitch* pit =  unsmob_pitch (spitch);
 
   char s[2] = "a";
-  s[0] = (pit->notename_ + 2)%7 + 'a';
+  s[0] = (pit->get_notename () + 2)%7 + 'a';
   s[0] = toupper (s[0]);
   
   SCM charstr = scm_makfrom0str (s);
index d6a3f997d0e3af8f65fc83af9664f53c7b068487..1c7fb5b0d10418decfd04339e1dc7ff87868ee11 100644 (file)
@@ -42,12 +42,13 @@ TODO:
 * The rules for who is protecting what are very shady. Uniformise
   this.
 
-* There are too many lexical modes
+* There are too many lexical modes?
 
 
 */
 
 #include <ctype.h>
+#include <stdlib.h>
 
 #include "translator-def.hh"
 #include "lily-guile.hh"
@@ -73,6 +74,26 @@ TODO:
 #include "event.hh"
 #include "text-item.hh"
 
+
+
+#define MY_MAKE_MUSIC(x)  make_music_by_name (ly_symbol2scm (x))
+
+
+
+#define YYERROR_VERBOSE 1
+
+My_lily_parser* my_lily_parser;
+#define YYPARSE_PARAM my_lily_parser
+#define YYLEX_PARAM my_lily_parser
+#define THIS\
+       ((My_lily_parser *) my_lily_parser)
+
+#define yyerror THIS->parser_error
+
+
+
+
+
 bool
 regular_identifier_b (SCM id)
 {
@@ -116,8 +137,6 @@ set_music_properties (Music *p, SCM a)
 
 
 
-#define MY_MAKE_MUSIC(x)  make_music_by_name (ly_symbol2scm (x))
-
 Music* 
 set_property_music (SCM sym, SCM value)
 {
@@ -127,24 +146,6 @@ set_property_music (SCM sym, SCM value)
        return p;
 }
 
-
-// needed for bison.simple's malloc () and free ()
-
-// #include <malloc.h>
-#include <stdlib.h>
-
-
-
-#define YYERROR_VERBOSE 1
-
-My_lily_parser* my_lily_parser;
-#define YYPARSE_PARAM my_lily_parser
-#define YYLEX_PARAM my_lily_parser
-#define THIS\
-       ((My_lily_parser *) my_lily_parser)
-
-#define yyerror THIS->parser_error
-
 %}
 
 /* We use SCMs to do strings, because it saves us the trouble of
@@ -1405,8 +1406,10 @@ verbose_command_req:
                Music *key= MY_MAKE_MUSIC("KeyChangeEvent");
                
                key->set_mus_property ("pitch-alist", $3);
+               key->set_mus_property ("tonic", Pitch (0,0,0).smobbed_copy());
                ((Music*)key)->transpose (* unsmob_pitch ($2));
-               $$ = key; 
+
+               $$ = key;
        }
        ;
 
@@ -1513,15 +1516,13 @@ steno_pitch:
        }
        | NOTENAME_PITCH sup_quotes     {
                Pitch p = *unsmob_pitch ($1);
-               p.octave_ +=  $2;
+               p = p.transposed (Pitch ($2,0,0));
                $$ = p.smobbed_copy ();
        }
        | NOTENAME_PITCH sub_quotes      {
                Pitch p =* unsmob_pitch ($1);
-
-               p.octave_ +=  -$2;
+               p = p.transposed (Pitch (-$2,0,0));
                $$ = p.smobbed_copy ();
-
        }
        ;
 
@@ -1535,15 +1536,14 @@ steno_tonic_pitch:
        }
        | TONICNAME_PITCH sup_quotes    {
                Pitch p = *unsmob_pitch ($1);
-               p.octave_ +=  $2;
+               p = p.transposed (Pitch ($2,0,0));
                $$ = p.smobbed_copy ();
        }
        | TONICNAME_PITCH sub_quotes     {
                Pitch p =* unsmob_pitch ($1);
 
-               p.octave_ +=  -$2;
+               p = p.transposed (Pitch (-$2,0,0));
                $$ = p.smobbed_copy ();
-
        }
        ;
 
@@ -2067,27 +2067,17 @@ chord_step:
 
 chord_note:
        bare_unsigned {
-                Pitch m;
-               m.notename_ = ($1 - 1) % 7;
-               m.octave_ = $1 > 7 ? 1 : 0;
-               m.alteration_ = 0;
+               Pitch m($1 > 7 ? 1 : 0, ($1 - 1) % 7, 0);
 
                $$ = m.smobbed_copy ();
         } 
        | bare_unsigned '+' {
-               Pitch m;
-               m.notename_ = ($1 - 1) % 7;
-               m.octave_ = $1 > 7 ? 1 : 0;
-               m.alteration_ = 1;
-
+               Pitch m(  $1 > 7 ? 1 : 0,($1 - 1) % 7, 1);
 
                $$ = m.smobbed_copy ();
        }
        | bare_unsigned CHORD_MINUS {
-               Pitch m;
-               m.notename_ = ($1 - 1) % 7;
-               m.octave_ = $1 > 7 ? 1 : 0;
-               m.alteration_ = -1;
+               Pitch m(  $1 > 7 ? 1 : 0,($1 - 1) % 7, -1);
 
                $$ = m.smobbed_copy ();
        }
index f49b2bd8fb9dbcb86032296e69c937d00fc6772a..b4250900dc0b1556d02a6e33b645b802a3b57f9e 100644 (file)
@@ -140,13 +140,11 @@ Pitch
 interval (Pitch const & from , Pitch const & to )
 {
   int sound = to.semitone_pitch()  - from.semitone_pitch ();
-  Pitch pt ;
-  pt.octave_ = to.octave_ - from.octave_;
-  pt.notename_ = to.notename_ - from.notename_;
-  pt.alteration_ = to.alteration_ - from.alteration_;
-  pt.alteration_ += sound - pt.semitone_pitch();
+  Pitch pt (to.get_octave () - from.get_octave (),
+           to.get_notename() - from.get_notename(),
+           to.get_alteration() - from.get_alteration());
 
-  return pt;
+  return pt.transposed (Pitch(0,0,sound - pt.semitone_pitch()));
 }
 
 
@@ -184,7 +182,7 @@ Pitch::string () const
   return copy of resulting pitch
  */
 Pitch
-Pitch::to_relative_octave (Pitch p)
+Pitch::to_relative_octave (Pitch p) const
 {
   int oct_mod = octave_  + 1;  // account for c' = octave 1 iso. 0 4
   Pitch up_pitch (p);
@@ -204,9 +202,7 @@ Pitch::to_relative_octave (Pitch p)
     n = down_pitch;
   
   n.octave_ += oct_mod;
-
-  *this = n;
-  return *this;
+  return n;
 }
 
 void
@@ -240,9 +236,7 @@ LY_DEFINE(ly_pitch_transpose,
   SCM_ASSERT_TYPE(t, p, SCM_ARG1, __FUNCTION__, "pitch")  ;
   SCM_ASSERT_TYPE(d, delta, SCM_ARG1, __FUNCTION__, "pitch")  ;
 
-  Pitch tp =*t;
-  tp.transpose (*d);
-  return tp.smobbed_copy ();
+  return t->transposed (*d).smobbed_copy ();
 }
 
 /****************************************************************/
@@ -398,3 +392,10 @@ Pitch::get_alteration () const
   return alteration_;
 }
 
+Pitch
+Pitch::transposed (Pitch d) const
+{
+  Pitch p =*this;
+  p.transpose (d);
+  return p;
+}
index c50cff5b19f70defea42b21f28d282beae1b2d96..57e6f9310af1744f3a61c98f2c8f0603611ade91 100644 (file)
@@ -76,6 +76,9 @@ head_characteristic (Grob * col)
 
   TODO: look at horizontal-shift to determine ordering between rests
   for more than two voices.
+
+  TODO: look at previous note to determine vertical position?
+  
  */
 SCM
 Rest_collision::do_shift (Grob *me)
index e666f3b87ffbbf1ba22b93a17e23308afdb58648..ea7300749a7113cd29ba9c77dd12331f85826bc9 100644 (file)
@@ -71,8 +71,8 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 
 
 ENTER_DESCRIPTION(Staff_symbol_engraver,
-/* descr */       "create the constellation of five (default)
-staff lines.",
+/* descr */       "create the constellation of five (default) "
+"staff lines.",
 /* creats*/       "StaffSymbol",
 /* accepts */     "",
 /* acks  */      "grob-interface",
index 2e8aafd4811f1c4c1ee7ad2183c6fa7f2e57aa7a..c2e2db386e0738afe1a1996497501cb3db833d7b 100644 (file)
@@ -173,8 +173,8 @@ Stem_engraver::try_music (Music* r)
 }
 
 ENTER_DESCRIPTION(Stem_engraver,
-/* descr */       "Create stems and single-stem tremolos.  It also works together with
-the beam engraver for overriding beaming.",
+/* descr */       "Create stems and single-stem tremolos.  It also works together with "
+"the beam engraver for overriding beaming.",
 /* creats*/       "Stem StemTremolo",
 /* accepts */     "tremolo-event",
 /* acks  */      "rhythmic-head-interface",
index 9822ad63ef5781cee9fc38cfd71a2843fc9e2ad2..8480139e6a6867e5a2a1909036cd7bbd85b4ff9d 100644 (file)
@@ -49,14 +49,14 @@ Thread_devnull_engraver::acknowledge_grob (Grob_info i)
 Thread_devnull_engraver::Thread_devnull_engraver(){}
 
 ENTER_DESCRIPTION(Thread_devnull_engraver,
-/* descr */       "Kill elements whenever we are Voice called `two' and either
-unison, unisilence or soloADue is set.@footnote{On unix systems, the
-file @file{/dev/null} is special device: anything written to it is
-discarded.}. This engraver works closely together with the part
-combiner.  When the part combiner notices that two threads are
-identical, it tells the @code{Thread_devnull_engraver} to discard
-everything in the second thread.
-",
+/* descr */       "Kill elements whenever we are Voice called `two' and either "
+"unison, unisilence or soloADue is set.@footnote{On unix systems, the "
+"file @file{/dev/null} is special device: anything written to it is "
+"discarded.}. This engraver works closely together with the part "
+"combiner.  When the part combiner notices that two threads are "
+"identical, it tells the @code{Thread_devnull_engraver} to discard " 
+"everything in the second thread. "
+,
 /* creats*/       "",
 /* accepts */     "",
 /* acks  */      "grob-interface",
index 269c2d60d0dac4a20dc6cd077102ebd73bc69307..5456a6820a9d9aa4785a25c9bbc199f5fcc8c2fe 100644 (file)
@@ -88,10 +88,10 @@ Timing_engraver::stop_translation_timestep ()
 
 
 ENTER_DESCRIPTION (Timing_engraver,
-/* descr */       " Responsible for synchronizing timing information from staves. 
-Normally in @code{Score}.  In order to create polyrhythmic music,
-this engraver should be removed from @code{Score} and placed in
-@code{Staff}.",
+/* descr */       " Responsible for synchronizing timing information from staves.  "
+"Normally in @code{Score}.  In order to create polyrhythmic music, "
+"this engraver should be removed from @code{Score} and placed in "
+"@code{Staff}.",
 /* creats*/       "",
 /* accepts */     "",
 /* acks  */      "",
index a5c9836a8e881a0e1dc8e09db937aca734d3a585..0ef705a0725f3184890a8511e412e54383ff8787 100644 (file)
 
 
 ;; Generic PITCH/MARKUP functions
-(define (ly:pitch-diff pitch tonic)
-  "Return pitch with value PITCH - TONIC, ie,
-TONIC == (ly:pitch-transpose tonic delta)."
-  (let ((simple-octave (- (ly:pitch-octave pitch) (ly:pitch-octave tonic)))
+(define (ly:pitch-diff pitch root)
+  "Return pitch with value PITCH - ROOT, ie,
+ROOT == (ly:pitch-transpose root delta)."
+  (let ((simple-octave (- (ly:pitch-octave pitch) (ly:pitch-octave root)))
        (simple-notename
-        (- (ly:pitch-notename pitch) (ly:pitch-notename tonic))))
+        (- (ly:pitch-notename pitch) (ly:pitch-notename root))))
     (let ((octave (+ simple-octave (quotient simple-notename 7)
                     (if (< simple-notename 0) -1 0)))
          (notename (modulo simple-notename 7)))
       (let ((alteration
             (- (ly:pitch-semitones pitch)
-               (ly:pitch-semitones tonic
+               (ly:pitch-semitones root
                (ly:pitch-semitones (ly:make-pitch octave notename 0)))))
        (ly:make-pitch octave notename alteration)))))
 
@@ -122,7 +122,7 @@ TONIC == (ly:pitch-transpose tonic delta)."
 ;; FIXME: if/when double-plus-new-chord->markup get installed
 ;; setting and calling can be done a bit handier.
 (define-public (double-plus-new-chord->markup
-               func pitches bass inversion options)
+               func root-markup pitches bass inversion options)
   "Entry point for New_chord_name_engraver.  See
 double-plus-new-chord-name.scm for the signature of FUNC.  PITCHES,
 BASS and INVERSION are lily pitches.  OPTIONS is an alist-alist (see
@@ -133,9 +133,9 @@ input/test/dpncnt.ly).
   (define (step-nr pitch)
     (let* ((pitch-nr (+ (* 7 (ly:pitch-octave pitch))
                        (ly:pitch-notename pitch)))
-          (tonic-nr (+ (* 7 (ly:pitch-octave (car pitches)))
+          (root-nr (+ (* 7 (ly:pitch-octave (car pitches)))
                        (ly:pitch-notename (car pitches)))))
-      (+ 1 (- pitch-nr tonic-nr))))
+      (+ 1 (- pitch-nr root-nr))))
     
   (define (next-third pitch)
     (ly:pitch-transpose pitch
@@ -232,8 +232,8 @@ input/test/dpncnt.ly).
         (partial-pitches (car partial-exception))
         (partial-markup (markup-or-empty-markup (cdr partial-exception)))
 
-        (tonic (car pitches))
-        (full (get-full-list tonic))
+        (root (car pitches))
+        (full (get-full-list root))
         ;; kludge alert: replace partial matched lower part of all with
         ;; 'normal' pitches from full
         ;; (all pitches)
@@ -262,12 +262,12 @@ input/test/dpncnt.ly).
 
     (case func
       ((banter)
-       ;;    tonic
+       ;;    root
        ;;    + steps:altered + (highest all -- if not altered)
        ;;    + subs:missing
        
-       (let* ((tonic->markup (assoc-get-default
-                             'tonic->markup options pitch->markup))
+       (let* ((root->markup (assoc-get-default
+                             'root->markup options pitch->markup))
              (step->markup (assoc-get-default
                             'step->markup options step->markup-plusminus))
              (sub->markup (assoc-get-default
@@ -279,11 +279,11 @@ input/test/dpncnt.ly).
         
         (if
          (pair? full-markup)
-         (make-line-markup (list (tonic->markup tonic) full-markup))
+         (make-line-markup (list (root->markup root) full-markup))
            
          (make-line-markup
           (list
-           (tonic->markup tonic)
+           (root->markup root)
            partial-markup
            (make-normal-size-super-markup
             (markup-join
@@ -300,12 +300,12 @@ input/test/dpncnt.ly).
        
       
       ((jazz)
-       ;;    tonic
+       ;;    root
        ;;    + steps:(highest base) + cons-alt
        ;;    + 'add'
        ;;    + steps:rest
-       (let* ((tonic->markup (assoc-get-default
-                             'tonic->markup options pitch->markup))
+       (let* ((root->markup (assoc-get-default
+                             'root->markup options pitch->markup))
              (step->markup (assoc-get-default
                             'step->markup options step->markup-accidental))
              (sep (assoc-get-default
@@ -315,11 +315,11 @@ input/test/dpncnt.ly).
         
         (if
          (pair? full-markup)
-         (make-line-markup (list (tonic->markup tonic) full-markup))
+         (make-line-markup (list (root->markup root) full-markup))
          
          (make-line-markup
           (list
-           (tonic->markup tonic)
+           (root->markup root)
            partial-markup
            (make-normal-size-super-markup
             (make-line-markup
index 3064e154cf3efa04202a761da4d64e2490792d85..fb9ee1253e598f5b56e818987c50f44d05ac4ad4 100644 (file)
@@ -212,8 +212,11 @@ Overrides all other font-X qualifiers.")
 (grob-property-description 'font-design-size number? "partial font definition: exact font size in points FIXME: should override font-relative-size.")
 (grob-property-description 'font-magnification number? "Magnification
   of the font. If undefined, the default is @code{1.0}.")
-(grob-property-description 'font-relative-size number? "partial font definition: the relative size compared the `normal' size.
- 0 is style-sheet's normal size, -1 is smaller, +1 is bigger, -1 is smaller.")
+
+(grob-property-description 'font-relative-size number? "partial font
+definition: the relative size compared the `normal' size.  0 is
+style-sheet's normal size, -1 is smaller, +1 is bigger.")
+
 (grob-property-description 'font-series symbol? "partial font definition: medium, bold.")
 (grob-property-description 'font-shape symbol? "partial font definition: upright or italic.")
 
index af871aa0d98c1cceaf1c06c0846dd179a8f8fd65..a20edaced9bc7133605898db73040d08f3feb6a4 100644 (file)
@@ -44,6 +44,7 @@ TODO: consider making type into symbol ")
 (music-property-description 'direction ly:dir? "Print this up or down?")
 (music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
 (music-property-description 'tempo-unit ly:duration? "The unit for the metronome count.")
+(music-property-description 'tonic ly:pitch? "Base of the scale")
 (music-property-description 'element ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
 (music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
 (music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
index 4db44dd7c72958cefa462a4e113da0f0fbfb4829..2b27cd4091a39d405db89872971afd81ae2fd3d0 100644 (file)
@@ -177,7 +177,7 @@ c8-[ c c-] c8")
      . (
        (description .  "")
 
-       (internal-class-name . "Key_change_req")
+       (internal-class-name . "Key_change_ev")
        (types . (general-music key-change-event event))
        )) 
     (LigatureEvent
index c3196ed68cfe61036c5bb854e2ab5321d6861e8b..364d58841b1b3820301d08eff2a22cb1cb1e62f1 100644 (file)
@@ -391,6 +391,8 @@ settings.
 pair of numbers,  signifying the time signature. For example #'(4 . 4) is a 4/4time signature.")
 (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
 Switch off for cadenzas.")
+(translator-property-description 'tonic ly:pitch?
+                                "The tonic of the current scale")
 (translator-property-description 'transposing integer? "Transpose the MIDI output.  Set this property to the number of half-steps to transpose by.")
 (translator-property-description 'tremoloFlags integer? "Number of tremolo flags to add if none is specified.")
 (translator-property-description 'tupletNumberFormatFunction procedure?