]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Jan 2007 18:15:10 +0000 (19:15 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Jan 2007 18:15:10 +0000 (19:15 +0100)
26 files changed:
VERSION
input/regression/accidental-clef-change.ly
input/regression/beam-flat-retain-direction.ly [new file with mode: 0644]
input/regression/bend-dot.ly
input/regression/break.ly
input/regression/completion-heads-polyphony.ly
input/regression/dynamics-broken-hairpin.ly
input/regression/glissando.ly
input/regression/instrument-name-dynamic.ly
input/regression/lyric-extender-broken.ly
input/regression/lyric-hyphen-break.ly
input/regression/non-empty-text.ly
input/regression/note-line.ly
input/regression/slur-nice.ly
input/regression/tie-broken-minimum-length.ly
lily/beam-quanting.cc
lily/book-scheme.cc
lily/cluster.cc
lily/include/beam.hh
lily/score-scheme.cc
ly/init.ly
ly/lilypond-book-preamble.ly
scm/define-grobs.scm
scm/layout-beam.scm
scm/lily-library.scm
scm/lily.scm

diff --git a/VERSION b/VERSION
index 1a4814ec831a666491908bd9d33d400f8bad5995..20cbf3758af15b9e98ed84902138ac0836cb8b3b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=11
-PATCH_LEVEL=7
+PATCH_LEVEL=8
 MY_PATCH_LEVEL=
 
index 59a6b64b5882b393b051d667150a9f54894b35e6..fabf9546bba507053f7c0909aab94e761027f8cf 100644 (file)
@@ -2,6 +2,11 @@
   texidoc = "Accidentals are reset for clef changes."
 }
 
+\layout {
+  ragged-right = ##t
+}
+
+
 \version "2.10.0"
 \new Staff \relative c' {
     \clef treble
@@ -10,4 +15,3 @@
     <cis dis fis gis>
 }
 
