lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accidentals Patch 1.5.24


From: Rune Zedeler
Subject: Accidentals Patch 1.5.24
Date: Wed, 05 Dec 2001 01:38:45 +0100

New algorithm for autoaccidentals - rewritten to something more
flexible.
Please have a look at it and comment.

I have added some regression tests, but really, as long as the
break-command is out of order it is hard to do some serious testing.

Now for the embarrasing part: I just discovered that my earlier
accidentals patch actually ruined the broken tie part (which I didn't
and still don't fully understand). You can see that the regression test
shows different results in 1.4.9 and 1.5.23.
The broken tie-part of my new patch is quite half made: I wouldn't
remove it just yet (scared of ruining something else) but on the other
hand woulnd't start bugfixing it either - in case we decide to remove
it.
A lot of new code can be removed if we decide to remove the broken tie
accidentals.

I haven't actually build the web-doc - but well, I guess it's okay...

-Rune
diff -urN lilypond-1.5.24/ChangeLog lilypond-1.5.24.rz2/ChangeLog
--- lilypond-1.5.24/ChangeLog   Sat Dec  1 15:35:46 2001
+++ lilypond-1.5.24.rz2/ChangeLog       Wed Dec  5 01:35:42 2001
@@ -1,3 +1,29 @@
+2001-12-03 Rune Zedeler <address@hidden>
+
+       * lily/lily-guile.cc: Added ly_assoc_front_x() and ly_assoc_cdr()
+       (FIXME: not accessible from guile)
+       
+       * lily/accidental-engraver.cc: rewrote accidental-routines to get
+       better support for Kurt Stone's suggestions.
+       Removed properties: noResetKey, autoReminders.
+       Added properties:   oneMeasureLazy, extraNatural, autoAccidentals,
+                           autoCautionaries.
+       
+       * ly/property-init.ly: added commands
+       \defaultAccidentals \modernAccidentals \modernCautionaries
+       \noResetKey
+
+       * ly/engraver-init.ly: Correct initialization of new accidentals.
+
+       * scm/translator-property-description.scm: The new properties
+       added.
+
+       * input/: Some examples added, some changed.
+       
+       * Documentation/regression-test.tely: Added quick test of new
+       accidentals.
+       
+       
 2001-12-01  Han-Wen  <address@hidden>
 
        * lily/note-head.cc (head_extent): added to compute width without
diff -urN lilypond-1.5.24/Documentation/regression-test.tely 
lilypond-1.5.24.rz2/Documentation/regression-test.tely
--- lilypond-1.5.24/Documentation/regression-test.tely  Sat Dec  1 15:34:56 2001
+++ lilypond-1.5.24.rz2/Documentation/regression-test.tely      Wed Dec  5 
00:59:30 2001
@@ -35,13 +35,22 @@
 
 @lilypondfile[printfilename]{dots.ly}
 
address@hidden
-
 @lilypondfile[printfilename]{multi-measure-rest.ly}
 
 @lilypondfile[printfilename]{mm-rests2.ly}
 
+
address@hidden Accidentals
+
+Accidentals are currently in a development stage.
+
address@hidden
+
 @lilypondfile[printfilename]{accidental-single-double.ly}
+
address@hidden
+
address@hidden
 
 
 @section Stems
diff -urN lilypond-1.5.24/VERSION lilypond-1.5.24.rz2/VERSION
--- lilypond-1.5.24/VERSION     Wed Dec  5 01:23:24 2001
+++ lilypond-1.5.24.rz2/VERSION Mon Dec  3 08:36:17 2001
@@ -2,7 +2,7 @@
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=24
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=rz2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -urN lilypond-1.5.24/input/regression/accidental-octave.ly 
lilypond-1.5.24.rz2/input/regression/accidental-octave.ly
--- lilypond-1.5.24/input/regression/accidental-octave.ly       Thu Jan  1 
01:00:00 1970
+++ lilypond-1.5.24.rz2/input/regression/accidental-octave.ly   Wed Dec  5 
00:50:25 2001
@@ -0,0 +1,74 @@
+\version "1.5.24.rz2"
+
+\header {
+texidoc="
+This shows how accidentals in different octaves are handled.
+"
+}
+
+#(define  (central-octave p)
+  (let* ((a (pitch-alteration p))
+         (n (pitch-notename p)))
+    (make-pitch 0 n a)))
+
+#(define (no-octaves music)
+  (let* ((es (ly-get-mus-property music 'elements))
+         (e (ly-get-mus-property music 'element))
+         (p (ly-get-mus-property music 'pitch)))
+
+    (if (pair? es)
+        (ly-set-mus-property
+         music 'elements
+         (map no-octaves es)))
+
+    (if (music? e)
+        (ly-set-mus-property
+         music 'element
+         (no-octaves e)))
+
+    (if (pitch? p)
+        (begin
+          (set! p (central-octave p))
+          (ly-set-mus-property music 'pitch p)))
+
+
+    music))
+
+
+\include "paper16.ly"
+
+mel = \notes \transpose c'' {
+  \time 4/4 \key d \major
+  gis4 g' g gis' | gis2 g' | g1 | gis | g | gis | g' |
+  fis4 f' f fis' | fis2 f' | f1 | fis | f | fis | f' |
+  \bar "|." \break
+}
+
+mus = \notes {
+  \mel
+   \property Score.oneMeasureLazy = ##t
+   \property Score.autoAccidentals = #'(same-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(same-octave)" \mel 
>
+   \property Score.autoAccidentals = #'(lazy-same-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(lazy-same-octave)" 
\mel >
+   \property Score.autoAccidentals = #'(any-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(any-octave)" \mel >
+   \property Score.autoAccidentals = #'(lazy-any-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(lazy-any-octave)" 
\mel >
+  \modernAccidentals
+  < s1^"$\\backslash$modernAccidentals" \mel >
+  \modernCautionaries
+  < s1^"$\\backslash$modernCautionaries" \mel >
+  \noResetKey
+  < s1^"$\\backslash$noResetKey" \mel >
+}
+
+
+\score {
+  < \context Staff \mus
+    \context NoteNames \apply #no-octaves \mus
+  >
+  \paper {
+    indent=0.0
+  }
+}
diff -urN lilypond-1.5.24/input/regression/accidental-single-double.ly 
lilypond-1.5.24.rz2/input/regression/accidental-single-double.ly
--- lilypond-1.5.24/input/regression/accidental-single-double.ly        Thu Apr 
 5 00:02:37 2001
+++ lilypond-1.5.24.rz2/input/regression/accidental-single-double.ly    Wed Dec 
 5 00:55:18 2001
@@ -13,12 +13,12 @@
 gisis'4 gis gisis ges |
 geses ges geses gis |
 gisis g geses g |
-gis g ges g |
+gis ges gis g |
 \key a \major
 gisis4 gis gisis ges |
 geses ges geses gis |
 gisis g geses g |
-gis g ges g |
+gis ges gis g |
 }
 
 \score { < \context Staff \thenotes
diff -urN lilypond-1.5.24/input/regression/accidentals.ly 
lilypond-1.5.24.rz2/input/regression/accidentals.ly
--- lilypond-1.5.24/input/regression/accidentals.ly     Thu Jan  1 01:00:00 1970
+++ lilypond-1.5.24.rz2/input/regression/accidentals.ly Wed Dec  5 00:53:26 2001
@@ -0,0 +1,36 @@
+\version "1.5.24.rz2"
+
+\header{
+texidoc="
+This shows how accidentals are handled.
+"
+}
+
+mel = \notes { \key d \major \time 4/4
+ d4  dis dis8 dis, d4 | d dis disis8 d, dis4 | d des disis8 dis, d4 | dis 
deses d dis ~ | dis dis ~ dis8 d, dis4 ~ | \break
+ dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis 
~ cis cis \bar "|."  | \break
+}
+
+\score { \notes \context Staff \transpose c''' {
+   \mel
+   \property Score.oneMeasureLazy = ##t
+   \property Score.autoAccidentals = #'(same-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(same-octave)" \mel 
>
+   \property Score.autoAccidentals = #'(lazy-same-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(lazy-same-octave)" 
\mel >
+   \property Score.autoAccidentals = #'(any-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(any-octave)" \mel >
+   \property Score.autoAccidentals = #'(lazy-any-octave)
+   < s1^"$\\backslash$property Score.autoAccidentals = \\#'(lazy-any-octave)" 
\mel >
+   \stoneAccidentals
+   < s1^"$\\backslash stoneAccidentals" \mel >
+   \stoneCautionaries
+   < s1^"$\\backslash stoneCautionaries" \mel >
+   \noResetKey
+   < s1^"$\\backslash noResetKey" \mel >
+  }
+  \paper {
+    indent = 0.0
+  }
+}
+
diff -urN lilypond-1.5.24/input/test/accidentals.ly 
lilypond-1.5.24.rz2/input/test/accidentals.ly
--- lilypond-1.5.24/input/test/accidentals.ly   Tue Oct  9 00:04:07 2001
+++ lilypond-1.5.24.rz2/input/test/accidentals.ly       Thu Jan  1 01:00:00 1970
@@ -1,23 +0,0 @@
-% \version "1.5.15.rz1"
-
-mel = \notes {
- d4  dis dis d | d dis disis dis | d des disis d | dis deses d dis ~ | dis dis 
~ dis dis ~ | \break
- dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis 
~ cis cis \bar "|."  | \break
-}
-
-\score { \notes \context Staff \transpose c''' {
-   \key d \major
-   \mel
-   \property Score.autoReminders = #'cautionary
-   < s1^"$\\backslash$property Score.autoReminders = \\#'cautionary" \mel >
-   \property Score.autoReminders = #'accidental
-   < s1^"$\\backslash$property Score.autoReminders = \\#'accidental" \mel >
-   \property Score.autoReminders = ##f
-   \property Score.forgetAccidentals = ##t
-   < s1^"$\\backslash$property Score.forgetAccidentals = \\#\\#t" \mel >
-   \property Score.forgetAccidentals = ##f
-   \property Score.noResetKey = ##t
-   < s1^"$\\backslash$property Score.noResetKey = \\#\\#t" \mel >
-  }
-}
-
diff -urN lilypond-1.5.24/lily/accidental-engraver.cc 
lilypond-1.5.24.rz2/lily/accidental-engraver.cc
--- lilypond-1.5.24/lily/accidental-engraver.cc Sat Dec  1 15:34:56 2001
+++ lilypond-1.5.24.rz2/lily/accidental-engraver.cc     Mon Dec  3 08:26:55 2001
@@ -59,6 +59,7 @@
 
 };
 
+
 Accidental_engraver::Accidental_engraver ()
 {
   key_item_p_ =0;
@@ -79,19 +80,22 @@
   *   Negative (-1 or -2) if accidental has changed.
   **/
 static int
-number_accidentals (SCM sig, Note_req * note_l)
+number_accidentals (SCM sig, Note_req * note_l, bool ignore_octave_b)
 {
   Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch"));
   int n = pitch->notename_i_;
-  int o = pitch->octave_i () ;
+  int o = pitch->octave_i_;
   int a = pitch->alteration_i_;
   
-  SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig);
+  SCM prev;
+  if (ignore_octave_b)
+    prev = ly_assoc_cdr (gh_int2scm (n), sig);
+  else
+    prev = gh_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig);
   if (prev == SCM_BOOL_F)
-    prev = scm_assoc (gh_int2scm (n), sig);
+    prev = gh_assoc (gh_int2scm (n), sig);
   SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev);
 
-  bool different = !gh_equal_p (prev_acc , gh_int2scm (a));
   int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
   int num;
@@ -102,6 +106,33 @@
   return a==p ? num : -num;
 }
 
+static int
+number_accidentals (SCM localsig, SCM lazysig, Note_req * note_l, SCM 
accidentals_l) {
+  int number=0;
+  int diff=0;
+  if(gh_memq(ly_symbol2scm("same-octave"),accidentals_l)!=SCM_BOOL_F) {
+    int n = number_accidentals(localsig,note_l,false);
+    diff |= n<0;
+    number = max(number,abs(n));
+  }
+  if(gh_memq(ly_symbol2scm("lazy-same-octave"),accidentals_l)!=SCM_BOOL_F) {
+    int n = number_accidentals(lazysig,note_l,false);
+    diff |= n<0;
+    number = max(number,abs(n));
+  }
+  if(gh_memq(ly_symbol2scm("any-octave"),accidentals_l)!=SCM_BOOL_F) {
+    int n = number_accidentals(localsig,note_l,true);
+    diff |= n<0;
+    number = max(number,abs(n));
+  }
+  if(gh_memq(ly_symbol2scm("lazy-any-octave"),accidentals_l)!=SCM_BOOL_F) {
+    int n = number_accidentals(lazysig,note_l,true);
+    diff |= n<0;
+    number = max(number,abs(n));
+  }
+  return diff ? -number : number;
+}
+
 void
 Accidental_engraver::create_grobs ()
 {
@@ -109,31 +140,25 @@
     {
       SCM localsig = get_property ("localKeySignature");
       SCM lazysig = get_property ("lazyKeySignature");
+      SCM accidentals_l =  get_property ("autoAccidentals");
+      SCM cautionaries_l =  get_property ("autoCautionaries");
+
+      bool extra_natural_b = get_property ("extraNatural")==SCM_BOOL_T;
 
       for (int i=0; i  < mel_l_arr_.size (); i++) 
        {
          Grob * support_l = support_l_arr_[i];
          Note_req * note_l = mel_l_arr_[i];
 
-         int local_num = number_accidentals(localsig,note_l);
-         bool local_diff = local_num<0; local_num = abs(local_num);
-         int lazy_num = number_accidentals(lazysig,note_l);
-         bool lazy_diff = lazy_num<0; lazy_num = abs(lazy_num);
-
-         int num = local_num;;
-         bool different= local_diff;
+         int num = number_accidentals(localsig,lazysig,note_l,accidentals_l);
+         int num_caut = 
number_accidentals(localsig,lazysig,note_l,cautionaries_l);
          bool cautionary = to_boolean (note_l->get_mus_property 
("cautionary"));
-         if (to_boolean (get_property ("noResetKey"))) {
-           num = lazy_num;
-           different = lazy_diff;
-         }
-         else if (gh_equal_p (get_property 
("autoReminders"),ly_symbol2scm("cautionary"))
-                  || gh_equal_p (get_property 
("autoReminders"),ly_symbol2scm("accidental"))) {
-           num = max(local_num,lazy_num);
-           if (gh_equal_p (get_property 
("autoReminders"),ly_symbol2scm("cautionary"))
-               && lazy_num>local_num)
-             cautionary = true;
+         if (abs(num_caut)>abs(num)) {
+           num=num_caut;
+           cautionary=true;
          }
+         bool different=num<0;
+         num=abs(num);
 
          /* see if there's a tie that "changes" the accidental */
          /* works because if there's a tie, the note to the left
@@ -176,7 +201,7 @@
              
              Local_key_item::add_pitch (key_item_p_, *unsmob_pitch 
(note_l->get_mus_property ("pitch")),
                                         cautionary,
-                                        num==2,
+                                        num==2 && extra_natural_b,
                                         tie_break_reminder);
              Side_position_interface::add_support (key_item_p_,support_l);
            }
@@ -188,7 +213,8 @@
 
            Checking whether it is tied also works mostly, but will it
            always do the correct thing?
-           (???? -Rune )
+           FIXME: 2nd accidental after broken-tie accidental should be junked.
+                  Remove broken-tie-support?
           */
          
          Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch"));
@@ -203,8 +229,8 @@
                Remember an alteration that is different both from
                that of the tied note and of the key signature.
               */
-             localsig = scm_assoc_set_x (localsig, on, SCM_BOOL_T); 
-             lazysig = scm_assoc_set_x  (lazysig,  on, SCM_BOOL_T); 
+             localsig = ly_assoc_front_x (localsig, on, SCM_BOOL_T);
+             lazysig = ly_assoc_front_x  (lazysig,  on, SCM_BOOL_T);
            }
          else if (!forget)
            {
@@ -212,8 +238,8 @@
                not really really correct if there are more than one
                noteheads with the same notename.
               */
-             localsig = scm_assoc_set_x (localsig, on, gh_int2scm (a)); 
-             lazysig = scm_assoc_set_x  (lazysig,  on, gh_int2scm (a)); 
+             localsig = ly_assoc_front_x (localsig, on, gh_int2scm (a)); 
+             lazysig = ly_assoc_front_x  (lazysig,  on, gh_int2scm (a)); 
            }
         }
   
@@ -221,7 +247,7 @@
       daddy_trans_l_->set_property ("lazyKeySignature",   lazysig);
     }
   
-
+  
   if (key_item_p_)
     {
       /*
@@ -307,7 +333,11 @@
     }
   else if (!mp.to_bool () )
     {
-       daddy_trans_l_->set_property ("localKeySignature",  ly_deep_copy (sig));
+      /* Use the old local sig as new lazy sig. This way the lazy sig will be 
one measure late */
+      if (get_property("oneMeasureLazy")==SCM_BOOL_T)
+       daddy_trans_l_->set_property ("lazyKeySignature",
+         daddy_trans_l_->get_property ("localKeySignature"));
+      daddy_trans_l_->set_property ("localKeySignature",  ly_deep_copy (sig));
     }
 }
 
@@ -321,5 +351,5 @@
 with note heads), this needs to be in a context higher than Tie_engraver. 
FIXME",
 /* creats*/       "Accidentals",
 /* acks  */       "rhythmic-head-interface tie-interface arpeggio-interface",
-/* reads */       "localKeySignature forgetAccidentals noResetKey 
autoReminders",
+/* reads */       "localKeySignature lazyKeySignature forgetAccidentals 
oneMeasureLazy extraNatural autoAccidentals autoCautionaries",
 /* write */       "");
diff -urN lilypond-1.5.24/lily/include/lily-guile.hh 
lilypond-1.5.24.rz2/lily/include/lily-guile.hh
--- lilypond-1.5.24/lily/include/lily-guile.hh  Sat Dec  1 13:11:57 2001
+++ lilypond-1.5.24.rz2/lily/include/lily-guile.hh      Mon Dec  3 05:53:12 2001
@@ -133,9 +133,11 @@
 SCM ly_offset2scm (Offset);
 Offset ly_scm2offset (SCM);
 SCM ly_assoc_chain (SCM key, SCM achain);
+SCM ly_assoc_cdr (SCM key, SCM alist);
 Interval ly_scm2interval (SCM);
 SCM ly_interval2scm (Interval);
 
+
 SCM ly_parse_scm (char const* s, int* n);
 SCM ly_quote_scm (SCM s);
 SCM ly_type (SCM);
@@ -153,6 +155,11 @@
 inline SCM ly_caddr (SCM x) { return SCM_CADDR (x); }
 inline SCM ly_cdadr (SCM x) { return SCM_CDADR (x); }
 inline SCM ly_caadr (SCM x) { return SCM_CAADR (x); }
+/* inserts at front, removing dublicates */
+inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val)
+{
+  return scm_acons(key, val, scm_assoc_remove_x (alist, key));
+}
 inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
 inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
 inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); }
diff -urN lilypond-1.5.24/lily/lily-guile.cc 
lilypond-1.5.24.rz2/lily/lily-guile.cc
--- lilypond-1.5.24/lily/lily-guile.cc  Sat Dec  1 13:11:57 2001
+++ lilypond-1.5.24.rz2/lily/lily-guile.cc      Mon Dec  3 05:56:50 2001
@@ -22,6 +22,7 @@
 #include "direction.hh"
 #include "offset.hh"
 #include "interval.hh"
+#include "pitch.hh"
 
 SCM
 ly_last (SCM list)
@@ -515,6 +516,23 @@
       else
        return ly_assoc_chain (key, ly_cdr (achain));
     }
