\version "2.13.61" % % this is (mostly) copied from scm/tablature.scm -> tab-note-head::print #(define-public (tab-note-head::my-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))))) (let* ((cautionary (ly:grob-property grob 'display-cautionary #f)) (details (ly:grob-property grob 'details '())) (harmonic-props (assoc-get 'harmonic-properties details '())) (harmonic-angularity (assoc-get 'angularity harmonic-props 2)) (harmonic-half-thick (assoc-get 'half-thickness harmonic-props 0.075)) (harmonic-padding (assoc-get 'padding harmonic-props 0)) (harmonic-proc (assoc-get 'procedure harmonic-props parenthesize-stencil)) (harmonic-width (assoc-get 'width harmonic-props 0.25)) (cautionary-props (assoc-get 'cautionary-properties details '())) (cautionary-angularity (assoc-get 'angularity cautionary-props 2)) (cautionary-half-thick (assoc-get 'half-thickness cautionary-props 0.075)) (cautionary-padding (assoc-get 'padding cautionary-props 0)) (cautionary-proc (assoc-get 'procedure cautionary-props parenthesize-stencil)) (cautionary-width (assoc-get 'width cautionary-props 0.25)) (output-grob (ly:text-interface::print grob)) (duration-log (ly:grob-property grob 'duration-log)) (ref-grob (grob-interpret-markup grob "8")) (offset-factor (assoc-get 'head-offset details 3/5)) (column-offset (* offset-factor (interval-length (ly:stencil-extent (grob-interpret-markup grob "8") X))))) (if (is-harmonic? grob) (set! output-grob (harmonic-proc output-grob harmonic-half-thick harmonic-width harmonic-angularity harmonic-padding))) (if cautionary (set! output-grob (cautionary-proc output-grob cautionary-half-thick cautionary-width cautionary-angularity cautionary-padding))) ;; the next two lines draw circles around half and whole notes ;; the numbers 0.1 and 0.2 are hardcoded (ugh!) and resemble ;; the line-thickness and the padding (if (> 2 duration-log) (set! output-grob (circle-stencil output-grob 0.1 0.2))) (ly:stencil-translate-axis (centered-stencil output-grob) column-offset X))) music = { c4 d e2 | f1 } \score { \new TabStaff { \new TabVoice { \tabFullNotation % use the new function instead of the standard callback \override TabNoteHead #'stencil = #tab-note-head::my-print % don't draw double stems for half notes \revert TabVoice.Stem #'stencil \music } } }