-\layout {ragged-right = ##t} 
diff --git a/input/regression/beam-flat-retain-direction.ly b/input/regression/beam-flat-retain-direction.ly
new file mode 100644 (file)
index 0000000..ba03734
--- /dev/null
@@ -0,0 +1,16 @@
+\header
+{
+  texidoc = "Even very flat but slanted patterns should give slanted beams. "
+}
+
+\version "2.10.7"
+\layout{
+  line-width = 15\cm
+  debug-beam-scoring = ##t
+}
+
+\relative c'''{
+  \time 2/4
+  \assertBeamQuant #'(0  . 1) #'(0 . 0) 
+  fis16[ dis b ais] cis4
+}
index 4b55de5cd431cc42e23e62c28a8bcd6e209004bd..67a354e2f905a34e25b407fd7ea55bd8045ca7ff 100644 (file)
@@ -3,6 +3,10 @@
   texidoc  = "Bends avoid dots, but only if necessary."
 }
 
+\paper {
+  ragged-right = ##t
+}
+
 \score {
   <<
     \new Staff \relative c' {
@@ -13,7 +17,3 @@
     }
   >>
 }
-
-\paper {
-  ragged-right = ##t
-}
index 1611f965322d77d441b2e2737d3ed361e7129936..b3a88c798ee9f08150a94adc0da12b1f97945c3e 100644 (file)
@@ -7,13 +7,13 @@ Breaks can be encouraged and discouraged using @code{\\break} and
 @code{\\noBreak}."
 }
 
+\layout {
+  indent = 0.0
+  line-width = 4.0\cm
+}
 
 \relative c'' \context Voice {
   \emptyText
   c1 \noBreak c1 \noBreak \mark "nobreak" c1 \noBreak
   c1 \break \mark "break" c1 \break \mark "break" c1 
 }
-\layout {
-  indent = 0.0
-  line-width = 4.0\cm
-}
index 63c555519afe7b6043c7daff8749d9c6002dae6f..c2802689b378e6180c26db688ed0158274bef452 100644 (file)
@@ -8,11 +8,6 @@ Completion heads are not fooled by polyphony with a different rhythm.
 
 }
 
-\context Staff  \relative c'' << 
-  { c2. c bes2 } \\
-  { c2. a8 g4 f4. g4 f  }
->>
-
 \layout {
   \context{
     \Voice
@@ -20,3 +15,8 @@ Completion heads are not fooled by polyphony with a different rhythm.
     \consists "Completion_heads_engraver"
   }
 }
+
+\context Staff \relative c'' << 
+  { c2. c bes2 } \\
+  { c2. a8 g4 f4. g4 f  }
+>>
index fac525db2421b37ab06d5eff3d615e881f108b2f..439e6bd01b1b6fd561e60b7d530b6c7edef70315 100644 (file)
@@ -4,11 +4,12 @@
 texidoc = "Broken crescendi should be open on one side."
 }
 
-\relative c'' { 
-  c1 \< \break c1\!  \> \break c1\!
-}
 \layout {
   line-width = 4.\cm
 }
 
 
+\relative c'' { 
+  c1 \< \break c1\!  \> \break c1\!
+}
+
index 407ad0b9cb7fada29ae2f5341c608ecb3379f5f9..2cea6f962158046d129c1689a86e8697541dbca6 100644 (file)
@@ -12,6 +12,11 @@ The engraver does no time-keeping, so it involves some trickery to get
 }
 
 
+\layout{
+  line-width = 50.\mm
+  indent = 0
+}
+
 \new Staff \relative c''{
                                % gliss non gliss and 
   c4 \glissando d e \glissando f \glissando \break
@@ -23,9 +28,4 @@ The engraver does no time-keeping, so it involves some trickery to get
   c4 \glissando c,, \glissando c' \glissando d
 }
 
-\layout{
-  line-width = 50.\mm
-  indent = 0
-}
-
 
index abc315f7f3dec38a78270e0659cb916b316307ab..a418315deedf191750c843152a0be23d35e7d4e9 100644 (file)
@@ -6,15 +6,15 @@
   pedal line spanners."
 }
 
+\paper {
+  line-width = 3\cm
+  indent = 0\cm
+}
+
 \relative {
   \set Staff.shortInstrumentName = "foo"
   f1 | f1 | f1 |
   f1\< | f1 | f1\! |
 }
 
-\paper {
-  line-width = 3\cm
-  indent = 0\cm
-}
-
 % EOF
index c7db43946779e3a74fd105c9eba17e7e635ca67a..36aae288b5a9061de72c8fc158d917986a319c20 100644 (file)
@@ -8,6 +8,9 @@ of the melisma."
 
 }
 
+\layout {
+  ragged-right = ##t
+}
 
 << 
   \new Voice =A  {
@@ -17,7 +20,4 @@ of the melisma."
   }
   \lyricsto A \context Lyrics \lyricmode { a __ a __ ha }
 >>
-  \layout {
-    ragged-right = ##t
-  }
 
index c78cd759c4087574218c4061ced48201e786c7f7..c48f7c8737a39817aa6461edb4c35b716b769432 100644 (file)
@@ -8,6 +8,17 @@ they go past the first note. "
 }
 
 
+\layout   {
+  indent = 0.0 \cm
+  line-width = 3.4 \cm
+
+  \context {
+    \Staff \remove "Time_signature_engraver"
+  }
+}
+
+
+
 <<
   \new Staff \relative c'' {
     \time 1/4 c16[ c c  c]
@@ -23,15 +34,5 @@ they go past the first note. "
     bla16 -- bla -- bla 
   }
 >>
-  \layout   {
-    indent = 0.0 \cm
-    line-width = 3.4 \cm
-
-    \context {
-      \Staff \remove "Time_signature_engraver"
-    }
-  }
-  
-
 
   
index efd1fa5d89f7e97da1d2f808a12fb6c7a8916ee2..82256aac1899a49edac0097d279fddfc856e4418 100644 (file)
@@ -6,6 +6,9 @@
 The boolean property @code{no-spacing-rods} in @code{TextScript} is used
 to control the horizontal size of text.  " }
 
+\layout {
+  line-width = 3.0\cm
+}
 
 \relative c''{
   %% \emptyText
@@ -15,8 +18,5 @@ to control the horizontal size of text.  " }
   \fatText
   c_"very wide and long text" c
 }
-\layout {
-  line-width = 3.0\cm
-}
 
 
index f6e1a555075d2d407c5e8064a7ce28feb0800f1d..c5ea8280016ed3b50ffa68387f241c32d1bd1f02 100644 (file)
@@ -9,6 +9,11 @@ su = { \change Staff = up}
 sd = { \change Staff = down}
 
 
+\layout {
+  line-width = 8.0 \cm
+}
+
+
 \context PianoStaff
 <<
   \new Staff = "up"   {
@@ -21,9 +26,4 @@ sd = { \change Staff = down}
     \clef F s1*4
   }
 >>
-  \layout {
-    line-width = 8.0 \cm
-  }
-
-
 
index bb35666906ac036510f3dd6c875311cb20d6abed..8399155a527327cdb6ad8422d36d408952ea6023 100644 (file)
@@ -8,6 +8,9 @@ run through noteheads or stems.
 "
 }
 
+\layout{
+  line-width = 120.\mm
+}
 
 \relative c''{
   \time 3/4
@@ -19,8 +22,3 @@ run through noteheads or stems.
   \stemNeutral c ( \stemUp c \stemNeutral  c) c ( a  c) c( d,  c') c( f,  c')
   \stemDown c( f,  c')
 }
-\layout{
-  line-width = 120.\mm
-}
-
-
index 51f9708a3cf99aaf6929e73db149ca52385ebd65..2d3739e5ec7223ad4db120b1d33b9fe41c10683d 100644 (file)
@@ -8,13 +8,13 @@ has a @code{minimum-length} of 5."
 
 }
 
+\paper {
+  indent = 0.0\mm
+  line-width = 40.0\mm
+}
+
 \relative {
   \override Tie #'minimum-length = #5
   f2. f16  f  f  f ~ | \break
   f1
 }
-
-\paper {
-  indent = 0.0\mm
-  line-width = 40.0\mm
-}
index e150a51594d3b0a4c8119f780769abac28e76254..fc60f8def08ed25b1529ebcd8ff5bca05fca0167 100644 (file)
@@ -37,15 +37,17 @@ Beam_quant_parameters::fill (Grob *him)
 {
   SCM details = him->get_property ("details");
 
+  /*
+    TODO: put in define-grobs.scm
+   */
   INTER_QUANT_PENALTY = get_detail (details, ly_symbol2scm ("inter-quant-penalty"), 1000.0);
   SECONDARY_BEAM_DEMERIT = get_detail (details, ly_symbol2scm ("secondary-beam-demerit"), 10.0);
   STEM_LENGTH_DEMERIT_FACTOR = get_detail (details, ly_symbol2scm ("stem-length-demerit-factor"), 5);
   REGION_SIZE = get_detail (details, ly_symbol2scm ("region-size"), 2);
   BEAM_EPS = get_detail (details, ly_symbol2scm ("beam-eps"), 1e-3);
-
-  // possibly ridiculous, but too short stems just won't do
   STEM_LENGTH_LIMIT_PENALTY = get_detail (details, ly_symbol2scm ("stem-length-limit-penalty"), 5000);
   DAMPING_DIRECTION_PENALTY = get_detail (details, ly_symbol2scm ("damping-direction-penalty"), 800);
+  HINT_DIRECTION_PENALTY = get_detail (details, ly_symbol2scm ("hint-direction-penalty"), 20);
   MUSICAL_DIRECTION_FACTOR = get_detail (details, ly_symbol2scm ("musical-direction-factor"), 400);
   IDEAL_SLOPE_FACTOR = get_detail (details, ly_symbol2scm ("ideal-slope-factor"), 10);
   ROUND_TO_ZERO_SLOPE = get_detail (details, ly_symbol2scm ("round-to-zero-slope"), 0.02);
@@ -401,10 +403,19 @@ Beam::score_slopes_dy (Real yl, Real yr,
     TODO: find a way to incorporate the complexity of the beam in this
     penalty.
   */
-  if (fabs (dy / dx) > parameters->ROUND_TO_ZERO_SLOPE
-      && sign (dy_damp) != sign (dy))
-    dem += parameters->DAMPING_DIRECTION_PENALTY;
-
+  if (sign (dy_damp) != sign (dy))
+    {
+      if (!dy)
+       {
+         if (fabs (dy_damp / dx) > parameters->ROUND_TO_ZERO_SLOPE)
+           dem += parameters->DAMPING_DIRECTION_PENALTY;
+         else
+           dem += parameters->HINT_DIRECTION_PENALTY;
+       }
+      else
+       dem += parameters->DAMPING_DIRECTION_PENALTY;
+    }
+  
   dem += parameters->MUSICAL_DIRECTION_FACTOR
     * max (0.0, (fabs (dy) - fabs (dy_mus)));
 
index 750917187f65a86612d86fe0d21b2959010be73e..23d728edf202b2e50f21a143ff999bd3c7a933a0 100644 (file)
@@ -64,3 +64,33 @@ LY_DEFINE (ly_parser_print_book, "ly:book-process",
   return SCM_UNSPECIFIED;
 }
 
+
+LY_DEFINE (ly_parser_print_book_to_systems, "ly:book-process-to-systems",
+          4, 0, 0, (SCM book_smob,
+                    SCM default_paper,
+                    SCM default_layout,
+                    SCM output),
+          "Print book. @var{output} is passed to the backend unchanged. "
+          "Eg. it may be "
+          "a string (for file based outputs) or a socket (for network based "
+          "output).")
+{
+  Book *book = unsmob_book (book_smob);
+
+  SCM_ASSERT_TYPE (book, book_smob, SCM_ARG1, __FUNCTION__, "Book");
+  SCM_ASSERT_TYPE (unsmob_output_def (default_paper),
+                  default_layout, SCM_ARG2, __FUNCTION__, "\\paper block");
+  SCM_ASSERT_TYPE (unsmob_output_def (default_layout),
+                  default_layout, SCM_ARG3, __FUNCTION__, "\\layout block");
+
+  Paper_book *pb = book->process (unsmob_output_def (default_paper),
+                                 unsmob_output_def (default_layout));
+  if (pb)
+    {
+      pb->classic_output (output);
+      pb->unprotect ();
+    }
+
+  return SCM_UNSPECIFIED;
+}
+
index 8fe55dc69a942941c531836f89881cc0a5fe8e14..2c41b9a1749e05e3ae7b0257f7e83954bd4845ca 100644 (file)
@@ -193,9 +193,12 @@ ADD_INTERFACE (Cluster,
               "The property @code{style} controls the shape of cluster segments.  Valid values "
               "include @code{leftsided-stairs}, @code{rightsided-stairs}, @code{centered-stairs}, "
               "and @code{ramp}.\n",
+
+              /* props */
               "style "
               "padding "
-              "columns ");
+              "columns "
+              );
 
 struct Cluster_beacon
 {
index 67daab8de8d26ea905b48eae3945b9a017797233..3eb8027f49c59769de3c18c827c0d565e0955206 100644 (file)
@@ -34,6 +34,7 @@ struct Beam_quant_parameters
   Real STEM_LENGTH_LIMIT_PENALTY;
   Real DAMPING_DIRECTION_PENALTY;
   Real MUSICAL_DIRECTION_FACTOR;
+  Real HINT_DIRECTION_PENALTY;
   Real IDEAL_SLOPE_FACTOR;
   Real ROUND_TO_ZERO_SLOPE;
 
index b48219ad44895e36a0f1ec77a705ba0563186014..3b256b01f4dd92cf8038f5789974b2a6f1ad028b 100644 (file)
@@ -114,67 +114,3 @@ LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
   scm_remember_upto_here_1 (prot);
   return output;
 }
-
-LY_DEFINE (ly_score_process, "ly:render-music-as-systems",
-          5, 0, 0, (SCM music,
-                    SCM outdef,
-                    SCM book_outputdef,
-                    SCM header,
-                    SCM outname),
-          "Create output using a default \\book block. ")
-{
-  SCM_ASSERT_TYPE(unsmob_music(music), music,
-                 SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE(unsmob_output_def (outdef), outdef,
-                 SCM_ARG2, __FUNCTION__, "output def");
-  SCM_ASSERT_TYPE(unsmob_output_def (book_outputdef), book_outputdef,
-                 SCM_ARG3, __FUNCTION__, "output def");
-  SCM_ASSERT_TYPE(scm_is_string (outname), outname,
-                 SCM_ARG5, __FUNCTION__, "string");
-  
-  
-  SCM scaled_def = outdef;
-  SCM scaled_bookdef = book_outputdef;
-
-  Output_def *bpd = unsmob_output_def (book_outputdef);
-
-  /* ugh .  */
-  assert (bpd->c_variable ("is-paper") == SCM_BOOL_T);
-
-  Real scale = scm_to_double (bpd->c_variable ("output-scale"));
-
-  Output_def *def = scale_output_def (unsmob_output_def (outdef), scale);
-  Output_def *bdef = scale_output_def (bpd, scale);
-  def->parent_ = bdef;
-
-  scaled_def = def->self_scm ();
-  scaled_bookdef = bdef->self_scm ();
-
-  def->unprotect ();
-  bdef->unprotect ();
-
-  SCM context = ly_run_translator (music, scaled_def, SCM_BOOL_F);
-  SCM output_as_scm = ly_format_output (context);
-  Music_output *output = unsmob_music_output (output_as_scm);
-
-  Paper_score *pscore = dynamic_cast<Paper_score *> (output);
-  assert (pscore);
-
-  /* ugh, this is strange, Paper_book without a Book object. */
-  Paper_book *paper_book = new Paper_book ();
-  paper_book->header_ = header;
-  paper_book->paper_ = unsmob_output_def (scaled_bookdef);
-
-  if (ly_is_module (header))
-    paper_book->add_score (header);
-
-  paper_book->add_score (pscore->self_scm ());
-  paper_book->classic_output (outname);
-  paper_book->unprotect ();
-
-  scm_remember_upto_here_1 (scaled_def);
-  scm_remember_upto_here_1 (scaled_bookdef);
-
-  return SCM_UNSPECIFIED;
-}
-
index eab90ef3d5905527c56ee3c36edabbc4cba0f243..062ca06cbdfdfb4c5780fbc7e6732d27e5038035 100644 (file)
@@ -39,6 +39,8 @@
   (version-not-seen-message input-file-name))
 
 #(if (pair? toplevel-scores)
-  (toplevel-book-handler
+  ((if (defined? 'default-toplevel-book-handler)
+    default-toplevel-book-handler
+    toplevel-book-handler)
    parser
    (apply ly:make-book $defaultpaper $defaultheader toplevel-scores)))
index aa82b7330c55c4e33e435f684f3e693f1f3f9e1a..91fde7c84b874f2796bf80742981864335deae0a 100644 (file)
@@ -1,12 +1,10 @@
 
 \version "2.10.0"
 
-#(set! toplevel-score-handler print-score-with-defaults)
-#(set! toplevel-music-handler
-  (lambda (p m)
-   (if (not (eq? (ly:music-property m 'void) #t))
-        (print-score-with-defaults
-         p (scorify-music m p)))))
+%% toplevel \book gets output per page,
+%% everything else gets output per system/title
+#(define default-toplevel-book-handler
+  print-book-with-defaults-as-systems )
 
 #(ly:set-option (quote no-point-and-click))
 #(define inside-lilypond-book #t)
index c4246b6589e5097c0626314e37b5f0338edc63ef..91803b3afac0e24ae3d95b30692490bfc5bb05c3 100644 (file)
        (beaming . ,ly:beam::calc-beaming)
        (stencil . ,ly:beam::print)
        (clip-edges . #t)
-       
+
+       (details .  ((hint-direction-penalty . 20)))
        ;; TODO: should be in SLT.
        (thickness . 0.48) ; in staff-space
        (neutral-direction . ,DOWN)
index d946890049fbb6653e4088f4dd7cdb736391a884..1ee840aa0bad03eaa939cdad2a074fabb67c475b 100644 (file)
@@ -59,7 +59,7 @@
        ly:beam::quanting
        (check-beam-quant l r)
        ))
-                       
+
 
 (define-public (check-slope-callbacks comparison)
   (list ly:beam::calc-least-squares-positions
index 1e8fe97e477809c669338cb9072e8594a31adb16..52331aa04c64357eef187113dfddb791af056ec1 100644 (file)
@@ -89,7 +89,6 @@
    (cons score (ly:parser-lookup parser 'toplevel-scores))))
 
 (define-public (scorify-music music parser)
-  
   (for-each (lambda (func)
              (set! music (func music parser)))
            toplevel-music-functions)
         (collect-scores-for-book parser (scorify-music music parser)))))
 
 
-(define-public (print-book-with-defaults parser book)
+(define (print-book-with parser book process-procedure)
   (let*
       ((paper (ly:parser-lookup parser '$defaultpaper))
        (layout (ly:parser-lookup parser '$defaultlayout))
        (set! base (format #f "~a-~a" base count)))
 
     (ly:parser-define! parser 'output-count (1+ count))
-    (ly:book-process book paper layout base)
+    (process-procedure book paper layout base)
     ))
 
-(define-public (print-score-with-defaults parser score)
-  (let*
-      ((paper (ly:parser-lookup parser '$defaultpaper))
-       (count (ly:parser-lookup parser 'output-count))
-       (base (ly:parser-output-name parser)))
-
-    (if (not (integer? count))
-       (set! count 0))
-
-    (if (> count 0)
-       (set! base (format #f "~a-~a" base count)))
-
-    (ly:parser-define! parser 'output-count (1+ count))
-
-    (if (not (ly:score-error? score))
-       (let*
-           ((header (ly:score-header score))
-            (output-defs (ly:score-output-defs score))
-            (layout-defs (filter  (lambda (d) (eq? #t (ly:output-def-lookup d 'is-layout)))
-                                 output-defs))
-            (midi-defs (filter (lambda (d)  (eq? #t (ly:output-def-lookup d 'is-midi)))
-                               output-defs))
-            (music (ly:score-music score))
-            (layout-def (if (null? layout-defs)
-                            (ly:parser-lookup parser '$defaultlayout)
-                            (car layout-defs))))
-
-         (if (not (module? header))
-             (set! header (ly:parser-lookup parser '$defaultheader)))
-            
-         (ly:render-music-as-systems
-          music layout-def paper header base)
-
-         (if (pair? midi-defs)
-             (ly:performance-write (ly:format-output (ly:run-translator music (car midi-defs)))
-                                   (format #f "~a.midi" base)
-                                   ))
-             
-    ))))
-
-
-
+(define-public (print-book-with-defaults parser book)
+  (print-book-with parser book ly:book-process))
 
+(define-public (print-book-with-defaults-as-systems parser book)
+  (print-book-with parser book ly:book-process-to-systems))
 
 ;;;;;;;;;;;;;;;;
 ;; alist
index 401017181cb39d460a5453caa72ae343cfb3788e..798df7ece4bb69200f701d6875e244428c7a49da 100644 (file)
@@ -365,11 +365,12 @@ The syntax is the same as `define*-public'."
 (define (profile-measurements)
   (let* ((t (times))
         (stats (gc-stats)))
-
+    
     (list
      (- (tms:utime t)
        (ly:assoc-get 'gc-time-taken stats))
 
+     (ly:assoc-get 'total-cells-allocated  stats 0)
      ;; difficult to put memory amount stats into here.
      
      )))
@@ -381,8 +382,10 @@ The syntax is the same as `define*-public'."
     
     (ly:progress "\nWriting timing to ~a..." outname)
     (format (open-file outname "w")
-           "time: ~a"
-           (car diff))))
+           "time: ~a\ncells: ~a\n"
+           (car diff)
+           (cadr diff)
+           )))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -576,7 +579,7 @@ The syntax is the same as `define*-public'."
        ))
   
   (let* ((failed '())
-        (start-measurements #f)
+        (start-measurements (ly:get-option 'dump-profile))
         (handler (lambda (key failed-file)
                    (set! failed (append (list failed-file) failed)))))
 
@@ -584,9 +587,10 @@ The syntax is the same as `define*-public'."
      (lambda (x)
 
        (gc)
-       (set! start-measurements (profile-measurements))
+       (if start-measurements
+          (set! start-measurements (profile-measurements)))
        (lilypond-file handler x)
-       (if (ly:get-option 'dump-profile)
+       (if start-measurements
           (dump-profile x start-measurements (profile-measurements)))