From 5d09e71683990a4615ea4e0c497db31c462e2345 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 28 Nov 2004 17:37:42 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 5 +++++ Documentation/topdocs/NEWS.texi | 8 ++++++-- Documentation/user/notation.itely | 2 +- flower/include/rational.hh | 6 ++++-- lily/accidental-placement.cc | 4 +++- lily/moment.cc | 20 ++++++++++++++++++++ ly/grace-init.ly | 6 ------ ly/music-functions-init.ly | 27 +++++++++++++++++++++++++++ 8 files changed, 66 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f955af3d0..f7b206304a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-28 Han-Wen Nienhuys + + * lily/accidental-placement.cc (position_accidentals): shortcut if + no accidentals to place. + 2004-11-28 Nicolas Sceaux * scm/define-grob-properties.scm (all-user-grob-properties): fixed diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 85e561a6d6..4f57ab6251 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -7,6 +7,10 @@ @unnumbered New features in 2.5 since 2.4 @itemize @bullet +@item +LilyPond will now avoid line breaks that cause long texts to stick +outside of the page staff. + @item Grace notes following a main note, used to be entered by letting the grace notes follow a skip in a parallel expression, for example, @@ -18,10 +22,10 @@ grace notes follow a skip in a parallel expression, for example, @end verbatim @noindent -This can verbose input can now be shortened, by doing +This can now be shortened by doing @example -\afterGrace { d1 } { c16[ d] } +\afterGrace @{ d1 @} @{ c16[ d] @} @end example @item diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 236dcdbf55..9434abfebf 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -2512,7 +2512,7 @@ If you want to end a note with a grace, use the @code{\afterGrace} command. It takes two arguments: the main note, and the grace notes following the main note. -@lilypond[raggedright, verbatim,relative=2] +@lilypond[raggedright, verbatim,relative=2,fragment] c1 \afterGrace d1 { c16[ d] } c4 @end lilypond diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 361b075f7e..11cf97736d 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -33,8 +33,10 @@ public: void set_infinite (int sign); bool is_infinity () const; void invert (); - int num () const { return sign_ * num_; } - int den () const { return den_; } + int numerator () const { return sign_ * num_; } + int denominator () const { return den_; } + int num () const { return numerator(); } + int den () const { return denominator(); } Rational trunc_rat () const; Rational div_rat (Rational) const; diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 8845454aa1..b81e4d5702 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -254,7 +254,9 @@ Accidental_placement::position_accidentals (Grob * me) return SCM_UNSPECIFIED; SCM accs = me->get_property ("accidental-grobs"); - + if (!scm_is_pair (accs)) + return SCM_UNSPECIFIED; + /* TODO: there is a bug in this code. If two accs are on the same Y-position, they share an Ape, and will be printed in overstrike. diff --git a/lily/moment.cc b/lily/moment.cc index 4ac319df5b..ea5ec2e7df 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -132,6 +132,26 @@ LY_DEFINE (ly_div_moment,"ly:div-moment", return (*ma / *mb).smobbed_copy (); } +LY_DEFINE (ly_moment_main_numerator,"ly:moment-main-numerator", + 1, 0, 0, (SCM mom), + "Extract numerator from main timing.") +{ + Moment *ma = unsmob_moment (mom); + SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment"); + + return scm_from_int (ma->main_part_.numerator ()); +} + +LY_DEFINE (ly_moment_main_denominator,"ly:moment-main-denominator", + 1, 0, 0, (SCM mom), + "Extract denominator from main timing.") +{ + Moment *ma = unsmob_moment (mom); + SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment"); + + return scm_from_int (ma->main_part_.denominator ()); +} + LY_DEFINE (ly_moment_less_p,"ly:moment