CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/09/27 12:32:12
Modified files:
. : ChangeLog
Documentation/topdocs: NEWS.tely
input : wilhelmus.ly
input/regression: music-map.ly
lily : paper-system.cc stem-tremolo.cc
lily/include : paper-system.hh
scm : page-layout.scm
Log message:
* lily/stem-tremolo.cc (raw_stencil): read slope property.
* lily/include/paper-system.hh (class Paper_system): remove
staff_extents_ member.
* lily/include/paper-system.hh (class Paper_system): remove
number_ variable. Remove is_title_. Remove break_before_penalty_
* scm/lily-library.scm (paper-system-title?): new function.
* scm/page-layout.scm (ly:optimal-page-breaks): read next-space
and next-padding.
(optimal-page-breaks): rename from ly:optimal-page-breaks.
* lily/paper-system.cc (internal_get_property): new function.
* scm/page-layout.scm (ly:optimal-page-breaks): add support for
pagetopspace
* lily/paper-system.cc (read_left_bound): new function. Read
line-break-system-details from left bound to determine extents.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4139&tr2=1.4140&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.89&tr2=1.90&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/wilhelmus.ly.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/music-map.ly.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/paper-system.cc.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stem-tremolo.cc.diff?tr1=1.89&tr2=1.90&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/paper-system.hh.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/page-layout.scm.diff?tr1=1.82&tr2=1.83&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4139 lilypond/ChangeLog:1.4140
--- lilypond/ChangeLog:1.4139 Tue Sep 27 11:33:27 2005
+++ lilypond/ChangeLog Tue Sep 27 12:32:10 2005
@@ -1,5 +1,7 @@
2005-09-27 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * lily/stem-tremolo.cc (raw_stencil): read slope property.
+
* lily/include/paper-system.hh (class Paper_system): remove
staff_extents_ member.
Index: lilypond/Documentation/topdocs/NEWS.tely
diff -u lilypond/Documentation/topdocs/NEWS.tely:1.89
lilypond/Documentation/topdocs/NEWS.tely:1.90
--- lilypond/Documentation/topdocs/NEWS.tely:1.89 Tue Sep 27 10:02:06 2005
+++ lilypond/Documentation/topdocs/NEWS.tely Tue Sep 27 12:32:11 2005
@@ -45,10 +45,22 @@
@itemize @bullet
[EMAIL PROTECTED]
+The slope of a stem-tremolo may be set manually
+
[EMAIL PROTECTED],relative=1,raggedright]
+c8:16[
+\once \override StemTremolo #'slope = #0.45
+c:16 c:16 c:16 ]
[EMAIL PROTECTED] lilypond
+
+This feature was sponsored by Sven Axelsson.
@item
Vertical spacing for page layout can now be tuned for each system
-individually. This feature was sponsored by Trevor Baca.
+individually.
+
+This feature was sponsored by Trevor Baca.
@item
Laissez vibrer ties can be created with @code{\laissezVibrer},
Index: lilypond/input/regression/music-map.ly
diff -u lilypond/input/regression/music-map.ly:1.30
lilypond/input/regression/music-map.ly:1.31
--- lilypond/input/regression/music-map.ly:1.30 Tue Sep 27 10:50:10 2005
+++ lilypond/input/regression/music-map.ly Tue Sep 27 12:32:11 2005
@@ -2,11 +2,11 @@
texidoc =
- "With @code{music-map}, you can apply functions operating on a single
-piece of music to an entire music expression. In this example, the the
-function @code{notes-to-skip} changes a note to a skip. When applied
-to an entire music expression in the 1st measure, the scripts and
-dynamics are left over. These are put onto the 2nd measure."
+ "With @code{music-map}, you can apply functions operating on a
+single piece of music to an entire music expression. In this example,
+the the function @code{notes-to-skip} changes a note to a skip. When
+applied to an entire music expression in the 1st measure, the scripts
+and dynamics are left over. These are put onto the 2nd measure."
}
@@ -35,7 +35,7 @@
\relative c'' \context Voice {
\foobar
- << pplyMusic #(lambda (x) (music-map notes-to-skip x))
+ << \applyMusic #(lambda (x) (music-map notes-to-skip x))
\foobar
{ d2 d2 } >>
}
Index: lilypond/input/wilhelmus.ly
diff -u lilypond/input/wilhelmus.ly:1.21 lilypond/input/wilhelmus.ly:1.22
--- lilypond/input/wilhelmus.ly:1.21 Wed Jul 20 10:13:46 2005
+++ lilypond/input/wilhelmus.ly Tue Sep 27 12:32:11 2005
@@ -1,4 +1,4 @@
-\version "2.6.0"
+\version "2.7.10"
\header {
texidoc = "Wilhelmus van Nassouwe"
@@ -35,15 +35,15 @@
setMargins = {
%% first line left margin
%% justified:
- %% \context Staff \applycontext #(set-extra-space 'TimeSignature 'first-note
4.5)
+ %% \context Staff \applyContext #(set-extra-space 'TimeSignature 'first-note
4.5)
%% raggedright:
- \context Staff \applycontext #(set-extra-space 'TimeSignature 'first-note
9.5)
+ \context Staff \applyContext #(set-extra-space 'TimeSignature 'first-note
9.5)
%% next lines left margin
- \context Staff \applycontext #(set-extra-space 'KeySignature 'staff-bar 15)
+ \context Staff \applyContext #(set-extra-space 'KeySignature 'staff-bar 15)
%% next lines small key-signature margin
- \context Staff \applycontext #(set-extra-space 'LeftEdge 'key-signature 1.0)
+ \context Staff \applyContext #(set-extra-space 'LeftEdge 'key-signature 1.0)
}
pipeSymbol = {
Index: lilypond/lily/include/paper-system.hh
diff -u lilypond/lily/include/paper-system.hh:1.14
lilypond/lily/include/paper-system.hh:1.15
--- lilypond/lily/include/paper-system.hh:1.14 Tue Sep 27 11:33:28 2005
+++ lilypond/lily/include/paper-system.hh Tue Sep 27 12:32:12 2005
@@ -33,6 +33,7 @@
SCM internal_get_property (SCM sym) const;
void internal_set_property (SCM sym, SCM val);
bool is_title () const;
+
Real break_before_penalty () const;
};
Index: lilypond/lily/paper-system.cc
diff -u lilypond/lily/paper-system.cc:1.21 lilypond/lily/paper-system.cc:1.22
--- lilypond/lily/paper-system.cc:1.21 Tue Sep 27 11:33:28 2005
+++ lilypond/lily/paper-system.cc Tue Sep 27 12:32:11 2005
@@ -34,6 +34,7 @@
{
Paper_system *system = (Paper_system *) SCM_CELL_WORD_1 (smob);
scm_gc_mark (system->mutable_property_alist_);
+ scm_gc_mark (system->immutable_property_alist_);
return system->stencil_.expr ();
}
Index: lilypond/lily/stem-tremolo.cc
diff -u lilypond/lily/stem-tremolo.cc:1.89 lilypond/lily/stem-tremolo.cc:1.90
--- lilypond/lily/stem-tremolo.cc:1.89 Sat Jul 16 12:23:33 2005
+++ lilypond/lily/stem-tremolo.cc Tue Sep 27 12:32:11 2005
@@ -54,22 +54,27 @@
{
Grob *stem = unsmob_grob (me->get_object ("stem"));
Spanner *beam = Stem::get_beam (stem);
- Real dydx;
- if (beam)
+
+ SCM slope = me->get_property ("slope");
+ Real dydx = 0.25;
+ if (scm_is_number (slope))
{
- Real dy = 0;
- SCM s = beam->get_property ("positions");
- if (is_number_pair (s))
- dy = -scm_to_double (scm_car (s)) +scm_to_double (scm_cdr (s));
-
- Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
- - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
- dydx = dx ? dy / dx : 0;
+ dydx = robust_scm2double (slope, 0.0);
}
else
- // urg
- dydx = 0.25;
-
+ {
+ if (beam)
+ {
+ Real dy = 0;
+ SCM s = beam->get_property ("positions");
+ if (is_number_pair (s))
+ dy = - scm_to_double (scm_car (s)) + scm_to_double (scm_cdr (s));
+
+ Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0,
X_AXIS)
+ - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
+ dydx = dx ? dy / dx : 0;
+ }
+ }
Real ss = Staff_symbol_referencer::staff_space (me);
Real thick = robust_scm2double (me->get_property ("beam-thickness"), 1);
Real width = robust_scm2double (me->get_property ("beam-width"), 1);
@@ -172,4 +177,8 @@
ADD_INTERFACE (Stem_tremolo, "stem-tremolo-interface",
"A beam slashing a stem to indicate a tremolo.",
- "stem beam-width beam-thickness flag-count");
+ "stem "
+ "slope "
+ "beam-width "
+ "beam-thickness "
+ "flag-count");
Index: lilypond/scm/page-layout.scm
diff -u lilypond/scm/page-layout.scm:1.82 lilypond/scm/page-layout.scm:1.83
--- lilypond/scm/page-layout.scm:1.82 Tue Sep 27 11:33:28 2005
+++ lilypond/scm/page-layout.scm Tue Sep 27 12:32:12 2005
@@ -28,7 +28,8 @@
"\n")))
(define-method (node-system-numbers (node <optimally-broken-page-node>))
- (map ly:paper-system-property (node-lines node) 'number))
+ (map (lambda (ps) (ly:paper-system-property ps 'number))
+ (node-lines node)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -471,8 +472,6 @@
(set! force-equalization-factor
(ly:output-def-lookup paper 'verticalequalizationfactor 0.3))
- (display lines)
-
(let* ((best-break-node (walk-lines '() '() lines))
(break-nodes (get-path best-break-node '()))
(last-node (car (last-pair break-nodes))))
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs