CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/04/21 15:59:44
Modified files: . : ChangeLog Documentation/topdocs: NEWS.tely input/regression: grid-lines.ly lily : grid-line-interface.cc scm : define-context-properties.scm define-grobs.scm define-markup-commands.scm Log message: * input/regression/grid-lines.ly (skips): refine example. * scm/define-context-properties.scm (all-user-translation-properties): doc autoBeamCheck * input/regression/grid-lines.ly (Module): new file. * lily/grid-line-interface.cc (Module): new file. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3490&tr2=1.3491&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.30&tr2=1.31&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/grid-lines.ly.diff?tr1=1.1&tr2=1.2&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grid-line-interface.cc.diff?tr1=1.1&tr2=1.2&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-context-properties.scm.diff?tr1=1.39&tr2=1.40&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-grobs.scm.diff?tr1=1.191&tr2=1.192&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-markup-commands.scm.diff?tr1=1.89&tr2=1.90&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3490 lilypond/ChangeLog:1.3491 --- lilypond/ChangeLog:1.3490 Thu Apr 21 15:20:45 2005 +++ lilypond/ChangeLog Thu Apr 21 15:59:43 2005 @@ -1,5 +1,10 @@ 2005-04-21 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * input/regression/grid-lines.ly (skips): refine example. + + * scm/define-context-properties.scm + (all-user-translation-properties): doc autoBeamCheck + * input/regression/grid-lines.ly (Module): new file. * lily/grid-point-engraver.cc (Module): new file Index: lilypond/Documentation/topdocs/NEWS.tely diff -u lilypond/Documentation/topdocs/NEWS.tely:1.30 lilypond/Documentation/topdocs/NEWS.tely:1.31 --- lilypond/Documentation/topdocs/NEWS.tely:1.30 Thu Apr 21 14:28:31 2005 +++ lilypond/Documentation/topdocs/NEWS.tely Thu Apr 21 15:59:44 2005 @@ -34,6 +34,9 @@ @itemize @bullet @item +Grid lines + [EMAIL PROTECTED] Lines, such as glissandi or Text-spanner lines, can have arrows at the end, e.g. Index: lilypond/input/regression/grid-lines.ly diff -u lilypond/input/regression/grid-lines.ly:1.1 lilypond/input/regression/grid-lines.ly:1.2 --- lilypond/input/regression/grid-lines.ly:1.1 Thu Apr 21 15:20:45 2005 +++ lilypond/input/regression/grid-lines.ly Thu Apr 21 15:59:44 2005 @@ -48,6 +48,9 @@ } } +\layout { + raggedright = ##t +} \new Score \with { \consists "Grid_line_span_engraver" @@ -55,14 +58,30 @@ \override TimeSignature #'transparent = ##t \override NoteColumn #'X-offset-callbacks = #(list (lambda (x a) -0.5)) - \override NoteColumn #'Y-offset-callbacks = #(list (lambda (x a) 0.25)) + \override NoteHead #'Y-offset-callbacks = #(list (lambda (x a) 0.75)) } \new StaffGroup << - \new Staff { - \repeat unfold 12 { c''8 } + \new RhythmicStaff \with + { + \override NoteHead #'no-ledgers = ##t + } + { + \stemUp + c4. c8 c8 c c4 c8 c8.[ c16 c8] + } + \new RhythmicStaff + { + \override NoteHead #'transparent = ##t + \override NoteHead #'no-ledgers = ##t + \override Stem #'transparent = ##t + \override Beam #'transparent = ##t + << \skips + + % force regular spacing by introducing notes. + \repeat unfold 12 c8 + >> } - \new RhythmicStaff \skips - \new RhythmicStaff \skips + >> Index: lilypond/lily/grid-line-interface.cc diff -u lilypond/lily/grid-line-interface.cc:1.1 lilypond/lily/grid-line-interface.cc:1.2 --- lilypond/lily/grid-line-interface.cc:1.1 Thu Apr 21 15:20:45 2005 +++ lilypond/lily/grid-line-interface.cc Thu Apr 21 15:59:44 2005 @@ -51,6 +51,21 @@ return st.smobbed_copy (); } +MAKE_SCHEME_CALLBACK (Grid_line_interface, width_callback, 2); +SCM +Grid_line_interface::width_callback (SCM element_smob, SCM scm_axis) +{ + Grob *me = unsmob_grob (element_smob); + (void) scm_axis; + assert (scm_to_int (scm_axis) == X_AXIS); + + Real staffline = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness")); + Real thick = robust_scm2double (me->get_property ("thickness"), 1.0) + * staffline; + + return ly_interval2scm (Interval (0, thick)); +} + void Grid_line_interface::add_grid_point (Grob *me, Grob *b) { @@ -62,3 +77,8 @@ "A line that spanned between grid-points. ", "elements thickness"); + +ADD_INTERFACE (Grid_point_interface, "grid-point-interface", + "A spanning point for grid lines. ", + ""); + Index: lilypond/scm/define-context-properties.scm diff -u lilypond/scm/define-context-properties.scm:1.39 lilypond/scm/define-context-properties.scm:1.40 --- lilypond/scm/define-context-properties.scm:1.39 Thu Apr 21 15:20:45 2005 +++ lilypond/scm/define-context-properties.scm Thu Apr 21 15:59:44 2005 @@ -72,6 +72,8 @@ lasts forever. @end table ") + (autoBeamCheck ,procedure? "Routine taking two arguments, +start/stop (-1 or 1) and shortest note in the beam.") (autoBeaming ,boolean? "If set to true then beams are generated automatically.") @@ -86,7 +88,7 @@ are still counted. Bar generation will resume according to that count if this property is unset. ") - + (barAlways ,boolean? "If set to true a bar line is drawn after each note.") @@ -210,6 +212,8 @@ (forceClef ,boolean? "Show clef symbol, even if it has not changed. Only active for the first clef after the property is set, not for the full staff.") + (gridInterval ,ly:moment? + "Interval for which to generate @ref{GridPoint}s") (harmonicAccidentals ,boolean? "If set, harmonic notes in chords get accidentals.") @@ -453,8 +457,6 @@ (graceSettings ,list? "Overrides for grace notes. This property should be manipulated through the @code{add-grace-property} function.") - (gridInterval ,ly:moment? - "Interval for which to generate @ref{GridPoint}s") (currentCommandColumn ,ly:grob? "Grob that is X-parent to all current breakable (clef, key signature, etc.) items.") (currentMusicalColumn ,ly:grob? "Grob that is X-parent to all Index: lilypond/scm/define-grobs.scm diff -u lilypond/scm/define-grobs.scm:1.191 lilypond/scm/define-grobs.scm:1.192 --- lilypond/scm/define-grobs.scm:1.191 Thu Apr 21 15:20:45 2005 +++ lilypond/scm/define-grobs.scm Thu Apr 21 15:59:44 2005 @@ -507,12 +507,11 @@ (GridLine . ( (print-function . ,Grid_line_interface::print) - (X-extent . (0 . 0)) + (X-extent-callback . ,Grid_line_interface::width_callback) (layer . 0) (meta . ((interfaces . (grid-line-interface))) ))) - (Hairpin . ( (print-function . ,Hairpin::print) Index: lilypond/scm/define-markup-commands.scm diff -u lilypond/scm/define-markup-commands.scm:1.89 lilypond/scm/define-markup-commands.scm:1.90 --- lilypond/scm/define-markup-commands.scm:1.89 Tue Apr 19 22:19:36 2005 +++ lilypond/scm/define-markup-commands.scm Thu Apr 21 15:59:44 2005 @@ -304,6 +304,8 @@ (prepend-alist-chain 'font-size mag props) arg)) + +;; FIXME -> should convert to font-size. (def-markup-command (magnify layout props sz arg) (number? markup?) "Set the font magnification for the its argument. In the following example, the middle A will be 10% larger: _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs