2005-09-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/stem-tremolo.cc (raw_stencil): read slope property.
+
* lily/include/paper-system.hh (class Paper_system): remove
staff_extents_ member.
@itemize @bullet
+@item
+The slope of a stem-tremolo may be set manually
+
+@lilypond[fragment,relative=1,raggedright]
+c8:16[
+\once \override StemTremolo #'slope = #0.45
+c:16 c:16 c:16 ]
+@end 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},
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."
}
\relative c'' \context Voice {
\foobar
- << \applyMusic #(lambda (x) (music-map notes-to-skip x))
+ << \applyMusic #(lambda (x) (music-map notes-to-skip x))
\foobar
{ d2 d2 } >>
}
-\version "2.6.0"
+\version "2.7.10"
\header {
texidoc = "Wilhelmus van Nassouwe"
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 = {
SCM internal_get_property (SCM sym) const;
void internal_set_property (SCM sym, SCM val);
bool is_title () const;
+
Real break_before_penalty () const;
};
{
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 ();
}
{
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);
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");
"\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)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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))))