From 2eb9e6926d25c9ec7b85cee83bbebf3231a55ebf Mon Sep 17 00:00:00 2001 From: Marc Hohl Date: Wed, 22 Dec 2010 09:21:26 +0100 Subject: [PATCH] tablature: print a warning when negative fret numbers occur 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index c6eefac9f5..b559a77137 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -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 -- 2.39.5