+  else
+    return SCM_BOOL_F;
+}
+
+/* looks the key up in the cdrs of the alist-keys
+   - ignoring the car and ignoring non-pair keys.
+   Returns first match found. */
+SCM
+ly_assoc_cdr (SCM key, SCM alist)
+{
+  if (gh_pair_p (alist)) {
+    SCM trykey = ly_caar(alist);
+    if(gh_pair_p(trykey) && to_boolean(scm_equal_p(key,ly_cdr(trykey))))
+      return ly_car(alist);
+    else
+      return ly_assoc_cdr (key, ly_cdr (alist));
+  }
   else
     return SCM_BOOL_F;
 }
diff -urN lilypond-1.5.24/ly/engraver-init.ly 
lilypond-1.5.24.rz2/ly/engraver-init.ly
--- lilypond-1.5.24/ly/engraver-init.ly Sat Dec  1 15:34:56 2001
+++ lilypond-1.5.24.rz2/ly/engraver-init.ly     Mon Dec  3 06:47:16 2001
@@ -382,6 +382,10 @@
        tupletNumberFormatFunction = #denominator-tuplet-formatter
        
        subdivideBeams = ##f
+       extraNatural = ##t
+       autoAccidentals = #'(same-octave)
+       autoCautionaries = #'()  
+
 
        keyAccidentalOrder = #'(
          (6 . -1) (2  . -1) (5 . -1 ) (1  . -1) (4  . -1) (0  . -1) (3  . -1)
