]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.34
authorfred <fred>
Wed, 27 Mar 2002 02:05:53 +0000 (02:05 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:05:53 +0000 (02:05 +0000)
ChangeLog
Documentation/regression-test.tely
Documentation/user/refman.itely
VERSION
input/regression/rest-pitch.ly [new file with mode: 0644]
input/regression/staccato-pos.ly
lily/collision.cc
lily/note-column.cc
lily/request-chord.cc
lily/rest-engraver.cc
lily/staff-symbol-referencer.cc

index 0d0686bc4f7521ecee376dc0f74c2a717282bceb..c8671a34e72552d5459795c64eb9d61c3040a5fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2002-02-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * VERSION: 1.5.34 released.
+
+       * lily/rest-engraver.cc (create_grobs): rests can have pitches.
+
+       * lily/staff-symbol-referencer.cc (callback): assume that
+       staff-position is unset in general.
+
+       * input/regression/rest-pitch.ly: new file.
+
+       * lily/parser.yy (simple_element): rests can have pitch. Syntax:
+       a4\rest
+
+2002-02-26  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/scm-option.cc (set_lily_option): add internal-type-checks
+       as Scheme option. Run regression test by default with
+       internal-type-checking.
+
+       * lily/separating-group-spanner.cc (find_musical_sequences):  removed.
+
+       * lily/lily-guile.cc (type_check_assignment): changed functions.
+
+       * scm/*description*.scm: be anal about typechecks. Some changes
+       for internal variable names.
+
+2002-02-25  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scm/ps.scm: -f ps  output for GUILE 1.4 and 1.3.4
+
 2002-02-25  Han-Wen  <hanwen@cs.uu.nl>
 
        * VERSION: 1.5.33 released.
index 6dbe5dd5b9946f73fdfc8352186f06c4486879e6..208904fae8b7bbd0cc1d36ffa749f365f9199011 100644 (file)
@@ -39,6 +39,7 @@ documenting bugfixes.
 
 @lilypondfile[printfilename]{mm-rests2.ly}
 
+@lilypondfile[printfilename]{rest-pitch.ly}
 
 @section Accidentals
 
@@ -64,7 +65,6 @@ Accidentals are currently in a development stage.
 @lilypondfile[printfilename]{stem-direction-down.ly}
 
 
-
 @section Scripts
 
 @lilypondfile[printfilename]{staccato-pos.ly}
@@ -114,6 +114,8 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{grace-sync.ly}
 
+@lilypondfile[printfilename]{grace-bar-number.ly}
+
 
 @section Beams
 
@@ -280,6 +282,7 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{part-combine.ly}
 
+@lilypondfile[printfilename]{font-magnification.ly}
 
 @lilypondfile[printfilename,nofragment]{size11.ly}
 
index cad14bd54a8f5a39797d2c9ff92ae296291715b6..133e45f318eea2e5611294842b006e193264651c 100644 (file)
@@ -255,6 +255,14 @@ r1 r2 r4 r8
 The grob is @internalsref{Rest}. Whole bar rests centered in the bar are
 specified using @code{R}, see @ref{Multi measure rests}.
 
+For polyphonic music, it can be convenient to specify the rest position
+directly. You can do that by entering a note, with the keyword
+@code{\rest} appended, e.g. Rest collisions will leave these rests alone.
+
+@lilypond[singleline,verbatim]
+a'4\rest d'4\rest
+@end lilypond
+
 
 @c .  {Skips}
 @c FIXME: naming.
@@ -855,12 +863,10 @@ The easiest way to enter such fragments, is the Scheme function
 @code{\\}, to make multiple voices.  You can use it for small,
 short-lived voices (make a chord of voices) or for single chords:
 
-@lilypond
-\score {
-\notes \context Voice = VA \apply #voicify-music \relative c'' {
+@lilypond[verbatim,fragment]
+\context Voice = VA \apply #voicify-music \relative c'' {
  c4 < { f d e  } \\ { b c2 } > c4 < g' \\ c, \\  f \\ d >
 }
-}
 @end lilypond
 
 The function @code{voicify-music} instantiates @internalsref{Voice}
@@ -2869,12 +2875,11 @@ block:
 
 Figured bass is printed by @internalsref{FiguredBass} context.  This
 context will print notes (relative to the central C) as figures.  To
-ease entering these notes, the special @code{\figures} mode, is
+ease entering these notes, the special @code{\figures} mode is
 available which allows you to type numbers, like @code{<4 6+>}.
 
-@lilypond
-\score { \notes  <
- \context FiguredBass \transpose c'' {
+@lilypond[verbatim,fragment]
+< \context FiguredBass \transpose c'' {
    <e! g >
    <f8 ais >
    \figures {
@@ -2884,10 +2889,7 @@ available which allows you to type numbers, like @code{<4 6+>}.
  }
  \context Voice {
    c g8 g f4 d c
-  }
->
- }
+  } >
 @end lilypond
 
 @c . {Tuning output}
diff --git a/VERSION b/VERSION
index f0962d6456061a5808e072d9f4637c7d001802c9..01b2d92cf892e8ca15932740a1e4180e4505ad1b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=33
+PATCH_LEVEL=34
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
diff --git a/input/regression/rest-pitch.ly b/input/regression/rest-pitch.ly
new file mode 100644 (file)
index 0000000..e864dad
--- /dev/null
@@ -0,0 +1,16 @@
+\header {
+
+texidoc = "Rests can have pitches--these will be affected by
+transposition and relativization. If a rest has a pitch, rest
+collision will leave it alone."
+
+}
+
+\score { \notes\relative c'' \apply #voicify-music
+{
+   a4\rest b4\rest c4\rest
+
+<d \\  d\rest^"rest pitch" >
+<d \\  r> 
+}
+}
index 38ff46b086c71f68651a5c5d74c77f608422ea9a..053307faa7fcc8ddb242c2ca9ff54515e6d7f61b 100644 (file)
@@ -7,14 +7,10 @@ not be on staff lines.
 "
 }
 \score { 
-  \context Voice \notes\relative c {
-    
-       e''4-. f-. d-.
-       c,-. b-. c'''-. d-.
-       
+  \context Voice \notes\relative c' {
+       e'4-. f-. d-. c-. b-. 
   }
   \paper {
     linewidth=-1.0
   }  
-  \midi { }
 }
index 7ae57a8ec6cd6d01cfa550c15e561ef5f3136c56..2dea673021517339d4509b08130f6c363ddb8283 100644 (file)
@@ -25,12 +25,10 @@ Collision::force_shift_callback (SCM element_smob, SCM axis)
   assert (a == X_AXIS);
   
    me = me->get_parent (a);
-  /*
-    ugh. the way DONE is done is not clean
-   */
-  if (!unsmob_grob (me->get_grob_property ("done")))
+
+   if (! to_boolean (me->get_grob_property ("collision-done")))
     {
-      me->set_grob_property ("done", me->self_scm ());
+      me->set_grob_property ("collision-done", SCM_BOOL_T);
       do_shifts (me);
     }
   
index 27fd96730a8deee93843e3a62b42465a960803f3..b53a18deb4b163b2a5eddf3d1390bd21dd2d6253 100644 (file)
@@ -105,13 +105,14 @@ Note_column::add_head (Grob*me,Grob *h)
 }
 
 /**
-  translate the rest symbols vertically by amount DY_I.
- */
+  translate the rest symbols vertically by amount DY_I, but only if
+  they have no staff-position set.
+*/
 void
 Note_column::translate_rests (Grob*me,int dy_i)
 {
   Grob * r = unsmob_grob (me->get_grob_property ("rest"));
-  if (r)
+  if (r && !gh_number_p (r->get_grob_property ("staff-position")))
     {
       r->translate_axis (dy_i * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
     }
@@ -150,7 +151,7 @@ Note_column::accidentals (Grob *me)
   for (;gh_pair_p (heads); heads =gh_cdr (heads))
     {
       Grob * h = unsmob_grob (gh_car (heads));
-      Grob *a = h ? unsmob_grob(h->get_grob_property ("accidentals")) : 0;
+      Grob *a = h ? unsmob_grob(h->get_grob_property ("accidentals-grob")) : 0;
       if (a)
        return a;
     }
index 170d4996dfb3e989d48a0864fef425a11d37cfe7..322cf49e03ea563cd22ae24836d46b667b6b5244 100644 (file)
@@ -22,15 +22,26 @@ Request_chord::to_relative_octave (Pitch last)
   for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
-      if (Melodic_req *m= dynamic_cast <Melodic_req *> (mus))
+      Melodic_req *m= dynamic_cast <Melodic_req *> (mus);
+
+      /*
+       kLudge: rests have pitches now as well.
+       */
+      Rest_req *r = dynamic_cast<Rest_req*> (mus);
+      
+      if (r || m)
        {
-         Pitch pit = *unsmob_pitch (m->get_mus_property ("pitch"));
+         Pitch *old_pit = unsmob_pitch (mus->get_mus_property ("pitch"));
+         if (!old_pit)
+           continue;
          
-         pit.to_relative_octave (last);
-         m->set_mus_property ("pitch", pit.smobbed_copy ());
-                 
-         return pit;
+         Pitch new_pit = *old_pit;
+         new_pit.to_relative_octave (last);
+         mus->set_mus_property ("pitch", new_pit.smobbed_copy ());
+
+         return new_pit;
        }
+
     }
   return last;
 }
