X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Ftablature.scm;h=2adaaa6ed6cc8c55e5f470e401087ebd8aecaba9;hb=38e1cad48d14f0b0f9286b4bb8891051a5f82d1e;hp=8d80356d9a38ff918d0e5eaa6161bf35a4dc872b;hpb=17f11c2f5ab963bfb07b7652b4860dc4dda5540a;p=lilypond.git diff --git a/scm/tablature.scm b/scm/tablature.scm index 8d80356d9a..2adaaa6ed6 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--2010 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))) @@ -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 '()))