]> git.donarmstrong.com Git - lilypond.git/commitdiff
tablature: print a warning when negative fret numbers occur
authorMarc Hohl <marc@hohlart.de>
Wed, 22 Dec 2010 08:21:26 +0000 (09:21 +0100)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 25 Dec 2010 05:00:40 +0000 (22:00 -0700)
This handles issue 1035, but instead of aborting, it just raises a warning.
This seems more appropriate, because all other possible problems within
determine-frets-and-strings are handled by warnings, too.

scm/translation-functions.scm

index c6eefac9f5e0843380819351cbb54ec25440c4be..b559a771376a677900f96bf4f627f474c46adebb 100644 (file)
@@ -407,6 +407,9 @@ chords.  Returns a placement-list."
     (let ((this-fret (calc-fret (ly:event-property note 'pitch)
                                 string
                                 tuning)))
+       (if (< this-fret 0)
+           (ly:warning (_ "Negative fret for pitch ~a on string ~a")
+                                       (note-pitch note) string))
        (set! string-fret-fingering-tuples
              (cons (list string
                          this-fret