From 4a1a80c4be5426e5b4c34beee19656f85aa52ba9 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 files changed, 3 insertions(+), 0 deletions(-) diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index c6eefac..b559a77 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 -- 1.7.0.4