Re: [tablatures] hammer on and pull off

[ Thread Index | Date Index | More lilynet.net/tablatures Archives ]


Federico Bruni schrieb:
[...]
That's great Mark!
I got crazy when I drawed the slurs in tablature with control points..
I was really looking forward to a built-in solution..

With regard to the design of the slurs, I think they are pretty good (maybe David will give you some better advice..).

I suggest you to add in the example two hammeron/pulloff happening at the same time in two different voices. In this case, I think slurs in the upper voice should point up (i.e. over the numbers) and slurs in lower voice point down (under the numbers). I don't know if LilyPond is able to adjust this automatically or if you have to add some code to fix this behaviour..
Have you some examples where this would be needed? It is easier for me to adapt real-life situations
than to think of all possible situations that may come across...


Finally, I'd be glad to test this new feature. Do you think you'll manage to implement it in the 2.13.4 release?
Otherwise, could you suggest how to test it in "the easiest way"?
I mean, what about adding that code to tablature.ly? How can we do it?
For testing purposes, I dont want to add this code fragment in tablature.ly, because in 2.13.4, there will be no tablature.ly (but all the features are provided without the need to \include, as said earlier), so this would lead to more confusion. But if you want, you can copy the
callback definition and the layout block

#(define-public (slur::draw-lowered-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 0.35))))
                                 control-points)))
       (ly:grob-set-property! grob 'control-points new-control-points)
       (ly:slur::print grob)))

\layout {
 \context {
   \TabVoice
   \override Slur #'direction = #UP
   \override Stem #'direction = #DOWN
   \override Slur #'stencil = #slur::draw-lowered-slur
 }
 \context {
   \TabStaff
   \override NoteColumn #'ignore-collision = ##t
 }
}


into a file called "hp.ly" or something similar, and then
simply write

\include "hp.ly"

*after* the '\include tablature.ly' (otherwise it won't work)
in the file you want to use the slurs.


I'm quite "anxious" because I'm going to deliver a draft of a book in two weeks and it would be great to have also hammer-on and pull-off.
This would be a great test suite for the features - if possible, you can send me parts of it whenever
you think the slurs don't look good.

Marc

Thank you so much for your work.

Best regards,
Federico







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/