+2004-11-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/accidental-placement.cc (position_accidentals): shortcut if
+ no accidentals to place.
+
2004-11-28 Nicolas Sceaux <nicolas.sceaux@free.fr>
* scm/define-grob-properties.scm (all-user-grob-properties): fixed
@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,
@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
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
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;
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.
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<?",
2, 0, 0, (SCM a, SCM b),
"Compare two moments.")
startGraceMusic = {
-% \context Voice \applycontext #set-start-grace-properties
}
stopGraceMusic = {
-% \context Voice \applycontext #set-stop-grace-properties
}
startAppoggiaturaMusic =
{
-% \context Voice \applycontext #set-start-grace-properties
s1*0(
}
stopAppoggiaturaMusic = {
-% \context Voice \applycontext #set-stop-grace-properties
s1*0)
}
startAcciaccaturaMusic = {
-% \context Voice \applycontext #set-start-grace-properties
s1*0(
\override Stem #'stroke-style = #"grace"
}
stopAcciaccaturaMusic = {
\revert Stem #'stroke-style
-% \context Voice \applycontext #set-stop-grace-properties
s1*0)
}
'elements (list music lyrics)))
grace = #(def-grace-function startGraceMusic stopGraceMusic)
+
acciaccatura = #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic)
appoggiatura = #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic)
mus)) music))
+afterGraceFraction = #(cons 6 8)
+
+afterGrace =
+#(def-music-function
+ (parser location main grace)
+ (ly:music? ly:music?)
+
+ (let*
+ ((main-length (ly:music-length main))
+ (fraction (ly:parser-lookup parser 'afterGraceFraction)))
+
+ (make-simultaneous-music
+ (list
+ main
+ (make-sequential-music
+ (list
+
+ (make-music 'SkipMusic
+ 'duration (ly:make-duration
+ 0 0
+ (* (ly:moment-main-numerator main-length)
+ (car fraction))
+ (* (ly:moment-main-denominator main-length)
+ (cdr fraction)) ))
+ (make-music 'GraceMusic
+ 'element grace)))))))
%{