[tablatures] new attempt to hammer on/pull off |
[ Thread Index |
Date Index
| More lilynet.net/tablatures Archives
]
- To: tablatures@xxxxxxxxxxx
- Subject: [tablatures] new attempt to hammer on/pull off
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Wed, 30 Sep 2009 10:51:19 +0200
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1254300681; l=3759; s=domk; d=hohlart.de; h=Content-Type:Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=tpnZM9u6cZCyis8x1+hyyXnzisg=; b=LpFZuzs821963BYKiHaesNykWitakxVlATsYoBRPi3jXICea5yEpPe95lvGZ3vIaZ5s dHK/SyYeevTnLCpGAH+HAgwmknOfxtINgr4ojUcCre59kcWgGUsg/SVlbv6o6bo7//t6X +vN4MRt6yyQS7sYKWijIGBo0S+8NY3HgBjA=
Hello tablature users,
I decided to rework the hammer on/pull off stuff almost from scratch.
After playing with some internal variables I found out how to make the stems
so short that they don't influence the slurs anymore (before making them
invisible,
as it is now for tablature).
Attached is a file hp.ly which can be included in your own files for
testing purposes,
and a simple, quick hptest.ly as a starting point for your tests.
@Carl: I think the slur callback has to be reworked when the slur
#'details are (at least for me)
not a mysterious bunch of values that I don't understand, but this
depends on Patrick McCartys
efforts to make these more understandable. In the meantime, a patch
including the code from
hp.ly into tablature.scm would improve the overall behavior of slurs
(which for now are simply transparent)
in tablature - when the testers do not complain about situations where
hp.ly does not work :-)
What do you think? Or is my approach way too crude?
Thanks
Marc
% hp.ly
#(define-public (slur::draw-tab-slur grob)
(let* ((staff-symbol (ly:grob-object grob 'staff-symbol))
(staff-space (ly:grob-property staff-symbol 'staff-space))
(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)))
\layout {
\context {
\TabVoice
\override Stem #'length = #0
\override Stem #'no-stem-extend = ##t
\override Stem #'flag-style = #'no-flag
\override Stem #'details = #'((lengths 0 0 0 0 0 0)
(beamed-lengths 0 0 0)
(beamed-minimum-free-lengths 0 0 0)
(beamed-extreme-minimum-free-lengths 0 0)
(stem-shorten 0 0))
autoBeaming = ##f
\override NoteColumn #'ignore-collision = ##t
\override Slur #'stencil = #slur::draw-tab-slur
}
}
\version "2.13.4"
\include "hp.ly"
test = \relative c' {
c8^( d e f)
g_( a b c)
\stemUp
c,^( d e f)
g_( a b c)
\stemDown
c,^( d e f)
g_( a[ b] c)
}
\score {
\new TabVoice { \test }
}