From 7e270057f2a1121353343eb3559d180a23a89390 Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Wed, 1 Jun 2011 22:27:17 +0100 Subject: [PATCH] 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 --- ly/property-init.ly | 2 +- scm/tablature.scm | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ly/property-init.ly b/ly/property-init.ly index e137fd474b..0175bb798f 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 '())) -- 2.39.2