From d955346042b9770cc026b340745fceed52103ad7 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 27 May 2003 00:16:54 +0000 Subject: [PATCH] (make-ottava-set): bugfixes: also process 2nd ottava correctly. --- ChangeLog | 5 +++++ input/regression/ottava.ly | 4 +++- lily/beam-engraver.cc | 4 ++-- lily/ottava-engraver.cc | 1 + ly/engraver-init.ly | 2 +- scm/define-translator-properties.scm | 4 ++-- scm/music-functions.scm | 10 +++++----- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index adf3eb9cca..6a6e0e019f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-05-27 Han-Wen Nienhuys + + * scm/music-functions.scm (make-ottava-set): bugfixes: also + process 2nd ottava correctly. + 2003-05-27 Heikki Junes * lilypond-indent.el: allow strings in LilyPond-parens-alist. diff --git a/input/regression/ottava.ly b/input/regression/ottava.ly index fbadf825de..562ed6ad40 100644 --- a/input/regression/ottava.ly +++ b/input/regression/ottava.ly @@ -16,7 +16,9 @@ use of the scheme function @code{set-octavation}. a b c a #(set-octavation 0) - a b c a + a #(set-octavation 1) b + #(set-octavation 0) + c a } } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index efa4eb40e2..a00668d785 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -164,7 +164,7 @@ Beam_engraver::process_music () beam_ = 0; } - if (beam_ && to_boolean (get_property ("forbidBeamBreak"))) + if (beam_ && !to_boolean (get_property ("allowBeamBreak"))) { top_engraver ()->forbid_breaks (); } @@ -375,6 +375,6 @@ ENTER_DESCRIPTION(Grace_beam_engraver, /* creats*/ "Beam", /* accepts */ "beam-event abort-event new-beam-event", /* acks */ "stem-interface rest-interface", -/* reads */ "beamMelismaBusy beatLength forbidBeamBreak subdivideBeams", +/* reads */ "beamMelismaBusy beatLength allowBeamBreak subdivideBeams", /* write */ ""); diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc index e849a1d3f0..2afa0c321a 100644 --- a/lily/ottava-engraver.cc +++ b/lily/ottava-engraver.cc @@ -36,6 +36,7 @@ Ottava_spanner_engraver::Ottava_spanner_engraver () { finished_ = 0; span_ =0; + last_ottavation_ = SCM_EOL; } void diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 805b3757b0..3dfcdbd3eb 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -463,7 +463,7 @@ ScoreContext = \translator { tupletNumberFormatFunction = #denominator-tuplet-formatter subdivideBeams = ##f - forbidBeamBreak = ##t + allowBeamBreak = ##f extraNatural = ##t autoAccidentals = #'(Staff (same-octave . 0)) autoCautionaries = #'() diff --git a/scm/define-translator-properties.scm b/scm/define-translator-properties.scm index 122de94ff4..1d0818c81e 100644 --- a/scm/define-translator-properties.scm +++ b/scm/define-translator-properties.scm @@ -251,8 +251,8 @@ another non-natural. "Used to set the relative size of all grobs in a context. This is done using the @code{Font_size_engraver}.") -(translator-property-description 'forbidBeamBreak boolean? - "If false, allow line breaks during beams.") +(translator-property-description 'allowBeamBreak boolean? + "If true allow line breaks during beams.") (translator-property-description 'forceClef boolean? "Show clef symbol, even if it hasn't changed. Only active for the first clef after the property is set, not for the full staff.") (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental") diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 4d99d86e3e..365efd4e75 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -315,7 +315,7 @@ and set OTTAVATION to `8va', or whatever appropriate. (oc0 (ly:get-context-property context 'originalCentralCPosition)) ) - + (ly:set-context-property context 'centralCPosition oc0) (ly:unset-context-property where 'originalCentralCPosition) (ly:unset-context-property where 'ottavation) @@ -333,14 +333,14 @@ and set OTTAVATION to `8va', or whatever appropriate. (-2 . "15ma bassa"))))) ) - (ly:set-context-property where 'centralCPosition new-c0) - (ly:set-context-property where 'originalCentralCPosition c0) - (ly:set-context-property where 'ottavation string) + (ly:set-context-property context 'centralCPosition new-c0) + (ly:set-context-property context 'originalCentralCPosition c0) + (ly:set-context-property context 'ottavation string) ))) (ly:set-mus-property! m 'procedure ottava-modify) - m + (context-spec-music m "Staff" ) )) (define-public (set-octavation ottavation) -- 2.39.5