]> git.donarmstrong.com Git - lilypond.git/commitdiff
(stop_translation_timestep): new
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 11 Sep 2004 22:12:48 +0000 (22:12 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 11 Sep 2004 22:12:48 +0000 (22:12 +0000)
property: add-stem-support

ChangeLog
Documentation/topdocs/NEWS.texi
input/les-nereides.ly
input/regression/slur-broken-trend.ly
lily/new-fingering-engraver.cc
lily/script-interface.cc
lily/slur-engraver.cc
lily/slur-scoring.cc
scm/define-grob-properties.scm

index 201d760b237b388a92d2dca4f063c5e8b6fb7a4c..9e885e83dfa6f72f5828f3e8999ebfe7883d67bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+2004-09-12  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/new-fingering-engraver.cc (stop_translation_timestep): new
+       property: add-stem-support
+
 2004-09-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
 2004-09-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/slur-scoring.cc (get_bound_info): only do
+       broken trend at the end of the line.
+
        * VERSION (PACKAGE_NAME): release 2.3.16.
 
        * input/regression/phrasing-slur.ly (Module): remove (duplicate
        * VERSION (PACKAGE_NAME): release 2.3.16.
 
        * input/regression/phrasing-slur.ly (Module): remove (duplicate
index c18aea855b266ea0a0d30a23ed67debcaa1b5715..d238b0d0038e14e6f21fc1274521e15cef35bc5d 100644 (file)
@@ -169,9 +169,10 @@ This is handled by the function defined in
 @code{toplevel-book-handler}.  By changing these variables, different
 results can be obtained.
 
 @code{toplevel-book-handler}.  By changing these variables, different
 results can be obtained.
 
-This required a small change in the syntax. Mode changing commands,
-such as @code{\chords} and @code{\figures} now be directly followed by
-delimeters. The following example demonstrates the new behavior,
+@item Mode changing commands,
+such as @code{\chords} and @code{\figures} must now be directly
+followed by delimiters. The following example demonstrates the new
+behavior,
 
 @verbatim
   \figures \context Figures { .. } % wrong
 
 @verbatim
   \figures \context Figures { .. } % wrong
@@ -179,11 +180,11 @@ delimeters. The following example demonstrates the new behavior,
 @end verbatim 
 
 
 @end verbatim 
 
 
-@item Start pitch for @code{relative} music is optional for music lists.
+@item The starting pitch for @code{relative} music is optional for music lists.
 The default value is middle C.
 
 @c update-me?  formal definition of newaddlyrics, once it works
 The default value is middle C.
 
 @c update-me?  formal definition of newaddlyrics, once it works
-@item Combining lyrics with music can be done with @code{\newlyrics}
+@item Combining lyrics with music can be done with @code{\addlyrics}
 
 @example
     \relative @{
 
 @example
     \relative @{
@@ -198,7 +199,7 @@ The default value is middle C.
     @}
 @end example
 
     @}
 @end example
 
-Syntactically, @code{\newlyrics} acts like an infix operator.
+Syntactically, @code{\addlyrics} acts like an infix operator.  
 
 @item The parser is encapsulated in a Scheme function
 @code{ly:parse-file}, so the following fragment processes two files
 
 @item The parser is encapsulated in a Scheme function
 @code{ly:parse-file}, so the following fragment processes two files
@@ -229,10 +230,10 @@ entity. For example, two scores are combined in one book with
 @}
 @end example
 
 @}
 @end example
 
-Titling and page breaks are handled by LilyPond.  For automatic page
-breaking, two algorithms are available, the classic ragged pages (the
-default), and optimal page breaking.  
-Page  breaks may be inserted manually with
+
+@item
+Titling and page breaks are handled by LilyPond.  Page breaks may be
+inserted manually with
 @example
   \pageBreak
 @end example
 @example
   \pageBreak
 @end example
index c6c0806058d35b0971913251318fab6e47488406..d2588c03fa5d8de0170cf9cb461d3d6ee4c8c372 100644 (file)
@@ -63,11 +63,9 @@ treble = \new Voice \relative c''{
     cis''''4^\markup { \small \italic "m.g." }\arpeggio~
     \grace {
         cis8
     cis''''4^\markup { \small \italic "m.g." }\arpeggio~
     \grace {
         cis8
-       \slurBoth % Tweak
+       \override Stem #'direction = #CENTER
        
        
-       \override Stem  #'direction = #0
-        
-       a16[-5( fis dis]
+       a16[-5_( fis dis]
        #(set-octavation 0)
        
        cis32[ a-1 fis-4 dis]   cis[ a  fis)-2]
        #(set-octavation 0)
        
        cis32[ a-1 fis-4 dis]   cis[ a  fis)-2]
@@ -86,7 +84,7 @@ treble = \new Voice \relative c''{
     \override Fingering  #'direction = #1
     
     % Manual fix for collision with slur
     \override Fingering  #'direction = #1
     
     % Manual fix for collision with slur
-    \override Fingering  #'extra-offset = #'(0 . 1) %tweak
+    \override Fingering  #'inside-slur = ##f
     <gis gis,> <fis fis,> e)-1-4-5 r
 
     | %6
     <gis gis,> <fis fis,> e)-1-4-5 r
 
     | %6
@@ -102,7 +100,6 @@ trebleTwo = \new Voice \relative c''{
     \slurDown
     % \fingerDown
     \override Fingering  #'direction = #-1
     \slurDown
     % \fingerDown
     \override Fingering  #'direction = #-1
-    \override Fingering  #'extra-offset = #'(0 . 1.2)
     s2
     | %1
     s1*2
     s2
     | %1
     s1*2
@@ -112,11 +109,11 @@ trebleTwo = \new Voice \relative c''{
     <e, gis, e d!>2
     | %5
     s8 cis4. d4
     <e, gis, e d!>2
     | %5
     s8 cis4. d4
-    %%<cis e,>8[( <b-3 d,-1>
-    <cis e,>8[( <b d,>-3-1
+    \override Fingering #'add-stem-support = ##t
+    \override Fingering #'padding = #0.1
+    <cis e,>8[( <d,_3 b'_1>
     | %6
     | %6
-    %%<a-2 cis,-1>)] cis4. d4 
-    <a cis,>)]-2-1 cis4. d4 
+    <cis_1 a'_2>)] cis'4. d4 
     <cis e,>8[( <b d,>
     | %7
     <a cis,>)]
     <cis e,>8[( <b d,>
     | %7
     <a cis,>)]
@@ -126,11 +123,7 @@ bass = \new Voice \relative c{
     \partial 2
     \key a \major
     
     \partial 2
     \key a \major
     
-    % Allow ugly (highly blown-up) slurs
-    \override Slur  #'beautiful = #5.0 %tweak
-    \override Slur  #'attachment-offset = #'((0 . 3) . (0 . -4))  %tweak
     \slurDown
     \slurDown
-    
     \dynamicUp
 
     r8. e,16(\f_2 <a a,>8[ <b b,>]
     \dynamicUp
 
     r8. e,16(\f_2 <a a,>8[ <b b,>]
@@ -140,17 +133,11 @@ bass = \new Voice \relative c{
     <cis cis,>4\sustainDown
     \change Staff=treble
     \stemDown
     <cis cis,>4\sustainDown
     \change Staff=treble
     \stemDown
-    \override Slur  #'attachment = #'(stem . stem) %tweak
     <a'' eis cis>4)\arpeggio
     
     <a'' eis cis>4)\arpeggio
     
-    \revert Slur #'attachment %tweak
     \change Staff=bass
     \stemBoth
     
     \change Staff=bass
     \stemBoth
     
-    \revert Slur #'y-free %tweak
-    \override Slur  #'y-free = #0.1 %tweak
-    \revert Slur #'attachment-offset %tweak
-    \override Slur  #'attachment-offset = #'((0 . 3) . (0 . 8)) %tweak
     r8. cis,,16(\sustainUp <fis fis,>8 <gis gis,>
     
     | %3
     r8. cis,,16(\sustainUp <fis fis,>8 <gis gis,>
     
     | %3
@@ -167,8 +154,6 @@ bass = \new Voice \relative c{
     r2
     
     | %4
     r2
     
     | %4
-    \revert Slur #'beautiful %tweak
-    \revert Slur #'attachment-offset %tweak
     \stemDown
     <b,, b,>4
     \clef treble
     \stemDown
     <b,, b,>4
     \clef treble
index 5c5ac839a6c0cd33af853489df8a91c966e3d4f6..0668b048a8992629c7fcfe316a1ce155be027f06 100644 (file)
@@ -28,7 +28,10 @@ in unbroken state.
      >>
     \break 
     c4) f='2.(\break
      >>
     \break 
     c4) f='2.(\break
-    a4)
+    a2.)
+    \stemUp
+    <d='' d'>8( <c c'> \break
+    <bis f' b>)
     
 }
 
     
 }
 
index 713f84fd02c2f2d5da2dea34fb84e487fa321142..843cae76d21693a586078d3ec78e7d1d4774e0eb 100644 (file)
@@ -286,24 +286,31 @@ New_fingering_engraver::stop_translation_timestep ()
 {
   if (fingerings_.size ())
     {
 {
   if (fingerings_.size ())
     {
+      for (int i = 0;  i < fingerings_.size(); i++)
+       if (stem_ && to_boolean (fingerings_[i].script_->get_property ("add-stem-support")))
+         Side_position_interface::add_support (fingerings_[i].script_, stem_);
       position_scripts ();
       fingerings_.clear ();
     }
   
   for (int i =  articulations_.size (); i--;)
     {
       position_scripts ();
       fingerings_.clear ();
     }
   
   for (int i =  articulations_.size (); i--;)
     {
-      Grob *sc = articulations_[i].script_;
+      Grob *script = articulations_[i].script_;
    
       for (int j = heads_.size () ; j--;)
    
       for (int j = heads_.size () ; j--;)
-       Side_position_interface::add_support (sc, heads_[j]);
+       Side_position_interface::add_support (script, heads_[j]);
 
 
-      if (stem_ && to_dir (sc->get_property ("side-relative-direction")))
-       sc->set_property ("direction-source", stem_->self_scm ());
+      if (stem_ && to_dir (script->get_property ("side-relative-direction")))
+       script->set_property ("direction-source", stem_->self_scm ());
+
+
+      if (stem_ && to_boolean (script->get_property ("add-stem-support")))
+       Side_position_interface::add_support (script, stem_);
       
       if (articulations_[i].follow_into_staff_)
        {
       
       if (articulations_[i].follow_into_staff_)
        {
-         sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
-         sc->set_property ("staff-padding" , SCM_EOL);
+         script->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
+         script->set_property ("staff-padding" , SCM_EOL);
        }
     }
 
        }
     }
 
index 279b265a96b01c725e114d02d4ef37651c3c9a43..2d5a386c10f09c7473fadcc55ce5729dede91764 100644 (file)
@@ -92,9 +92,13 @@ struct Text_script
 
 ADD_INTERFACE (Text_script,"text-script-interface",
   "An object that is put above or below a note",
 
 ADD_INTERFACE (Text_script,"text-script-interface",
   "An object that is put above or below a note",
-  "slur script-priority inside-slur");
+  "add-stem-support slur script-priority inside-slur");
 
 
+
+/*
+  Hmm. Where should we put add-stem-support ?
+ */
 ADD_INTERFACE (Script_interface, "script-interface",
   "An object that is put above or below a note",
 ADD_INTERFACE (Script_interface, "script-interface",
   "An object that is put above or below a note",
-  "slur script-priority script-stencil inside-slur");
+  "add-stem-support slur script-priority script-stencil inside-slur");
 
 
index e963ad68b176d22443ca941876073305ec607556..80bd9bbf81eed2507083b3eefc9481bfd13c70aa 100644 (file)
@@ -163,6 +163,6 @@ ENTER_DESCRIPTION (Slur_engraver,
   /* descr */       "Build slurs grobs from slur events",
   /* creats*/       "Slur",
   /* accepts */     "slur-event",
   /* descr */       "Build slurs grobs from slur events",
   /* creats*/       "Slur",
   /* accepts */     "slur-event",
-  /* acks  */      "note-column-interface accidental-interface fingering-interface script-interface tie-interface",
+  /* acks  */      "note-column-interface accidental-interface fingering-interface script-interface tie-interface text-script-interface",
   /* reads */       "slurMelismaBusy doubleSlurs",
   /* write */       "");
   /* reads */       "slurMelismaBusy doubleSlurs",
   /* write */       "");
index 56c6306e3d4c24611d3d22b41e4748ea023934c2..6d1047ac055dc7955a8bbfb56d4e402bce385c9d 100644 (file)
@@ -443,8 +443,18 @@ get_bound_info (Spanner* me, Grob **common)
          extremes[d].staff_space_ = Staff_symbol_referencer
            ::staff_space (extremes[d].stem_);
        }
          extremes[d].staff_space_ = Staff_symbol_referencer
            ::staff_space (extremes[d].stem_);
        }
-      else
+      else if (d == RIGHT)
+       /*
+         right side anticipates on the next note.
+       */
        extremes[d].neighbor_y_ = broken_trend_y (me, common, d);
        extremes[d].neighbor_y_ = broken_trend_y (me, common, d);
+
+      else
+       {
+         Link_array<Grob> columns
+           = Pointer_group_interface__extract_grobs (me, (Grob *) 0, "note-columns");
+         extremes[d].neighbor_y_ = columns[0]->extent (common[Y_AXIS], Y_AXIS)[dir];
+       }
     }
   while (flip (&d) != LEFT);
   return extremes;
     }
   while (flip (&d) != LEFT);
   return extremes;
index 832bc727bb153ed20d53500929b021adcd5a110d..8f46f38bf582baca7cd8711771a8641a135865e2 100644 (file)
@@ -42,6 +42,7 @@ called first.  The functions take a grob and axis argument. ")
      (Y-offset-callbacks ,list? "see @code{X-offset-callbacks}.")
 
      (accidentals ,list? "List of alteration numbers.")
      (Y-offset-callbacks ,list? "see @code{X-offset-callbacks}.")
 
      (accidentals ,list? "List of alteration numbers.")
+     (add-stem-support ,boolean? "If set, the Stem object is included in this script's support") 
     
      (align-dir ,ly:dir? "Which side to align? @code{-1}: left side,
 @code{0}: around center of width, @code{1}: right side.")
     
      (align-dir ,ly:dir? "Which side to align? @code{-1}: left side,
 @code{0}: around center of width, @code{1}: right side.")
@@ -437,6 +438,8 @@ of flags/beams.")
 stems that are placed in tight configurations. For opposite
 directions, this amount is the correction for two normal sized stems
 that overlap completely.")
 stems that are placed in tight configurations. For opposite
 directions, this amount is the correction for two normal sized stems
 that overlap completely.")
+
+     
      (string-count ,integer? "The number of strings in a fret diagram.")
      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")
      
      (string-count ,integer? "The number of strings in a fret diagram.")
      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")