;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; (c) 1998--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 1998--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
tuning)
(define (calc-fret pitch string tuning)
- (- (ly:pitch-semitones pitch) (list-ref tuning (1- string))))
+ (- (ly:pitch-semitones pitch) (ly:pitch-semitones (list-ref tuning (1- string)))))
(define (note-pitch a)
(ly:event-property a 'pitch))
(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