- (if tab-note-head-visible
- ;; tab note head is visible
- ( if tab-note-head-parenthesized
- (ly:grob-set-property! tied-tab-note-head 'stencil
- (lambda (grob)
- (parenthesize-tab-note-head grob))))
- ;; tab note head is invisible
- (ly:grob-set-property! tied-tab-note-head 'transparent #t))))
\ No newline at end of file
+ (if tab-note-head-visible
+ ;; tab note head is visible
+ (if tab-note-head-parenthesized
+ (ly:grob-set-property! tied-tab-note-head 'stencil
+ (lambda (grob)
+ (parenthesize-tab-note-head grob))))
+ ;; tab note head is invisible
+ (begin
+ (ly:grob-set-property! tied-tab-note-head 'transparent #t)
+ (ly:grob-set-property! tied-tab-note-head 'whiteout #f)))))
+
+;; the slurs should not be too far apart from the corresponding fret number, so
+;; we move the slur towards the TabNoteHeads:
+(define-public (slur::draw-tab-slur grob)
+ ;; TODO: use a less "brute-force" method to decrease
+ ;; the distance between the slur ends and the fret numbers
+ (let* ((staff-space (ly:staff-symbol-staff-space grob))
+ (control-points (ly:grob-property grob 'control-points))
+ (new-control-points (map
+ (lambda (p)
+ (cons (car p)
+ (- (cdr p)
+ (* staff-space
+ (ly:grob-property grob 'direction)
+ 0.35))))
+ control-points)))
+
+ (ly:grob-set-property! grob 'control-points new-control-points)
+ (ly:slur::print grob)))
+
+;; for \tabFullNotation, the stem tremolo beams are too big in comparison to
+;; normal staves; this wrapper function scales accordingly:
+(define-public (stem-tremolo::calc-tab-width grob)
+ (let ((width (ly:stem-tremolo::calc-width grob))
+ (staff-space (ly:staff-symbol-staff-space grob)))
+ (/ width staff-space)))