]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't discard compression factor for duration identifiers.
authorNeil Puttock <n.puttock@gmail.com>
Mon, 5 Apr 2010 21:40:53 +0000 (22:40 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Mon, 5 Apr 2010 21:55:02 +0000 (22:55 +0100)
* lily/parser.yy:

  retrieve duration factor from duration identifier and apply it to
  copied duration

* input/regression (new file):

  add regtest

input/regression/duration-identifier-compressed.ly [new file with mode: 0644]
lily/parser.yy

diff --git a/input/regression/duration-identifier-compressed.ly b/input/regression/duration-identifier-compressed.ly
new file mode 100644 (file)
index 0000000..2f8cc5a
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.13.18"
+
+\header {
+  texidoc = "The compression factor of a duration identifier is
+correctly accounted for by the parser."
+}
+
+% looks like a whole note, has duration of half note
+wholeHalved = #(ly:make-duration 0 0 1 2)
+
+
+\displayMusic \relative c' {
+  c\wholeHalved c |
+  c\wholeHalved. c4 |
+}
index 1ec5e11aa2b7e787168e114e76c3d5cc880d52e9..41e5080f9854651069dcf7c9ef0c798d0b318716 100644 (file)
@@ -1990,6 +1990,7 @@ steno_duration:
        | DURATION_IDENTIFIER dots      {
                Duration *d = unsmob_duration ($1);
                Duration k (d->duration_log (), d->dot_count () + $2);
+               k = k.compressed (d->factor ());
                *d = k;
                $$ = $1;
        }