]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2601: \repeat tremolo 9 {…} should issue an error
authorDavid Kastrup <dak@gnu.org>
Sat, 16 Jun 2012 15:45:03 +0000 (17:45 +0200)
committerDavid Kastrup <dak@gnu.org>
Wed, 20 Jun 2012 05:42:39 +0000 (07:42 +0200)
scm/music-functions.scm

index 559eae3c3ff300e04e2a0eed635ea678e32d37ff..edf7659748c15c72f9abdeb4b8ad2333d0c5bc55 100644 (file)
@@ -299,8 +299,10 @@ through MUSIC."
                                 1))
               (tremolo-type (ash 1 duration-log)))
          (set! (ly:music-property r 'tremolo-type) tremolo-type)
-         (if (not (integer?  mult))
-              (ly:warning (_ "invalid tremolo repeat count: ~a") times))
+         (if (not (and (integer? mult) (= (logcount mult) 1)))
+             (ly:music-warning
+              main
+              (ly:format (_ "invalid tremolo repeat count: ~a") times)))
          ;; Adjust the time of the notes
          (ly:music-compress r (ly:make-moment 1 children))
          ;; Adjust the displayed note durations