]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/new-fingering-engraver.cc (position_scripts): use
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 4 Jan 2003 13:17:05 +0000 (13:17 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 4 Jan 2003 13:17:05 +0000 (13:17 +0000)
fingerHorizontalDirection to determine fingering horizontal
directions.

* lily/accidental-engraver.cc (acknowledge_grob): add accidental to
fingering support.

ChangeLog
Documentation/user/refman.itely
input/regression/finger-chords.ly
lily/accidental-engraver.cc
lily/new-fingering-engraver.cc
scm/translator-property-description.scm

index 11ac932a303e6aa219ccfb3b408ec4dc96d41511..633e485f6cb61e0ab03a127d3714e8961e32bc4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
 2003-01-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/new-fingering-engraver.cc (position_scripts): use
+       fingerHorizontalDirection to determine fingering horizontal
+       directions.
+       * lily/accidental-engraver.cc (acknowledge_grob): add accidental to
+       fingering support.
+
        * scripts/convert-ly.py (FatalConversionError.conv): add style
        conversion rule. 
 
index 4448f20fc8e3aae3a08c0fc5d873218c7e654356..da6fb92c55f04d66e9bed9b47a2f01cb2d64867b 100644 (file)
@@ -3594,7 +3594,7 @@ at the beginning of the next line, opposite to what you want for the
 fermata. This can be corrected by the following property setting
 @example
 \property Score.RehearsalMark \override
-  #'visibility-lambda = #begin-of-line-invisible
+  #'break-visibility = #begin-of-line-invisible
 @end example
 
 @cindex fermatas
index 35857f8e3ef85151185072dbb7c4185c4b6d2cc3..c09c095782b63ee86a54caad00acefb7637c75b3 100644 (file)
@@ -17,10 +17,10 @@ easier to process."
        << c-1 e-3>> 4
        << c-1  e-3 g-5 >> 4
        << c-1  e-2 g-3 b-5 >> 4
-       \property Voice.fingersHorizontal = ##t
-       << c-1  e-3 g-5 >> 4
-       \property Voice.fingersHorizontal = ##t
-       << c-1  e-2 g-3 b-5 >> 4
+       \property Voice.fingerHorizontalDirection = #LEFT
+       << c-1  es-3 g-5 >> 4
+       \property Voice.fingerHorizontalDirection = #RIGHT
+       << c-1  e-2 g-3 b-5 >> 4-\arpeggio
        
 }
 
index b7c9289eab27db460c0e2057bca1b3e87428d775..1abf123f2cc245c57e2ca03cd5505db5be185c98 100644 (file)
@@ -16,7 +16,6 @@
 #include "engraver.hh"
 #include "arpeggio.hh"
 #include "warn.hh"
-
 #include "translator-group.hh"
 
 /**
@@ -71,19 +70,16 @@ public:
     Urgh. Since the accidentals depend on lots of variables, we have to
     store all information before we can really create the accidentals.
   */
-  Link_array<Grob> arpeggios_;
+  Link_array<Grob> left_objects_;
+  Link_array<Grob> right_objects_;
 
   Grob * accidental_placement_;
-  
 
   /*
     The next 
    */
   Array<Accidental_entry> accidentals_;
-  
   Link_array<Grob> ties_;
-
-
 };
 
 
@@ -334,8 +330,10 @@ Accidental_engraver::process_acknowledged_grobs ()
        accidentals. 
        
       */
-             for (int i = 0;  i < arpeggios_.size ();  i++)
-               Side_position_interface::add_support (arpeggios_[i], a);
+             for (int i = 0;  i < left_objects_.size ();  i++)
+               Side_position_interface::add_support (left_objects_[i], a);
+             for (int i = 0;  i < right_objects_.size ();  i++)
+               Side_position_interface::add_support (a, right_objects_[i]);
            }
          
 
@@ -422,7 +420,8 @@ Accidental_engraver::stop_translation_timestep ()
   accidental_placement_ = 00;
   
   accidentals_.clear();
-  arpeggios_.clear ();
+  left_objects_.clear ();
+  right_objects_.clear ();
   ties_.clear ();
 }
 
@@ -448,9 +447,12 @@ Accidental_engraver::acknowledge_grob (Grob_info info)
     }
   else if (Arpeggio::has_interface (info.grob_))
     {
-      arpeggios_.push (info.grob_); 
+      left_objects_.push (info.grob_); 
+    }
+  else if (info.grob_->internal_has_interface (ly_symbol2scm("finger-interface")))
+    {
+      left_objects_.push (info.grob_); 
     }
-  
 }
 
 void
@@ -485,6 +487,6 @@ ENTER_DESCRIPTION (Accidental_engraver,
 " with note heads), this needs to be in a context higher than Tie_engraver.",
               "Accidental",
 /* accepts */     "",
-              "rhythmic-head-interface tie-interface arpeggio-interface",
+              "finger-interface rhythmic-head-interface tie-interface arpeggio-interface",
               "localKeySignature extraNatural autoAccidentals autoCautionaries",
                   "localKeySignature");
index 5e98d24cc821bae12baa93b95f5050689697053f..0c95e5624afd206922663c0320af5d845272ace3 100644 (file)
@@ -187,7 +187,9 @@ New_fingering_engraver::position_scripts ()
     }
   
   fingerings_.sort (&Finger_tuple::compare);
-  if (to_boolean (get_property ("fingersHorizontal")))
+  SCM fhd = get_property ("fingerHorizontalDirection");
+  
+  if (ly_dir_p (fhd))
     {
       up.push (fingerings_.pop());
       down.push (fingerings_[0]);
@@ -211,7 +213,8 @@ New_fingering_engraver::position_scripts ()
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, Y_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS);
-      f->set_grob_property( "direction", gh_int2scm (RIGHT));
+
+      f->set_grob_property( "direction", fhd);
       typeset_grob (f);
     }
 
@@ -256,7 +259,7 @@ New_fingering_engraver::stop_translation_timestep ()
   if (fingerings_.size ())
     {
       position_scripts();
-        fingerings_.clear ();
+      fingerings_.clear ();
     }
   
   for (int i =  articulations_.size(); i--;)
index 861fe5917e3f4a86dccacb45a4ea99a228a7b6a2..c3196ed68cfe61036c5bb854e2ab5321d6861e8b 100644 (file)
@@ -326,8 +326,9 @@ than this number of measures, no number is printed. ")
 scripts left or right of note heads.  Support for this is limited.
 Accidentals will collide with scripts.
 ")
-(translator-property-description 'fingersHorizontal boolean? "Put the middle fingerings to the
-right side of the note head.")
+(translator-property-description 'fingerHorizontalDirection integer?
+                                "If set, put the middle fingerings to
+the side of the note head. Use LEFT, RIGHT or unset.")
 
 (translator-property-description 'skipBars boolean? " Set to true to
 skip the empty bars that are produced by multimeasure notes and rests.