test:
@echo -en 'For tracking crashes: use\n\n\t'
- @echo 'grep sourcefilename `grep -L systems.texi input/regression/out-test/*log|sed s/log/ly/g`'
+ @echo 'grep sourcefilename `grep -L systems.texi out/lybook-db/*/*log|sed s/log/ly/g`'
@echo
$(MAKE) -C input/regression/ out=test local-test
$(MAKE) -C input/regression/musicxml out=test local-test
--- /dev/null
+\header {
+
+ texidoc = "Dotted rests connected with beams do not trigger
+ premature beam calculations. In this case, the beam should be
+ sloped, and there should be no programming_error() warnings."
+
+}
+
+\version "2.11.54"
+\new Staff \relative c''
+{
+ <<
+ { \time 12/16 c16[ b a r b g] }
+ \\
+ { r8. r }
+ >>
+}
+
+
--- /dev/null
+\header {
+
+ texidoc = "With @code{full-length-to-extent}, the extent of the
+ attaching column for a full-length tuplet bracket can be ignored."
+
+}
+\version "2.11.55"
+
+\new Staff {
+ \set tupletFullLength = ##t
+
+ \time 1/8
+ \times 2/3 { c'16 c'16 c'16 }
+ \times 2/3 { c'16 c'16 c'16 }
+ \override TupletBracket #'full-length-to-extent = ##f
+ \times 2/3 { c'16 c'16 c'16 }
+ \override Score.RehearsalMark #'break-visibility = ##(#t #t #t)
+ \override Score.RehearsalMark #'direction = #down
+ \mark "xxxxxxxxxxxxxxxxxxxxxxx"
+}
using namespace std;
-#include "dots.hh"
-#include "dot-column.hh"
-#include "rhythmic-head.hh"
-#include "staff-symbol-referencer.hh"
-#include "directional-element-interface.hh"
-#include "side-position-interface.hh"
#include "axis-group-interface.hh"
-#include "stem.hh"
-#include "grob.hh"
-#include "pointer-group-interface.hh"
+#include "directional-element-interface.hh"
+#include "dot-column.hh"
#include "dot-configuration.hh"
+#include "dot-formatting-problem.hh"
+#include "dots.hh"
+#include "grob.hh"
#include "note-head.hh"
+#include "pointer-group-interface.hh"
#include "rest.hh"
-#include "dot-formatting-problem.hh"
+#include "rhythmic-head.hh"
+#include "side-position-interface.hh"
+#include "staff-symbol-referencer.hh"
+#include "stem.hh"
MAKE_SCHEME_CALLBACK (Dot_column, calc_positioning_done, 1);
SCM
*/
Staff_symbol_referencer::set_position (i->second.dot_, i->first);
}
-
me->translate_axis (cfg.x_offset () - me->relative_coordinate (commonx, X_AXIS),
X_AXIS);
}
void
-Dot_column::add_head (Grob *me, Grob *rh)
+Dot_column::add_head (Grob *me, Grob *head)
{
- Grob *d = unsmob_grob (rh->get_object ("dot"));
+ Grob *d = unsmob_grob (head->get_object ("dot"));
if (d)
{
- Side_position_interface::add_support (me, rh);
+ Side_position_interface::add_support (me, head);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("dots"), d);
d->set_property ("Y-offset", Grob::x_parent_positioning_proc);
- d->set_property ("X-offset", Grob::x_parent_positioning_proc);
+ // Dot formatting requests the Y-offset, -which- for rests may
+ // trigger post-linebreak callbacks.
+ if (!Rest::has_interface (head))
+ d->set_property ("X-offset", Grob::x_parent_positioning_proc);
Axis_group_interface::add_element (me, d);
}
}
Grob *note = gi.grob ();
if (unsmob_grob (note->get_object ("dot")))
return;
-
Duration *dur = unsmob_duration (cause->get_property ("duration"));
if (dur && dur->dot_count ())
return retval;
}
-
-
int
Staff_symbol_referencer::get_rounded_position (Grob *me)
{
/*
We're connecting to a column, for the last bit of a broken
fullLength bracket.
-
- TODO: make padding tunable?
*/
- Real padding = 1.0;
+ Real padding =
+ robust_scm2double(me->get_property("full-length-padding"), 1.0);
if (bounds[d]->break_status_dir ())
padding = 0.0;
-
- x_span[d]
- = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT]
- - padding;
+
+ Real coord = bounds[d]->relative_coordinate(commonx, X_AXIS);
+ if (to_boolean (me->get_property ("full-length-to-extent")))
+ coord = robust_relative_extent(bounds[d], commonx, X_AXIS)[LEFT];
+
+ coord = max (coord, x_span[LEFT]);
+
+ x_span[d] = coord - padding;
}
}
while (flip (&d) != LEFT);
"direction "
"edge-height "
"edge-text "
+ "full-length-padding "
+ "full-length-to-extent "
"gap "
"positions "
"note-columns "
@item
@code{xo-padding} -- Padding for open and mute indicators from top fret. Default
value 0.25.
-@end itemize")
+@end itemize") ;"
;; ugh: double, change.
+ (full-length-padding ,number? "How much padding to use at the right side of a full-length tuplet bracket.")
+ (full-length-to-extent ,boolean? "Run to the extent of the column for a full-length tuplet bracket.")
+
(full-size-change ,boolean? "Don't make a change clef smaller.")
(gap ,ly:dimension? "Size of a gap in a variable symbol.")
(edge-height . (0.7 . 0.7))
(shorten-pair . (-0.2 . -0.2))
(staff-padding . 0.25)
+ (full-length-to-extent . #t)
(direction . ,ly:tuplet-bracket::calc-direction)
(positions . ,ly:tuplet-bracket::calc-positions)
(connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
(define pure-print-callbacks
(list
+ fret-board::calc-stencil
print-circled-text-callback
lyric-text::print
ly:arpeggio::print
(define-public (dump-stencil-as-EPS-with-bbox paper dump-me filename
load-fonts
bbox)
- (define (to-bp-box mmbox)
+ "Create an EPS file from stencil DUMP-ME to FILENAME. BBOX has format
+ (left-x, lower-y, right x, up-y). If LOAD-FONTS set, include fonts inline."
+
+ (define (to-rounded-bp-box box)
+ "Convert box to 1/72 inch with rounding to enlarge the box."
(let* ((scale (ly:output-def-lookup paper 'output-scale))
- (box (map
- (lambda (x)
- (if (or (nan? x) (inf? x))
- 0
- (inexact->exact
- (round (/ (* x scale) (ly:bp 1)))))) mmbox)))
-
- (list (car box)
- (cadr box)
- (max (1+ (car box)) (caddr box))
- (max (1+ (cadr box)) (cadddr box))
+ (strip-non-number (lambda (x)
+ (if (or (nan? x) (inf? x)) 0.0 x)))
+ (directed-round (lambda (x rounder)
+ (inexact->exact
+ (rounder (/ (* (strip-non-number x) scale)
+ (ly:bp 1)))))))
+ (list (directed-round (car box) floor)
+ (directed-round (cadr box) floor)
+ (directed-round (max (1+ (car box)) (caddr box)) ceiling)
+ (directed-round (max (1+ (cadr box)) (cadddr box)) ceiling)
)))
(let* ((outputter (ly:make-paper-outputter
'ps))
(port (ly:outputter-port outputter))
- (rounded-bbox (to-bp-box bbox))
+ (rounded-bbox (to-rounded-bp-box bbox))
(port (ly:outputter-port outputter))
(header (eps-header paper rounded-bbox load-fonts)))
((xext (car ext-system-pair))
(paper-system (cdr ext-system-pair))
(yext (paper-system-extent paper-system Y))
- (bbox (list (car xext) (car yext)
+ (bbox (list (car xext) (car yext)
(cdr xext) (cdr yext)))
(filename (if (< 0 count)
(format "~a-~a" basename count)
(define (multi-fork count)
+ "Split this process in COUNT helpers. Returns either a list of pids,
+or the number of the process."
(define (helper count acc)
(if (> count 0)
(let*
(if (and (number? (ly:get-option 'job-count))
(>= (length files) (ly:get-option 'job-count)))
-
(let*
((count (ly:get-option 'job-count))
(split-todo (split-list files count))
(if (number? joblist)
(begin
- (ly:set-option 'log-file (format "~a-~a"
- (ly:get-option 'log-file) joblist))
+ (ly:set-option
+ 'log-file (format "~a-~a"
+ (ly:get-option 'log-file) joblist))
(set! files (vector-ref split-todo joblist)))
(begin
(let* ((stat (cdr (waitpid pid))))
(if (not (= stat 0))
- (set! errors (acons (list-element-index joblist pid) stat errors)))))
+ (set! errors
+ (acons (list-element-index joblist pid)
+ stat errors)))))
joblist)
(for-each
(lambda (x)
(let* ((job (car x))
(state (cdr x))
- (logfile (format "~a-~a.log"
+ (logfile (format "~a-~a.log"
(ly:get-option 'log-file) job))
(log (ly:gulp-file logfile))
(len (string-length log))
(tail (substring log (max 0 (- len 1024)))))
(if (status:term-sig state)
- (ly:message "\n\n~a\n"
- (format (_ "job ~a terminated with signal: ~a")
- job
- (status:term-sig state)))
- (ly:message (_ "logfile ~a (exit ~a):\n~a") logfile (status:exit-val state) tail))))
+ (ly:message
+ "\n\n~a\n"
+ (format (_ "job ~a terminated with signal: ~a")
+ job (status:term-sig state)))
+ (ly:message
+ (_ "logfile ~a (exit ~a):\n~a")
+ logfile (status:exit-val state) tail))))
errors)
(dump-profile "lily-run-total" '(0 0) (profile-measurements)))
(exit (if (null? errors) 0 1))))))
-
(if (string-or-symbol? (ly:get-option 'log-file))
(ly:stderr-redirect (format "~a.log" (ly:get-option 'log-file)) "w"))
-
(let ((failed (lilypond-all files)))
(if (ly:get-option 'trace-scheme-coverage)
(begin
(coverage:show-all (lambda (f) (string-contains f "lilypond"))
)))
-
(if (pair? failed)
(begin
(define-public (lilypond-all files)
(let* ((failed '())
(separate-logs (ly:get-option 'separate-log-files))
+ (ping-log
+ (if separate-logs
+ (open-file (if (string-or-symbol? (ly:get-option 'log-file))
+ (format "~a.log" (ly:get-option 'log-file))
+ "/dev/tty") "a") #f))
(do-measurements (ly:get-option 'dump-profile))
(handler (lambda (key failed-file)
(set! failed (append (list failed-file) failed)))))
(if separate-logs
(ly:stderr-redirect (format "~a.log" base) "w"))
+ (if ping-log
+ (format ping-log "Procesing ~a\n" base))
+
(if (ly:get-option 'trace-memory-frequency)
(mtrace:start-trace (ly:get-option 'trace-memory-frequency)))
files)
;; we want the failed-files notice in the aggregrate logfile.
- (if (ly:get-option 'separate-logs)
- (ly:stderr-redirect
- (if (string-or-symbol? (ly:get-option 'log-file))
- (format "~a.log" (ly:get-option 'log-file))
- "/dev/tty") "a"))
-
+ (if ping-log
+ (format ping-log "Failed files: ~a\n" failed))
+
(if (ly:get-option 'dump-profile)
(dump-profile "lily-run-total" '(0 0) (profile-measurements)))
"
(let* ((xext (ly:grob-extent grob grob 0))
(yext (ly:grob-extent grob grob 1))
- (thick 0.1))
-
+ (thick 0.01))
+
(ly:stencil-add
(make-filled-box-stencil xext (cons (- (car yext) thick) (car yext)))
(make-filled-box-stencil xext (cons (cdr yext) (+ (cdr yext) thick)))