index 72582135c2ada844919efd9b97046edd0781c3e0..cb92159fecedfad2471cf6ceb6429179c4109d7c 100644 (file)
@@ -22,10 +22,9 @@ protected:
   virtual bool try_music (Music *);
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
-  virtual void create_grobs ();
+  virtual void process_music ();
 
 public:
-  
   TRANSLATOR_DECLARATIONS(Rest_engraver);
 };
 
@@ -62,13 +61,13 @@ Rest_engraver::stop_translation_timestep ()
 }
 
 void
-Rest_engraver::create_grobs ()
+Rest_engraver::process_music ()
 {
   if (rest_req_l_ && !rest_p_) 
     {
       rest_p_ = new Item (get_property ("Rest"));
       Rhythmic_head::set_interface (rest_p_);
-      Staff_symbol_referencer::set_interface (rest_p_);
+
       
       int durlog  = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
       
@@ -87,6 +86,22 @@ Rest_engraver::create_grobs ()
          announce_grob (dot_p_, SCM_EOL);
        }
 
+      Pitch *p = unsmob_pitch (rest_req_l_->get_mus_property ("pitch"));
+
+      /*
+       This is ridiculous -- rests don't have pitch, but we act as if
+       our nose is bleeding.
+       */
+      if (p)
+       {
+         int pos= p->steps ();
+         SCM c0 = get_property ("centralCPosition");
+         if (gh_number_p (c0))
+           pos += gh_scm2int (c0);
+         
+         rest_p_->set_grob_property ("staff-position", gh_int2scm (pos));
+       }
+      
       announce_grob(rest_p_, rest_req_l_->self_scm());
     }
 }
@@ -108,5 +123,5 @@ ENTER_DESCRIPTION(Rest_engraver,
 /* descr */       "",
 /* creats*/       "Rest Dots",
 /* acks  */       "",
-/* reads */       "",
+/* reads */       "centralCPosition",
 /* write */       "");
index 57cf6ec0b53b0d2716b168608421ddb358165501..e63efa1b309298e08b67bafce0cd9cd3674ded59 100644 (file)
@@ -99,10 +99,9 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM)
     {
       Real space = Staff_symbol_referencer::staff_space (me);
       off = gh_scm2double (pos) * space/2.0;
+      me->set_grob_property ("staff-position", gh_double2scm (0.0));
     }
 
-  me->set_grob_property ("staff-position", gh_double2scm (0.0));
-
   return gh_double2scm (off);
 }
 
@@ -164,9 +163,6 @@ compare_position (Grob *const  &a, Grob * const &b)
 void
 Staff_symbol_referencer::set_interface (Grob * e)
 {
-  if (!gh_number_p (e->get_grob_property ("staff-position")))
-      e->set_grob_property ("staff-position", gh_double2scm (0.0));
-
   e->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
 }