X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Ftablature.scm;h=3304e24af78a4f9a5b5f4168037a264240cdce4b;hb=f2e629583f8d29395eacb6a43cbe5798dd3616f3;hp=f4c67bebdc3f1baf5ecb0d40ee77b507760b0270;hpb=1c846b2c2348b4e0ca4a3c2e8fb267047ba2d203;p=lilypond.git diff --git a/scm/tablature.scm b/scm/tablature.scm index f4c67bebdc..3304e24af7 100644 --- a/scm/tablature.scm +++ b/scm/tablature.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2009--2011 Marc Hohl +;;;; Copyright (C) 2009--2012 Marc Hohl ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -78,6 +78,16 @@ ;; if stems are drawn, it is nice to have a double stem for ;; (dotted) half notes to distinguish them from quarter notes: +(define-public (tabvoice::make-double-stem-width-for-half-notes grob) + (let ((X-extent (ly:stem::width grob))) + + ;; is the note a (dotted) half note? + (if (= 1 (ly:grob-property grob 'duration-log)) + ;; yes -> return double stem width + (cons (car X-extent) (+ 0.5 (* 2 (cdr X-extent)))) + ;; no -> return simple stem width + X-extent))) + (define-public (tabvoice::draw-double-stem-for-half-notes grob) (let ((stem (ly:stem::print grob))) @@ -97,7 +107,7 @@ (left-pitch (ly:event-property (event-cause left-bound) 'pitch)) (right-pitch (ly:event-property (event-cause right-bound) 'pitch))) - (if (< (ly:pitch-semitones right-pitch) (ly:pitch-semitones left-pitch)) + (if (< (ly:pitch-tones right-pitch) (ly:pitch-tones left-pitch)) -0.75 0.75))) @@ -220,9 +230,10 @@ (define-public (tab-note-head::print grob) (define (is-harmonic? grob) (let ((arts (ly:event-property (event-cause grob) 'articulations))) - (not (null? (filter (lambda (a) - (ly:in-event-class? a 'harmonic-event)) - arts))))) + (or (pair? (filter (lambda (a) + (ly:in-event-class? a 'harmonic-event)) + arts)) + (eq? (ly:grob-property grob 'style) 'harmonic)))) (let* ((cautionary (ly:grob-property grob 'display-cautionary #f)) (details (ly:grob-property grob 'details '()))