From: Neil Puttock Date: Wed, 1 Jun 2011 21:27:17 +0000 (+0100) Subject: Fix #1660: Make \harmonicsOn work in tablature. X-Git-Tag: release/2.15.0-1~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6e4f5e1c2a1d453be29036b1d7b888b69e956c4f;p=lilypond.git Fix #1660: Make \harmonicsOn work in tablature. * ly/property-init.ly (harmonicsOn): add TabNoteHead to override-head-style call * scm/tablature.scm (is-harmonic?): check grob property 'style for 'harmonic setting --- diff --git a/ly/property-init.ly b/ly/property-init.ly index 2e293352db..4af2a8d689 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -217,7 +217,7 @@ glissando = #(make-music 'GlissandoEvent) harmonicsOn = #(define-music-function (parser location) () (_i "Set the default note head style to a diamond-shaped style.") - (override-head-style 'NoteHead 'harmonic)) + (override-head-style '(NoteHead TabNoteHead) 'harmonic)) harmonicsOff = \defaultNoteHeads harmonicNote = #(define-music-function (parser location note) (ly:music?) diff --git a/scm/tablature.scm b/scm/tablature.scm index f4c67bebdc..c26af257c8 100644 --- a/scm/tablature.scm +++ b/scm/tablature.scm @@ -220,9 +220,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 '()))