From: Han-Wen Nienhuys Date: Sat, 4 Jan 2003 13:17:05 +0000 (+0000) Subject: * lily/new-fingering-engraver.cc (position_scripts): use X-Git-Tag: release/1.7.11~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=29c915ce2266a1a176222e8c2742c74fa9194a70;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 11ac932a30..633e485f6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,13 @@ 2003-01-04 Han-Wen Nienhuys + * 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. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 4448f20fc8..da6fb92c55 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -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 diff --git a/input/regression/finger-chords.ly b/input/regression/finger-chords.ly index 35857f8e3e..c09c095782 100644 --- a/input/regression/finger-chords.ly +++ b/input/regression/finger-chords.ly @@ -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 } diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index b7c9289eab..1abf123f2c 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -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 arpeggios_; + Link_array left_objects_; + Link_array right_objects_; Grob * accidental_placement_; - /* The next */ Array accidentals_; - Link_array 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"); diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 5e98d24cc8..0c95e5624a 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -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--;) diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm index 861fe5917e..c3196ed68c 100644 --- a/scm/translator-property-description.scm +++ b/scm/translator-property-description.scm @@ -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.