]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #1660: Make \harmonicsOn work in tablature.
authorNeil Puttock <n.puttock@gmail.com>
Wed, 1 Jun 2011 21:27:17 +0000 (22:27 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Wed, 1 Jun 2011 21:27:17 +0000 (22:27 +0100)
* 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
scm/tablature.scm

index 2e293352db97fa919700a03805a25d576b6fd440..4af2a8d689356d0d1050600aa8ba785f70c4bedc 100644 (file)
@@ -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?)
index f4c67bebdc3f1baf5ecb0d40ee77b507760b0270..c26af257c8df13b1c14161a7314a6c201ffd99a7 100644 (file)
 (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 '()))