diff -urN lilypond-1.5.24/ly/property-init.ly 
lilypond-1.5.24.rz2/ly/property-init.ly
--- lilypond-1.5.24/ly/property-init.ly Mon Sep 24 12:03:15 2001
+++ lilypond-1.5.24.rz2/ly/property-init.ly     Wed Dec  5 00:39:48 2001
@@ -160,6 +160,38 @@
 showStaffSwitch = \property PianoStaff.followVoice = ##t
 hideStaffSwitch = \property PianoStaff.followVoice = ##f
 
+% FIXME: Move this docu (to where?)
+
+% accidentals as they were common in the 18th century.
+defaultAccidentals = {
+  \property Score.extraNatural = ##t
+  \property Score.autoAccidentals = #'(same-octave)
+  \property Score.autoCautionaries = #'()  
+}
+
+% accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
+modernAccidentals = {
+  \property Score.extraNatural = ##f
+  \property Score.oneMeasureLazy = ##t
+  \property Score.autoAccidentals = #'(same-octave any-octave lazy-any-octave)
+  \property Score.autoCautionaries = #'()  
+}
+
+% the accidentals that Stone adds to the old standard as cautionaries
+modernCautionaries = {
+  \property Score.extraNatural = ##f
+  \property Score.oneMeasureLazy = ##t
+  \property Score.autoAccidentals = #'(same-octave)
+  \property Score.autoCautionaries = #'(any-octave lazy-any-octave)  
+}
+
+% accidentals not being reset at the bar-lines
+noResetKey = {
+  \property Score.oneMeasureLazy = ##f
+  \property Score.autoAccidentals = #'(lazy-same-octave)
+  \property Score.autoCautionaries = #'()
+}
+
 
 % To remove a Volta bracet or some other graphical object,
 % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
diff -urN lilypond-1.5.24/scm/music-functions.scm 
lilypond-1.5.24.rz2/scm/music-functions.scm
--- lilypond-1.5.24/scm/music-functions.scm     Sat Dec  1 15:34:56 2001
+++ lilypond-1.5.24.rz2/scm/music-functions.scm Sun Dec  2 06:46:59 2001
@@ -14,8 +14,6 @@
 written by Rune Zedeler. "
   (let* ((es (ly-get-mus-property music 'elements))
          (e (ly-get-mus-property music 'element))
-         (body (ly-get-mus-property music 'body))
-         (alts (ly-get-mus-property music 'alternatives))
          (n  (ly-music-name music)))
 
     (if (equal? n "Repeated_music")
@@ -29,16 +27,6 @@
         (ly-set-mus-property
          music 'elements
          (map unfold-repeats es)))
-
-    (if (music? alts)
-        (ly-set-mus-property
-         music 'alternatives
-         (unfold-repeats alts)))
-
-    (if (music? body)
-        (ly-set-mus-property
-         music 'body
-         (unfold-repeats body)))
 
     (if (music? e)
         (ly-set-mus-property
diff -urN lilypond-1.5.24/scm/translator-property-description.scm 
lilypond-1.5.24.rz2/scm/translator-property-description.scm
--- lilypond-1.5.24/scm/translator-property-description.scm     Tue Oct  9 
15:45:07 2001
+++ lilypond-1.5.24.rz2/scm/translator-property-description.scm Mon Dec  3 
08:34:43 2001
@@ -78,21 +78,40 @@
 
 @end example")
 
+(translator-property-description 'autoAccidentals list? "List of
+different ways to typeset an accidental. All algorithms in the list
+are tried, and the one returning the most accidentals is used.
+The algorithms are:
address@hidden @samp
address@hidden same-octave: This is the default algorithm. Accidentals are
+typeset if the note changes the accidental of that note in that octave.
address@hidden any-octave: Accidentals are typeset if the note is different 
from 
+the previous note on the same pitch in any octave.
address@hidden lazy-same-octave: Shows accidentals as if the key signature does
+not get reset at every barline. This means that an alteration lasts until it is
+changed - perhaps many measures later. See oneMeasureLazy, though.
address@hidden lazy-any-octave: Yeah, you probably guessed that one.
address@hidden table
+")
+
+(translator-property-description 'autoCautionaries list? "List similar to
+autoAccidentals, but it controls cautionary accidentals rather than
+normal ones. Both lists are tried, and the one giving the most accidentals
+wins. In case of draw, a normal accidental is typeset.
+")
+
 (translator-property-description 'automaticPhrasing boolean? " If set,
 the @ref{Lyric_phrasing_engraver} will match note heads of context
 called Voice X to syllables from LyricsVoice called
 X-<something>. This feature is turned on by default. See the example
 file @file{lyrics-multi-stanza.ly}.
-
 ")
+
 (translator-property-description 'automaticMelismata boolean? " If
 set, \addlyrics will assume that beams, slurs and ties signal
 melismata, and align lyrics accordingly.
 ")
 
-(translator-property-description 'autoReminders symbol? "If set to 
@samp{accidental} or @samp{cautionary},
-a (reminder) accidental automatically is inserted whenever an accidental is 
reverted - even after a bar.")
-
 (translator-property-description 'barAlways boolean? " If set to true a bar 
line is drawn after each note.
 ")
 (translator-property-description 'barCheckNoSynchronize boolean? "If set, 
don't reset measurePosition when finding a bbarcheck. This
@@ -178,7 +197,10 @@
 \override of #'visibility-lambda will set the visibility for normal
 (ie. at the start of the line) key signatures.")
 
-
+(translator-property-description 'extraNatural boolean? "Whether to typeset an
+extra natural sign before accidentals changing from a non-natural to 
+another non-natural.
+")
 (translator-property-description 'followVoice boolean?
                                 "if set, note heads are tracked  across staff 
switches by a thin line")
 (translator-property-description 'fontSize integer?
@@ -216,8 +238,11 @@
 (translator-property-description 'lastKeySignature list? "Last key
 signature before a key signature change.")
 
+(translator-property-description 'lazyKeySignature list? "a lazy version of
+localKeySignature, only being reset according to oneMeasureLazy."
+) 
 (translator-property-description 'localKeySignature list? "the key
-signature at this point in the measure.  The format is the same as for 
keySignature. "
+signature at this point in the measure.  The format is the same as for 
keySignature. Is reset at every bar line."
 ) 
 
 (translator-property-description 'measureLength moment? "Length of one
@@ -236,15 +261,13 @@
 (translator-property-description 'noAutoBeaming boolean? "If set to true then 
beams are not generated automatically.
 ")
 (translator-property-description 'noDirection boolean? "Don't set directions 
by a2-engraver when part-combining.")
-(translator-property-description 'noResetKey boolean? "Do not
-reset local key to the value of keySignature at the start of a measure,
-as determined by measurePosition.
-
-Do not reset the key at the start of a measure.  Accidentals will be
-printed only once and are in effect until overridden, possibly many
-measures later.
-")
 (translator-property-description 'oneBeat moment? "  How long does one beat in 
the current time signature last?")
+(translator-property-description 'oneMeasureLazy boolean? "If false, the lazy
+time-signature is never reset, causing lazy accidentals (see
+autoAccidentals) to last until the next key change. If true, the lazy
+key signature only last one measure longer than the normal one - accidentals
+being reset at the end of the measure after the one in which they occur.
+")
 (translator-property-description 'pedalSustainStrings list? "List of   string 
to print for sustain-pedal. Format is
  (UP UPDOWN DOWN), where each of the three is the string to print when
 this is done with the pedal.")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]